提交 8b3f2ffa 编写于 作者: G gxl

route commit

上级 ca9876b1
......@@ -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$" />
......
......@@ -3,10 +3,10 @@
<component name="EclipseCodeFormatter">
<option name="defaultSettings" value="true" />
<option name="formatter" value="ECLIPSE" />
<option name="id" value="1493019106702" />
<option name="id" value="1476596672120" />
<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">
......
......@@ -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>
......
......@@ -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
......@@ -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"
......
......@@ -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);
}
}
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", 0f, 359f);//最好是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+"%");
}
}
<?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
<?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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册