Skip to content

Commit 7793b8c

Browse files
author
zhouxingrong
committed
fix
1 parent c62867d commit 7793b8c

3 files changed

Lines changed: 37 additions & 13 deletions

File tree

‎module_app/src/main/java/com/guiying/androidmodulepattern/MyApplication.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* @name MyApplication
2525
*/
2626
@ReportsCrashes(
27-
mailTo = "guiying705@Gmail.com",
27+
mailTo = "jusenr@163.com",
2828
mode = ReportingInteractionMode.DIALOG,
2929
customReportContent = {
3030
ReportField.APP_VERSION_NAME,

‎module_main/src/main/java/com/guiying/main/MainActivity.java‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import android.view.KeyEvent;
55
import android.view.View;
66
import android.widget.Button;
7+
import android.widget.TextView;
78

89
import com.alibaba.android.arouter.launcher.ARouter;
910
import com.guiying.common.base.BaseActivity;
@@ -22,6 +23,8 @@ public class MainActivity extends BaseActivity implements View.OnClickListener {
2223
private long exitTime = 0;
2324
protected Button newsButton;
2425
protected Button girlsButton;
26+
protected Button crashButton;
27+
protected TextView tvCrash;
2528

2629
@Override
2730
protected void onCreate(Bundle savedInstanceState) {
@@ -31,6 +34,9 @@ protected void onCreate(Bundle savedInstanceState) {
3134
newsButton.setOnClickListener(MainActivity.this);
3235
girlsButton = (Button) findViewById(R.id.girls_button);
3336
girlsButton.setOnClickListener(MainActivity.this);
37+
crashButton = (Button) findViewById(R.id.crash_button);
38+
crashButton.setOnClickListener(MainActivity.this);
39+
tvCrash = (TextView) findViewById(R.id.tv_crash);
3440
}
3541

3642
@Override
@@ -41,6 +47,8 @@ public void onClick(View view) {
4147
} else if (view.getId() == R.id.girls_button) {
4248
//跳转到GirlsActivity
4349
ARouter.getInstance().build("/girls/list").navigation();
50+
} else if (view.getId() == R.id.crash_button) {
51+
tvCrash.setText(0000);
4452
}
4553
}
4654

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,41 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
4-
android:id="@+id/activity_main"
5-
android:layout_width="match_parent"
6-
android:layout_height="match_parent"
7-
android:orientation="vertical"
8-
android:paddingBottom="@dimen/activity_vertical_margin"
9-
android:paddingLeft="@dimen/activity_horizontal_margin"
10-
android:paddingRight="@dimen/activity_horizontal_margin"
11-
android:paddingTop="@dimen/activity_vertical_margin"
12-
tools:context="com.guiying.main.MainActivity">
3+
xmlns:tools="http://schemas.android.com/tools"
4+
android:id="@+id/activity_main"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
android:orientation="vertical"
8+
android:paddingBottom="@dimen/activity_vertical_margin"
9+
android:paddingLeft="@dimen/activity_horizontal_margin"
10+
android:paddingRight="@dimen/activity_horizontal_margin"
11+
android:paddingTop="@dimen/activity_vertical_margin"
12+
tools:context="com.guiying.main.MainActivity">
1313

1414
<Button
1515
android:id="@+id/news_button"
1616
android:layout_width="match_parent"
1717
android:layout_height="wrap_content"
18-
android:text="News" />
18+
android:text="News"/>
1919

2020
<Button
2121
android:id="@+id/girls_button"
2222
android:layout_width="match_parent"
2323
android:layout_height="wrap_content"
24-
android:text="Girls" />
24+
android:text="Girls"/>
25+
26+
<Button
27+
android:id="@+id/crash_button"
28+
android:layout_width="match_parent"
29+
android:layout_height="wrap_content"
30+
android:text="Crash"/>
31+
32+
<TextView
33+
android:id="@+id/tv_crash"
34+
android:layout_width="wrap_content"
35+
android:layout_height="wrap_content"
36+
android:layout_gravity="center"
37+
android:layout_margin="@dimen/size_20dp"
38+
android:text="text"
39+
android:textColor="@android:color/holo_red_light"/>
40+
2541
</LinearLayout>

0 commit comments

Comments
 (0)