Skip to content

Commit eed94de

Browse files
committed
Merge remote-tracking branch 'remotes/origin/v1.0.1' into v1.0.0-patch
# Conflicts: # app/src/main/java/com/rae/cnblogs/CnblogsApplication.java
2 parents 92bbbb7 + 99803fc commit eed94de

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+728
-96
lines changed

app/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ dependencies {
122122
// LeanCloud 用户反馈包
123123
compile 'cn.leancloud.android:avoscloud-feedback:v4.4.3@aar'
124124
compile 'io.reactivex.rxjava2:rxjava:2.1.0'
125+
// 主题切换
126+
compile 'skin.support:skin-support:2.1.2'
125127
}
126128

127129
// 热更新

app/src/main/AndroidManifest.xml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@
3939
android:screenOrientation="portrait"
4040
android:theme="@style/AppTheme.Dark"/>
4141

42-
<!-- <activity
43-
android:name=".activity.TestActivity"
44-
android:label="博客园测试"
45-
android:screenOrientation="portrait"
46-
android:theme="@style/AppTheme.Dark">
47-
<intent-filter>
48-
<action android:name="android.intent.action.MAIN"/>
49-
50-
<category android:name="android.intent.category.LAUNCHER"/>
51-
</intent-filter>
52-
</activity>-->
42+
<!-- <activity
43+
android:name=".activity.TestActivity"
44+
android:label="博客园测试"
45+
android:screenOrientation="portrait"
46+
android:theme="@style/AppTheme.Dark">
47+
<intent-filter>
48+
<action android:name="android.intent.action.MAIN"/>
49+
50+
<category android:name="android.intent.category.LAUNCHER"/>
51+
</intent-filter>
52+
</activity>-->
5353

5454
<!--博文-->
5555
<activity
@@ -60,7 +60,7 @@
6060
<activity
6161
android:name=".activity.LoginActivity"
6262
android:launchMode="singleTop"
63-
android:windowSoftInputMode="stateVisible" />
63+
android:windowSoftInputMode="stateVisible"/>
6464

6565

6666
<!--网页登录-->
@@ -174,6 +174,13 @@
174174
android:launchMode="singleTop"
175175
android:windowSoftInputMode="stateHidden"/>
176176

177+
<!-- <activity android:name=".fragment.SearchFragment">
178+
<intent-filter>
179+
<action android:name="android.intent.action.MAIN"/>
180+
<category android:name="android.intent.category.LAUNCHER"/>
181+
</intent-filter>
182+
</activity>-->
183+
177184

178185
<meta-data
179186
android:name="UMENG_APPKEY"

app/src/main/assets/css/rae-night.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
body,div,p{
2+
background:#121413;
3+
color:#4C4E4D;
4+
}
5+
div{
6+
opacity: 0.8;
7+
filter: alpha(opacity=80); /* For IE8 and earlier */
8+
}
9+
.cnblogs_code pre{
10+
opacity: 0.6;
11+
filter: alpha(opacity=60); /* For IE8 and earlier */
12+
border: 1px solid #4C4E4D;
13+
}
14+
img{
15+
opacity: 0.5;
16+
filter: alpha(opacity=50); /* For IE8 and earlier */
17+
}

app/src/main/assets/css/rae.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
*{
23
word-wrap: break-word;
34
}

app/src/main/assets/view.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
1111
<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css">
1212
<link rel="stylesheet" type="text/css" href="css/rae.css">
13+
<!--<link rel="stylesheet" type="text/css" href="css/rae-night.css">-->
1314

1415
<script src="js/jquery.js" type="text/javascript"></script>
1516
<script src="js/highlight.min.js" type="text/javascript"></script>

