Skip to content

Commit 422c325

Browse files
committed
see 07/25 log
1 parent 44ea09d commit 422c325

30 files changed

+1221
-1374
lines changed

app/src/main/java/com/blankj/androidutilcode/activity/StatusBarAlphaActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import android.widget.TextView;
99

1010
import com.blankj.androidutilcode.R;
11-
import com.blankj.androidutilcode.base.BaseActivity;
11+
import com.blankj.androidutilcode.base.BaseBackActivity;
1212
import com.blankj.utilcode.util.BarUtils;
1313

1414
/**
@@ -19,7 +19,7 @@
1919
* desc : Bar工具类Demo
2020
* </pre>
2121
*/
22-
public class StatusBarAlphaActivity extends BaseActivity {
22+
public class StatusBarAlphaActivity extends BaseBackActivity {
2323

2424
private int mAlpha;
2525

app/src/main/java/com/blankj/androidutilcode/activity/StatusBarSwipeBackActivity.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111

1212
import com.blankj.androidutilcode.R;
1313
import com.blankj.androidutilcode.UtilsApp;
14-
import com.blankj.androidutilcode.base.BaseActivity;
14+
import com.blankj.androidutilcode.base.BaseBackActivity;
1515
import com.blankj.utilcode.util.BarUtils;
16-
import com.r0adkll.slidr.Slidr;
1716

1817
import java.util.Random;
1918

@@ -26,7 +25,7 @@
2625
* desc : Bar工具类Demo
2726
* </pre>
2827
*/
29-
public class StatusBarSwipeBackActivity extends BaseActivity {
28+
public class StatusBarSwipeBackActivity extends BaseBackActivity {
3029

3130
private Random mRandom;
3231
private int mColor;
@@ -55,14 +54,7 @@ public int bindLayout() {
5554

5655
@Override
5756
public void initView(Bundle savedInstanceState, View view) {
58-
Slidr.attach(this);
59-
60-
mToolbar = (Toolbar) findViewById(R.id.toolbar);
61-
setSupportActionBar(mToolbar);
62-
if (getSupportActionBar() != null) {
63-
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
64-
}
65-
57+
getSupportActionBar().setTitle(getString(R.string.demo_bar));
6658

6759
findViewById(R.id.btn_random_color).setOnClickListener(this);
6860
findViewById(R.id.btn_set_transparent).setOnClickListener(this);
@@ -113,6 +105,6 @@ public void onStopTrackingTouch(SeekBar seekBar) {
113105
};
114106

115107
private void updateStatusBar() {
116-
BarUtils.setColorForSwipeBack(StatusBarSwipeBackActivity.this, mColor, mAlpha);
108+
BarUtils.setStatusBarColor(StatusBarSwipeBackActivity.this, mColor, mAlpha);
117109
}
118110
}
Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,24 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<ScrollView
2+
<LinearLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
android:layout_width="match_parent"
5-
android:layout_height="match_parent">
5+
android:layout_height="wrap_content"
6+
android:gravity="center_horizontal"
7+
android:orientation="vertical"
8+
android:padding="@dimen/spacing_16">
69

7-
<LinearLayout
10+
<TextView
11+
android:id="@+id/tv_about_activity"
12+
style="@style/TextStyle"
813
android:layout_width="match_parent"
914
android:layout_height="wrap_content"
10-
android:gravity="center_horizontal"
11-
android:orientation="vertical"
12-
android:padding="@dimen/spacing_16">
15+
android:gravity="center" />
1316

14-
<TextView
15-
android:id="@+id/tv_about_activity"
16-
style="@style/TextStyle"
17-
android:layout_width="match_parent"
18-
android:layout_height="wrap_content"
19-
android:gravity="center" />
20-
21-
<Button
22-
android:id="@+id/btn_launch_image_activity"
23-
style="@style/WideBtnStyle"
24-
android:layout_width="match_parent"
25-
android:layout_height="wrap_content"
26-
android:text="@string/activity_start_imageActivity" />
17+
<Button
18+
android:id="@+id/btn_launch_image_activity"
19+
style="@style/WideBtnStyle"
20+
android:layout_width="match_parent"
21+
android:layout_height="wrap_content"
22+
android:text="@string/activity_start_imageActivity" />
2723

28-
</LinearLayout>
29-
</ScrollView>
24+
</LinearLayout>
Lines changed: 48 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,60 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<ScrollView
2+
<LinearLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
android:layout_width="match_parent"
5-
android:layout_height="match_parent">
6-
7-
<LinearLayout
5+
android:layout_height="wrap_content"
6+
android:gravity="center_horizontal"
7+
android:orientation="vertical"
8+
android:padding="@dimen/spacing_16">
9+
10+
<TextView
11+
android:id="@+id/tv_about_app"
12+
style="@style/TextStyle"
813
android:layout_width="match_parent"
914
android:layout_height="wrap_content"
10-
android:gravity="center_horizontal"
11-
android:orientation="vertical"
12-
android:padding="@dimen/spacing_16">
13-
14-
<TextView
15-
android:id="@+id/tv_about_app"
16-
style="@style/TextStyle"
17-
android:layout_width="match_parent"
18-
android:layout_height="wrap_content"
19-
android:gravity="center"
20-
android:paddingTop="16dp" />
15+
android:gravity="center"
16+
android:paddingTop="16dp" />
2117

22-
<Button
23-
android:id="@+id/btn_install_app"
24-
style="@style/WideBtnStyle"
25-
android:layout_width="match_parent"
26-
android:layout_height="wrap_content"
27-
android:text="@string/app_install" />
18+
<Button
19+
android:id="@+id/btn_install_app"
20+
style="@style/WideBtnStyle"
21+
android:layout_width="match_parent"
22+
android:layout_height="wrap_content"
23+
android:text="@string/app_install" />
2824

29-
<Button
30-
android:id="@+id/btn_install_app_silent"
31-
style="@style/WideBtnStyle"
32-
android:layout_width="match_parent"
33-
android:layout_height="wrap_content"
34-
android:text="@string/app_install_silent" />
25+
<Button
26+
android:id="@+id/btn_install_app_silent"
27+
style="@style/WideBtnStyle"
28+
android:layout_width="match_parent"
29+
android:layout_height="wrap_content"
30+
android:text="@string/app_install_silent" />
3531

36-
<Button
37-
android:id="@+id/btn_uninstall_app"
38-
style="@style/WideBtnStyle"
39-
android:layout_width="match_parent"
40-
android:layout_height="wrap_content"
41-
android:text="@string/app_uninstall" />
32+
<Button
33+
android:id="@+id/btn_uninstall_app"
34+
style="@style/WideBtnStyle"
35+
android:layout_width="match_parent"
36+
android:layout_height="wrap_content"
37+
android:text="@string/app_uninstall" />
4238

43-
<Button
44-
android:id="@+id/btn_uninstall_app_silent"
45-
style="@style/WideBtnStyle"
46-
android:layout_width="match_parent"
47-
android:layout_height="wrap_content"
48-
android:text="@string/app_uninstall_silent" />
39+
<Button
40+
android:id="@+id/btn_uninstall_app_silent"
41+
style="@style/WideBtnStyle"
42+
android:layout_width="match_parent"
43+
android:layout_height="wrap_content"
44+
android:text="@string/app_uninstall_silent" />
4945

50-
<Button
51-
android:id="@+id/btn_launch_app"
52-
style="@style/WideBtnStyle"
53-
android:layout_width="match_parent"
54-
android:layout_height="wrap_content"
55-
android:text="@string/app_launch" />
46+
<Button
47+
android:id="@+id/btn_launch_app"
48+
style="@style/WideBtnStyle"
49+
android:layout_width="match_parent"
50+
android:layout_height="wrap_content"
51+
android:text="@string/app_launch" />
5652

57-
<Button
58-
android:id="@+id/btn_get_app_details_settings"
59-
style="@style/WideBtnStyle"
60-
android:layout_width="match_parent"
61-
android:layout_height="wrap_content"
62-
android:text="@string/app_get_details_settings" />
53+
<Button
54+
android:id="@+id/btn_get_app_details_settings"
55+
style="@style/WideBtnStyle"
56+
android:layout_width="match_parent"
57+
android:layout_height="wrap_content"
58+
android:text="@string/app_get_details_settings" />
6359

64-
</LinearLayout>
65-
</ScrollView>
60+
</LinearLayout>
Lines changed: 41 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,52 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<ScrollView
2+
<LinearLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
android:layout_width="match_parent"
5-
android:layout_height="match_parent">
6-
7-
<LinearLayout
5+
android:layout_height="wrap_content"
6+
android:gravity="center_horizontal"
7+
android:orientation="vertical"
8+
android:padding="@dimen/spacing_16">
9+
10+
<Button
11+
android:id="@+id/btn_status_bar_color"
12+
style="@style/WideBtnStyle"
813
android:layout_width="match_parent"
914
android:layout_height="wrap_content"
10-
android:gravity="center_horizontal"
11-
android:orientation="vertical"
12-
android:padding="@dimen/spacing_16">
13-
14-
<Button
15-
android:id="@+id/btn_status_bar_color"
16-
style="@style/WideBtnStyle"
17-
android:layout_width="match_parent"
18-
android:layout_height="wrap_content"
19-
android:text="@string/status_bar_set_color" />
15+
android:text="@string/status_bar_set_color" />
2016

21-
<Button
22-
android:id="@+id/btn_status_bar_alpha"
23-
style="@style/WideBtnStyle"
24-
android:layout_width="match_parent"
25-
android:layout_height="wrap_content"
26-
android:text="@string/status_bar_set_alpha" />
17+
<Button
18+
android:id="@+id/btn_status_bar_alpha"
19+
style="@style/WideBtnStyle"
20+
android:layout_width="match_parent"
21+
android:layout_height="wrap_content"
22+
android:text="@string/status_bar_set_alpha" />
2723

28-
<Button
29-
android:id="@+id/btn_status_bar_image_view"
30-
style="@style/WideBtnStyle"
31-
android:layout_width="match_parent"
32-
android:layout_height="wrap_content"
33-
android:text="@string/status_bar_set_image_view" />
24+
<Button
25+
android:id="@+id/btn_status_bar_image_view"
26+
style="@style/WideBtnStyle"
27+
android:layout_width="match_parent"
28+
android:layout_height="wrap_content"
29+
android:text="@string/status_bar_set_image_view" />
3430

35-
<Button
36-
android:id="@+id/btn_status_bar_fragment"
37-
style="@style/WideBtnStyle"
38-
android:layout_width="match_parent"
39-
android:layout_height="wrap_content"
40-
android:text="@string/status_bar_set_fragment" />
31+
<Button
32+
android:id="@+id/btn_status_bar_fragment"
33+
style="@style/WideBtnStyle"
34+
android:layout_width="match_parent"
35+
android:layout_height="wrap_content"
36+
android:text="@string/status_bar_set_fragment" />
4137

42-
<Button
43-
android:id="@+id/btn_status_bar_swipe_back"
44-
style="@style/WideBtnStyle"
45-
android:layout_width="match_parent"
46-
android:layout_height="wrap_content"
47-
android:text="@string/status_bar_set_swipe_back" />
38+
<Button
39+
android:id="@+id/btn_status_bar_swipe_back"
40+
style="@style/WideBtnStyle"
41+
android:layout_width="match_parent"
42+
android:layout_height="wrap_content"
43+
android:text="@string/status_bar_set_swipe_back" />
4844

49-
<Button
50-
android:id="@+id/btn_status_bar_drawer"
51-
style="@style/WideBtnStyle"
52-
android:layout_width="match_parent"
53-
android:layout_height="wrap_content"
54-
android:text="@string/status_bar_set_drawer" />
45+
<Button
46+
android:id="@+id/btn_status_bar_drawer"
47+
style="@style/WideBtnStyle"
48+
android:layout_width="match_parent"
49+
android:layout_height="wrap_content"
50+
android:text="@string/status_bar_set_drawer" />
5551

56-
</LinearLayout>
57-
</ScrollView>
52+
</LinearLayout>
Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,40 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<ScrollView
2+
<LinearLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
android:layout_width="match_parent"
5-
android:layout_height="match_parent">
5+
android:layout_height="wrap_content"
6+
android:gravity="center_horizontal"
7+
android:orientation="vertical"
8+
android:padding="@dimen/spacing_16">
69

7-
<LinearLayout
10+
<Button
11+
android:id="@+id/btn_clean_internal_cache"
12+
style="@style/WideBtnStyle"
813
android:layout_width="match_parent"
9-
android:layout_height="wrap_content"
10-
android:gravity="center_horizontal"
11-
android:orientation="vertical"
12-
android:padding="@dimen/spacing_16">
14+
android:layout_height="wrap_content" />
1315

14-
<Button
15-
android:id="@+id/btn_clean_internal_cache"
16-
style="@style/WideBtnStyle"
17-
android:layout_width="match_parent"
18-
android:layout_height="wrap_content" />
19-
20-
<Button
21-
android:id="@+id/btn_clean_internal_files"
22-
style="@style/WideBtnStyle"
23-
android:layout_width="match_parent"
24-
android:layout_height="wrap_content" />
16+
<Button
17+
android:id="@+id/btn_clean_internal_files"
18+
style="@style/WideBtnStyle"
19+
android:layout_width="match_parent"
20+
android:layout_height="wrap_content" />
2521

26-
<Button
27-
android:id="@+id/btn_clean_internal_databases"
28-
style="@style/WideBtnStyle"
29-
android:layout_width="match_parent"
30-
android:layout_height="wrap_content" />
22+
<Button
23+
android:id="@+id/btn_clean_internal_databases"
24+
style="@style/WideBtnStyle"
25+
android:layout_width="match_parent"
26+
android:layout_height="wrap_content" />
3127

32-
<Button
33-
android:id="@+id/btn_clean_internal_sp"
34-
style="@style/WideBtnStyle"
35-
android:layout_width="match_parent"
36-
android:layout_height="wrap_content" />
28+
<Button
29+
android:id="@+id/btn_clean_internal_sp"
30+
style="@style/WideBtnStyle"
31+
android:layout_width="match_parent"
32+
android:layout_height="wrap_content" />
3733

38-
<Button
39-
android:id="@+id/btn_clean_external_cache"
40-
style="@style/WideBtnStyle"
41-
android:layout_width="match_parent"
42-
android:layout_height="wrap_content" />
34+
<Button
35+
android:id="@+id/btn_clean_external_cache"
36+
style="@style/WideBtnStyle"
37+
android:layout_width="match_parent"
38+
android:layout_height="wrap_content" />
4339

44-
</LinearLayout>
45-
</ScrollView>
40+
</LinearLayout>

0 commit comments

Comments
 (0)