Skip to content

Commit 09ee4ec

Browse files
committed
fix ui
1 parent 9b416b3 commit 09ee4ec

24 files changed

+304
-507
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
CodeBlog是为了方便在手机端阅读编程技术博文。集成展示了CSDN博客、InfoQ、开源中国和ITEye上的技术博文,并提供了技术类型的选择,如移动开发、数据库、云计算等,让你随时随地都可以轻松阅读技术大牛的文章。
22

33
目前已实现的功能:
4-
- 博客查看、收藏与分享;
5-
- 博文高亮显示代码;
6-
- CSDN博客搜索;
7-
- 分享博文或应用到QQ好友;
8-
- 机器人陪聊;
9-
- 文章推送;
10-
- 查看博主文章列表;
4+
- 博客查看、收藏与分享;
5+
- 博文高亮显示代码;
6+
- CSDN博客搜索;
7+
- 分享博文或应用到QQ好友;
8+
- 机器人陪聊;
9+
- 文章推送;
10+
- 查看博主文章列表;
1111

1212
---
1313
####更新日志:
14+
v1.3.81
15+
- 增加夜间模式;
16+
- 增加搜索历史记录;
17+
- 优化关闭广告;
18+
1419
v1.3.80
1520
- 优化应用整体体验;
1621
- 调整代码结构;

app/src/main/java/com/brian/codeblog/activity/BlogListFrag.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import com.brian.codeblog.datacenter.preference.SettingPreference;
2626
import com.brian.codeblog.manager.AdHelper;
2727
import com.brian.codeblog.manager.BlogManager;
28-
import com.brian.common.tools.ThreadManager;
2928
import com.brian.codeblog.manager.TypeManager;
3029
import com.brian.codeblog.manager.UsageStatsManager;
3130
import com.brian.codeblog.model.BlogInfo;
@@ -36,6 +35,7 @@
3635
import com.brian.codeblog.proctocol.HttpGetBlogListRequest;
3736
import com.brian.codeblog.proctocol.base.IResponseCallback;
3837
import com.brian.common.tools.CommonAdapter;
38+
import com.brian.common.tools.ThreadManager;
3939
import com.brian.common.utils.FileUtil;
4040
import com.brian.common.utils.LogUtil;
4141
import com.brian.common.utils.ResourceUtil;
@@ -287,7 +287,7 @@ private void initData() {
287287
ThreadManager.getPoolProxy().execute(new Runnable() {
288288
@Override
289289
public void run() {
290-
LogUtil.log("mType=" + mType);
290+
LogUtil.log("mType=" + Integer.toHexString(mType));
291291
try {
292292
String cachedStr = FileUtil.getFileContent(Env.getContext().getFilesDir() + "/cache_" + mType);
293293
final List<BlogInfo> list = new Gson().fromJson(cachedStr, new TypeToken<List<BlogInfo>>() {} .getType());

app/src/main/java/com/brian/codeblog/activity/BlogerBlogListActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected void onCreate(Bundle savedInstanceState) {
5757
return;
5858
}
5959
if (!TextUtils.isEmpty(bloger.nickName)) {
60-
mTitleBar.setTitle(bloger.nickName + "的博客");
60+
mTitleBar.setTitle(bloger.nickName);
6161
}
6262
BlogerManager.getsInstance().setCurrBloger(bloger);
6363
mTitleBar.setLeftListener(new OnClickListener() {

app/src/main/java/com/brian/codeblog/activity/SlideMenuLayout.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,13 @@ public class SlideMenuLayout extends FrameLayout implements OnClickListener {
3939
@BindView(R.id.bloger) View mBlogerLy; // 博主
4040
@BindView(R.id.bloger_head) CircleImageView mBlogerHeadView; // 博主头像
4141
@BindView(R.id.bloger_name) TextView mBlogerNameView; // 博主名
42-
@BindView(R.id.select_article_type) View mSelectTypeLy; // 设置类型
42+
@BindView(R.id.select_article_type) TextView mSelectTypeView; // 设置类型
4343
@BindView(R.id.blog_history) View mHistoryLy;
4444
@BindView(R.id.blog_favo) View mFavoLy;
4545
@BindView(R.id.news) View mNewsLy;
4646
@BindView(R.id.aboutView) View mAboutLy;
4747
@BindView(R.id.settings) View mSettingsLy;
4848
@BindView(R.id.chat) View viewChat;
49-
@BindView(R.id.tv_select_type) TextView mSelectTypeView;
5049

5150
public SlideMenuLayout(Context context) {
5251
this(context, null, 0);
@@ -70,7 +69,7 @@ private void initUI() {
7069
mSelectTypeView.setText(TypeManager.getCurrCateName());
7170

7271
mBlogerLy.setOnClickListener(this);
73-
mSelectTypeLy.setOnClickListener(this);
72+
mSelectTypeView.setOnClickListener(this);
7473
mFavoLy.setOnClickListener(this);
7574
mNewsLy.setOnClickListener(this);
7675
mHistoryLy.setOnClickListener(this);
@@ -79,7 +78,7 @@ private void initUI() {
7978
viewChat.setOnClickListener(this);
8079

8180
Bloger bloger = BlogerManager.getsInstance().getCurrBloger();
82-
mBlogerNameView.setText(bloger.nickName + "的博客");
81+
mBlogerNameView.setText(bloger.nickName);
8382
LogUtil.log("headUrl=" + bloger.headUrl);
8483
if (TextUtils.isEmpty(bloger.headUrl)) {
8584
mBlogerHeadView.setImageResource(R.drawable.ic_default_user);
@@ -158,7 +157,7 @@ protected void onAttachedToWindow() {
158157
*/
159158
@Subscribe
160159
public void onEventMainThread(CurrBlogerEvent event) {
161-
mBlogerNameView.setText(event.bloger.nickName + "的博客");
160+
mBlogerNameView.setText(event.bloger.nickName);
162161
LogUtil.log("headUrl=" + event.bloger.headUrl);
163162
if (TextUtils.isEmpty(event.bloger.headUrl)) {
164163
mBlogerHeadView.setImageResource(R.drawable.ic_default_user);

app/src/main/java/com/brian/codeblog/parser/BlogHtmlParserFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class BlogHtmlParserFactory {
1515
* @return
1616
*/
1717
public static IBlogHtmlParser getBlogParser(int type) {
18-
LogUtil.log("type=" + type);
18+
LogUtil.log("type=" + Integer.toHexString(type));
1919
IBlogHtmlParser parser = null;
2020
int webType = TypeManager.getWebType(type);
2121
switch (webType) {

app/src/main/java/com/brian/common/utils/SDKUtil.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,10 @@ public static void showSoftInputOnfocus(EditText editText, boolean show) {
8585
editText.setShowSoftInputOnFocus(show);
8686
}
8787
}
88+
89+
public static void setElevation(View view, float elevation) {
90+
if (VERSION.SDK_INT > VERSION_CODES.LOLLIPOP) {
91+
view.setElevation(elevation);
92+
}
93+
}
8894
}
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+
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:color="#666" >
4+
<item android:drawable="@color/sidemenu_bg" />
5+
</ripple>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:color="#888888" >
4-
<item android:drawable="@drawable/bg_bloglist_item" />
3+
android:color="#888" >
4+
<item android:drawable="@color/bloglist_item_bg" />
55
</ripple>
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+
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:color="#436EEE" >
4+
<item android:drawable="@color/sidemenu_bg" />
5+
</ripple>
-4.73 KB
Binary file not shown.

0 commit comments

Comments
 (0)