app/src/main/java/com/rae/cnblogs/CnblogsApplication.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public void onCreate() {
4343
AVOSCloud.initialize(getApplication(), BuildConfig.LEAN_CLOUD_APP_ID, BuildConfig.LEAN_CLOUD_APP_KEY);
4444
FeedbackThread.getInstance();
4545
MobclickAgent.setDebugMode(BuildConfig.DEBUG);
46+
// SkinCompatManager.withoutActivity(getApplication()).loadSkin("night", SkinCompatManager.SKIN_LOADER_STRATEGY_BUILD_IN);
4647

4748
// 一些要求不高的初始化操作放到线程中去操作
4849
new Thread(new Runnable() {

app/src/main/java/com/rae/cnblogs/activity/SettingActivity.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import android.view.animation.AnimationUtils;
99
import android.widget.TextView;
1010

11+
import com.rae.cnblogs.AppRoute;
1112
import com.rae.cnblogs.AppUI;
1213
import com.rae.cnblogs.CnblogsApplication;
1314
import com.rae.cnblogs.R;
@@ -22,6 +23,7 @@
2223
import butterknife.BindView;
2324
import butterknife.OnClick;
2425

26+
2527
/**
2628
* 设置
2729
* Created by ChenRui on 2017/7/24 0024 1:18.
@@ -119,6 +121,22 @@ public void onShareClick() {
119121
mShareDialog.show();
120122
}
121123

124+
/**
125+
* 开源项目
126+
*/
127+
@OnClick(R.id.ll_github)
128+
public void onOpenSourceClick() {
129+
AppRoute.jumpToWeb(this.getContext(), getString(R.string.github_url));
130+
}
131+
132+
/**
133+
* 开源许可
134+
*/
135+
@OnClick(R.id.ll_open_source)
136+
public void onOpenSourceLicenseClick() {
137+
AppRoute.jumpToWeb(this.getContext(), getString(R.string.github_url));
138+
}
139+
122140
/**
123141
* 好评
124142
*/

app/src/main/java/com/rae/cnblogs/fragment/MineFragment.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,6 @@ public void onFeedbackClick() {
200200
AppRoute.jumpToFeedback(getContext());
201201
}
202202

203-
/**
204-
* 开源项目
205-
*/
206-
@OnClick(R.id.ll_github)
207-
public void onOpenSourceClick() {
208-
AppRoute.jumpToWeb(this.getContext(), getString(R.string.github_url));
209-
}
210203

211204
/**
212205
* 设置
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
package com.rae.cnblogs.fragment;
2+
3+
import android.os.Bundle;
4+
import android.support.annotation.Nullable;
5+
import android.text.Editable;
6+
import android.text.TextWatcher;
7+
import android.view.View;
8+
import android.widget.EditText;
9+
import android.widget.ImageView;
10+
import android.widget.TextView;
11+
12+
import com.rae.cnblogs.R;
13+
import com.rae.cnblogs.activity.BaseActivity;
14+
15+
import butterknife.BindView;
16+
import butterknife.OnClick;
17+
18+
/**
19+
* 搜索
20+
* Created by ChenRui on 2017/8/28 0028 14:51.
21+
*/
22+
public class SearchFragment extends BaseActivity {
23+
@BindView(R.id.et_search_text)
24+
EditText mSearchView;
25+
@BindView(R.id.img_edit_delete)
26+
ImageView mDeleteView;
27+
28+
@BindView(R.id.btn_search)
29+
TextView mSearchButton;
30+
31+
// @Override
32+
protected int getLayoutId() {
33+
return R.layout.fm_search;
34+
}
35+
36+
@Override
37+
protected void onCreate(@Nullable Bundle savedInstanceState) {
38+
super.onCreate(savedInstanceState);
39+
setContentView(getLayoutId());
40+
41+
mSearchView.addTextChangedListener(new TextWatcher() {
42+
@Override
43+
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
44+
45+
}
46+
47+
@Override
48+
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
49+
int length = mSearchView.length();
50+
mDeleteView.setVisibility(length > 0 ? View.VISIBLE : View.GONE);
51+
mSearchButton.setSelected(length > 0);
52+
if (length > 0) {
53+
mSearchButton.setText(R.string.search);
54+
} else {
55+
mSearchButton.setText(R.string.cancel);
56+
}
57+
}
58+
59+
@Override
60+
public void afterTextChanged(Editable editable) {
61+
62+
}
63+
});
64+
65+
66+
}
67+
68+
@OnClick(R.id.rl_edit_delete)
69+
public void onEditDeleteClick() {
70+
mSearchView.setText("");
71+
}
72+
73+
@OnClick(R.id.btn_search)
74+
public void onSearchClick() {
75+
if (mSearchButton.isSelected()) {
76+
// 执行搜索
77+
} else {
78+
// 退出
79+
finish();
80+
}
81+
}
82+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:color="@color/colorPrimaryDark" android:state_selected="true"/>
4+
<item android:color="@color/ph1"/>
5+
</selector>
898 Bytes
Loading
875 Bytes
Loading
941 Bytes
Loading
556 Bytes
Loading
250 Bytes
Loading
Loading
Loading
Loading
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<item>
5+
<color android:color="@color/background_divider_night"/>
6+
</item>
7+
8+
<item android:bottom="1dp">
9+
<color android:color="@color/navBar_night"/>
10+
</item>
11+
</layer-list>

app/src/main/res/drawable/ic_eyes.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:drawable="@drawable/ic_eyes_open" android:state_checked="true"/>
4+
<item android:drawable="@drawable/ic_eyes_closed"/>
5+
</selector>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--公共的白色底部分割线背景-->
3+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
4+
5+
<item android:state_pressed="true">
6+
<layer-list>
7+
8+
<!--分割线颜色-->
9+
<item>
10+
<color android:color="@color/dividerColor_night"/>
11+
</item>
12+
13+
<item android:bottom="0.5dp">
14+
<color android:color="@color/white_night"/>
15+
</item>
16+
17+
18+
</layer-list>
19+
</item>
20+
21+
<item android:state_focused="true">
22+
23+
<layer-list>
24+
25+
<!--分割线颜色-->
26+
<item>
27+
<color android:color="@color/colorPrimary_night"/>
28+
</item>
29+
30+
<item android:bottom="0.5dp">
31+
<color android:color="@color/white_night"/>
32+
</item>
33+
34+
35+
</layer-list>
36+
</item>
37+
38+
<item>
39+
40+
<layer-list>
41+
42+
<!--分割线颜色-->
43+
<item>
44+
<color android:color="@color/dividerColor_night"/>
45+
</item>
46+
47+
<item android:bottom="0.5dp">
48+
<color android:color="@color/white_night"/>
49+
</item>
50+
51+
52+
</layer-list>
53+
</item>
54+
</selector>

app/src/main/res/drawable/setting_divider_while_primary.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</item>
1212

1313
<item android:bottom="0.5dp">
14-
<color android:color="@color/white"/>
14+
<color android:color="@color/background_divider"/>
1515
</item>
1616

1717

Loading
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape android:shape="rectangle"
3+
xmlns:android="http://schemas.android.com/apk/res/android">
4+
<solid android:color="@android:color/transparent" />
5+
<stroke android:width="1dp"
6+
android:color="#ffffff"
7+
8+
/>
9+
10+
11+
</shape>
907 Bytes
Loading
Loading
Loading
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape android:shape="rectangle"
3+
xmlns:android="http://schemas.android.com/apk/res/android">
4+
<solid android:color="@android:color/transparent" />
5+
<stroke android:width="1dp"
6+
android:color="#C3C6C9"
7+
8+
/>
9+
10+
11+
</shape>
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)