Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

Commit fb8b72c

Browse files
committed
修复闪存崩溃问题
1 parent c5d4740 commit fb8b72c

File tree

10 files changed

+35
-16
lines changed

10 files changed

+35
-16
lines changed

module-blog/src/main/java/com/rae/cnblogs/blog/fragment/BlogHomeFragment.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,4 +221,9 @@ private void clearFragments() {
221221
}
222222
fragmentTransaction.commit();
223223
}
224+
225+
@OnClick(R2.id.tv_search)
226+
public void onSearchClick() {
227+
AppRoute.routeToSearch(getContext());
228+
}
224229
}

module-blog/src/main/res/layout/fm_blog_list.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
android:id="@+id/content"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6-
android:background="@color/default_background"
6+
android:background="@color/background_divider"
77
android:orientation="vertical">
88

99
<com.rae.cnblogs.widget.PlaceholderView

module-home/src/main/AndroidManifest.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
<activity
1010
android:name=".LauncherActivity"
1111
android:theme="@style/AppTheme.NoActionBar.FullScreen">
12-
<intent-filter>
13-
<action android:name="android.intent.action.MAIN" />
12+
<intent-filter>
13+
<action android:name="android.intent.action.MAIN" />
1414

15-
<category android:name="android.intent.category.LAUNCHER" />
16-
</intent-filter>
15+
<category android:name="android.intent.category.LAUNCHER" />
16+
</intent-filter>
1717
</activity>
1818

1919

@@ -33,5 +33,6 @@
3333
android:label="@string/feedback"
3434
android:launchMode="singleTop"
3535
android:windowSoftInputMode="stateVisible" />
36+
<activity android:name=".search.SearchActivity" />
3637
</application>
3738
</manifest>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.rae.cnblogs.home.search;
2+
3+
import com.alibaba.android.arouter.facade.annotation.Route;
4+
import com.rae.cnblogs.AppRoute;
5+
import com.rae.cnblogs.activity.SwipeBackBasicActivity;
6+
7+
/**
8+
* 搜索
9+
* Created by rae on 2018/7/25.
10+
* Copyright (c) https://github.com/raedev All rights reserved.
11+
*/
12+
@Route(path = AppRoute.PATH_SEARCH)
13+
public class SearchActivity extends SwipeBackBasicActivity {
14+
}

module-middleware/src/main/java/com/rae/cnblogs/AppRoute.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public final class AppRoute {
111111
/**
112112
* 搜索
113113
*/
114-
public static final String PATH_SEARCH = "/blog/search";
114+
public static final String PATH_SEARCH = "/home/search";
115115
/**
116116
* 博客评论
117117
*/

module-moment/src/main/java/com/rae/cnblogs/moment/MomentMessageActivity.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.rae.cnblogs.moment;
22

3-
import android.annotation.SuppressLint;
43
import android.os.Bundle;
54
import android.support.annotation.Nullable;
65

@@ -20,14 +19,13 @@ public class MomentMessageActivity extends SwipeBackBasicActivity {
2019

2120
private MomentMessageFragment mFragment;
2221

23-
@SuppressLint("InvalidR2Usage")
2422
@Override
2523
protected void onCreate(@Nullable Bundle savedInstanceState) {
2624
super.onCreate(savedInstanceState);
2725
setContentView(R.layout.activity_moment_message);
2826
mFragment = new MomentMessageFragment();
2927
getSupportFragmentManager().beginTransaction()
30-
.add(R2.id.content, mFragment)
28+
.add(R.id.content, mFragment)
3129
.commitNow();
3230
}
3331

module-moment/src/main/res/layout/fm_moment_home.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
<android.support.v7.widget.Toolbar
3838
android:id="@+id/tool_bar"
3939
android:layout_width="match_parent"
40-
android:layout_height="@dimen/action_bar_height"
40+
android:layout_height="wrap_content"
41+
android:paddingBottom="10dp"
42+
android:paddingStart="12dp"
4143
android:paddingTop="10dp"
4244
app:contentInsetEnd="0dp"
4345
app:contentInsetStart="0dp"

module-moment/src/main/res/layout/item_moment_message.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,10 @@
6161
android:layout_width="match_parent"
6262
android:layout_height="wrap_content"
6363
android:layout_below="@+id/tv_blog_summary"
64-
android:layout_marginTop="2dp"
64+
android:layout_marginTop="8dp"
6565
android:layout_toRightOf="@+id/img_blog_avatar"
6666
android:background="@drawable/bg_moment_reference"
6767
android:gravity="center_vertical"
68-
android:padding="5dp"
6968
android:text="@string/cancel"
7069
android:textColor="@color/ph2"
7170
android:textSize="12sp" />

module-widget/src/main/res/layout/item_list_loading.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,30 @@
2020
<com.makeramen.roundedimageview.RoundedImageView
2121
android:layout_width="32dp"
2222
android:layout_height="32dp"
23-
android:src="@color/default_background"
23+
android:src="@color/background_divider"
2424
app:riv_corner_radius="32dp" />
2525

2626

2727
<View
2828
android:layout_width="100dp"
2929
android:layout_height="4dp"
3030
android:layout_marginLeft="9dp"
31-
android:background="@color/default_background" />
31+
android:background="@color/background_divider" />
3232

3333
</LinearLayout>
3434

3535
<View
3636
android:layout_width="160dp"
3737
android:layout_height="4dp"
3838
android:layout_marginBottom="11dp"
39-
android:background="@color/default_background" />
39+
android:background="@color/background_divider" />
4040

4141

4242
<View
4343
android:layout_width="match_parent"
4444
android:layout_height="96dp"
4545
android:layout_marginBottom="6dp"
46-
android:background="@color/default_background" />
46+
android:background="@color/background_divider" />
4747

4848

4949
<RelativeLayout

0 commit comments

Comments
 (0)