Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
门心叼龙
android-mvp-flyfun
提交
8b3f2ffa
A
android-mvp-flyfun
项目概览
门心叼龙
/
android-mvp-flyfun
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
android-mvp-flyfun
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8b3f2ffa
编写于
8月 27, 2018
作者:
G
gxl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
route commit
上级
ca9876b1
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
149 addition
and
23 deletion
+149
-23
.idea/gradle.xml
.idea/gradle.xml
+2
-1
.idea/misc.xml
.idea/misc.xml
+6
-3
.idea/modules.xml
.idea/modules.xml
+1
-1
.idea/vcs.xml
.idea/vcs.xml
+2
-0
app/src/main/AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-0
app/src/main/java/com/yesway/android/MainActivity.java
app/src/main/java/com/yesway/android/MainActivity.java
+40
-18
app/src/main/java/com/yesway/android/view/RotateProgressDialog.java
...in/java/com/yesway/android/view/RotateProgressDialog.java
+62
-0
app/src/main/res/drawable/rotate_progress_bg.xml
app/src/main/res/drawable/rotate_progress_bg.xml
+5
-0
app/src/main/res/layout/rotate_progress_dialog_layout.xml
app/src/main/res/layout/rotate_progress_dialog_layout.xml
+30
-0
app/src/main/res/mipmap-xhdpi/rotate_progress_back_bg.png
app/src/main/res/mipmap-xhdpi/rotate_progress_back_bg.png
+0
-0
app/src/main/res/mipmap-xhdpi/rotate_progress_front_bg.png
app/src/main/res/mipmap-xhdpi/rotate_progress_front_bg.png
+0
-0
未找到文件。
.idea/gradle.xml
浏览文件 @
8b3f2ffa
...
...
@@ -3,8 +3,9 @@
<component
name=
"GradleSettings"
>
<option
name=
"linkedExternalProjectsSettings"
>
<GradleProjectSettings>
<option
name=
"distributionType"
value=
"
DEFAULT_WRAPPED
"
/>
<option
name=
"distributionType"
value=
"
LOCAL
"
/>
<option
name=
"externalProjectPath"
value=
"$PROJECT_DIR$"
/>
<option
name=
"gradleHome"
value=
"D:/android_tool/gradle-4.1"
/>
<option
name=
"modules"
>
<set>
<option
value=
"$PROJECT_DIR$"
/>
...
...
.idea/misc.xml
浏览文件 @
8b3f2ffa
...
...
@@ -3,10 +3,10 @@
<component
name=
"EclipseCodeFormatter"
>
<option
name=
"defaultSettings"
value=
"true"
/>
<option
name=
"formatter"
value=
"ECLIPSE"
/>
<option
name=
"id"
value=
"14
93019106702
"
/>
<option
name=
"id"
value=
"14
76596672120
"
/>
<option
name=
"name"
value=
"default"
/>
<option
name=
"pathToConfigFileJava"
value=
"D:/
soft/android/eclipse-google-code-style
.xml"
/>
<option
name=
"selectedJavaProfile"
value=
"
GoogleStyle
"
/>
<option
name=
"pathToConfigFileJava"
value=
"D:/
android_tool/Eclipse_riverlet
.xml"
/>
<option
name=
"selectedJavaProfile"
value=
"
Eclipse [Riverlet]
"
/>
</component>
<component
name=
"NullableNotNullManager"
>
<option
name=
"myDefaultNullable"
value=
"android.support.annotation.Nullable"
/>
...
...
@@ -38,6 +38,9 @@
<component
name=
"ProjectType"
>
<option
name=
"id"
value=
"Android"
/>
</component>
<component
name=
"SvnBranchConfigurationManager"
>
<option
name=
"mySupportsUserInfoFilter"
value=
"true"
/>
</component>
<component
name=
"masterDetails"
>
<states>
<state
key=
"ProjectJDKs.UI"
>
...
...
.idea/modules.xml
浏览文件 @
8b3f2ffa
...
...
@@ -2,8 +2,8 @@
<project
version=
"4"
>
<component
name=
"ProjectModuleManager"
>
<modules>
<module
fileurl=
"file://$PROJECT_DIR$/MvpCms.iml"
filepath=
"$PROJECT_DIR$/MvpCms.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/app/app.iml"
filepath=
"$PROJECT_DIR$/app/app.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/mvpcms.iml"
filepath=
"$PROJECT_DIR$/mvpcms.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/test/test.iml"
filepath=
"$PROJECT_DIR$/test/test.iml"
/>
<module
fileurl=
"file://D:\workspace\MvpCms\yesway2018.iml"
filepath=
"D:\workspace\MvpCms\yesway2018.iml"
/>
</modules>
...
...
.idea/vcs.xml
浏览文件 @
8b3f2ffa
...
...
@@ -2,5 +2,7 @@
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$"
vcs=
"Git"
/>
<mapping
directory=
"$PROJECT_DIR$/app"
vcs=
"svn"
/>
<mapping
directory=
"$PROJECT_DIR$/test"
vcs=
"svn"
/>
</component>
</project>
\ No newline at end of file
app/src/main/AndroidManifest.xml
浏览文件 @
8b3f2ffa
...
...
@@ -8,6 +8,7 @@
android:label=
"@string/app_name"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:name=
".MyApplication"
android:theme=
"@style/AppTheme.BackBar"
>
<activity
android:name=
".MainActivity"
...
...
app/src/main/java/com/yesway/android/MainActivity.java
浏览文件 @
8b3f2ffa
...
...
@@ -7,9 +7,11 @@ import com.yesway.android.net.dto.response.LoginResponse;
import
com.yesway.android.net.http.Response
;
import
com.yesway.android.net.model.IUserModel
;
import
com.yesway.android.view.ExpandableTextView
;
import
com.yesway.android.view.RotateProgressDialog
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.support.v7.app.AppCompatActivity
;
import
android.util.Log
;
import
android.view.Menu
;
...
...
@@ -17,27 +19,47 @@ import android.view.View;
public
class
MainActivity
extends
BaseActivity
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_main
);
ExpandableTextView
expandableTextView
=
findViewById
(
R
.
id
.
expand_text_view
);
expandableTextView
.
setText
(
"我们为全球首个人工智能区块链数字资产交易平台(全球前十)提供全面技术支持服务\n"
+
"公司以区块链技术开发应用为核心业务方向,获得一线资本千万美元的投资,全力打造全球区块链行业中,安全、透明的区块链资产技术服务平台是我们的企业使命"
);
}
private
RotateProgressDialog
mRotateProgressDialog
;
private
Handler
mHandler
;
@Override
public
void
initView
(
Bundle
savedInstanceState
)
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_main
);
ExpandableTextView
expandableTextView
=
findViewById
(
R
.
id
.
expand_text_view
);
expandableTextView
.
setText
(
"我们为全球首个人工智能区块链数字资产交易平台(全球前十)提供全面技术支持服务\n"
+
"公司以区块链技术开发应用为核心业务方向,获得一线资本千万美元的投资,全力打造全球区块链行业中,安全、透明的区块链资产技术服务平台是我们的企业使命"
);
}
mRotateProgressDialog
=
new
RotateProgressDialog
();
mRotateProgressDialog
.
show
(
getSupportFragmentManager
(),
"tag"
);
mHandler
=
new
Handler
();
mHandler
.
postDelayed
(
getMytag
(),
1000
);
}
@Override
public
void
initData
()
{
private
Runnable
getMytag
()
{
return
new
Runnable
()
{
@Override
public
void
run
()
{
int
value
=
(
int
)
(
Math
.
random
()
*
100
);
mRotateProgressDialog
.
setProgress
(
value
);
mHandler
.
postDelayed
(
getMytag
(),
1000
);
}
};
}
}
@Override
public
void
initView
(
Bundle
savedInstanceState
)
{
@Override
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
getMenuInflater
().
inflate
(
R
.
menu
.
main_meun
,
menu
);
return
super
.
onCreateOptionsMenu
(
menu
);
}
}
@Override
public
void
initData
()
{
}
@Override
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
getMenuInflater
().
inflate
(
R
.
menu
.
main_meun
,
menu
);
return
super
.
onCreateOptionsMenu
(
menu
);
}
}
app/src/main/java/com/yesway/android/view/RotateProgressDialog.java
0 → 100644
浏览文件 @
8b3f2ffa
package
com.yesway.android.view
;
import
android.animation.ObjectAnimator
;
import
android.app.Dialog
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.support.v4.app.DialogFragment
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.Window
;
import
android.view.animation.LinearInterpolator
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
com.yesway.android.R
;
import
com.yesway.android.util.DisplayUtil
;
/**
* Description: <旋转进度的dialog><br>
* Author: gxl<br>
* Date: 2018/4/19<br>
* Version: V1.0.0<br>
* Update: <br>
*/
public
class
RotateProgressDialog
extends
DialogFragment
{
private
TextView
mTxtProgress
;
private
ImageView
mImgProgress
;
@Override
public
void
onStart
()
{
super
.
onStart
();
Dialog
dialog
=
getDialog
();
if
(
dialog
!=
null
)
{
dialog
.
getWindow
().
setLayout
(
DisplayUtil
.
dip2px
(
100
),
DisplayUtil
.
dip2px
(
100
));
dialog
.
setCancelable
(
false
);
dialog
.
setCanceledOnTouchOutside
(
false
);
}
}
@Nullable
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
@Nullable
ViewGroup
container
,
@Nullable
Bundle
savedInstanceState
)
{
getDialog
().
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
View
view
=
LayoutInflater
.
from
(
getActivity
()).
inflate
(
R
.
layout
.
rotate_progress_dialog_layout
,
null
,
false
);
mImgProgress
=
view
.
findViewById
(
R
.
id
.
img_progress
);
mTxtProgress
=
view
.
findViewById
(
R
.
id
.
txt_progress
);
//mImgProgress.animate().rotation(360).setDuration(5).r.start();
ObjectAnimator
rotation
=
ObjectAnimator
.
ofFloat
(
mImgProgress
,
"rotation"
,
0
f
,
359
f
);
//最好是0f到359f,0f和360f的位置是重复的
rotation
.
setRepeatCount
(
ObjectAnimator
.
INFINITE
);
rotation
.
setInterpolator
(
new
LinearInterpolator
());
rotation
.
setDuration
(
2000
);
rotation
.
start
();
return
view
;
}
public
void
setProgress
(
int
value
){
mTxtProgress
.
setText
(
value
+
"%"
);
}
}
app/src/main/res/drawable/rotate_progress_bg.xml
0 → 100644
浏览文件 @
8b3f2ffa
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:radius=
"10dp"
/>
<solid
android:color=
"#ffffff"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/rotate_progress_dialog_layout.xml
0 → 100644
浏览文件 @
8b3f2ffa
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"100dp"
android:layout_height=
"100dp"
android:layout_gravity=
"center"
android:background=
"@drawable/rotate_progress_bg"
>
<ImageView
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:src=
"@mipmap/rotate_progress_back_bg"
android:layout_centerInParent=
"true"
/>
<ImageView
android:id=
"@+id/img_progress"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:src=
"@mipmap/rotate_progress_front_bg"
android:layout_centerInParent=
"true"
/>
<TextView
android:id=
"@+id/txt_progress"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:textColor=
"#565656"
android:textSize=
"11sp"
/>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/mipmap-xhdpi/rotate_progress_back_bg.png
0 → 100644
浏览文件 @
8b3f2ffa
2.1 KB
app/src/main/res/mipmap-xhdpi/rotate_progress_front_bg.png
0 → 100644
浏览文件 @
8b3f2ffa
4.0 KB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录