Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

Commit 74c62df

Browse files
committed
专栏微调2
1 parent 7815356 commit 74c62df

File tree

12 files changed

+93
-50
lines changed

12 files changed

+93
-50
lines changed

‎module-discover/src/main/java/com/rae/cnblogs/discover/column/detail/AntUserColumnDetailAdapter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
import android.content.Context;
44
import android.support.annotation.Nullable;
5+
import android.widget.ImageView;
56

67
import com.antcode.sdk.model.AntArticleInfo;
78
import com.chad.library.adapter.base.BaseViewHolder;
9+
import com.rae.cnblogs.basic.AppImageLoader;
810
import com.rae.cnblogs.discover.R;
911
import com.rae.cnblogs.discover.RaeBaseQuickAdapter;
1012

@@ -19,6 +21,7 @@ public AntUserColumnDetailAdapter(Context context, @Nullable List<AntArticleInfo
1921

2022
@Override
2123
protected void convert(BaseViewHolder helper, AntArticleInfo item) {
24+
AppImageLoader.display(item.getImageUrl(), (ImageView) helper.getView(R.id.img_cover));
2225
helper.setText(R.id.tv_title, item.getTitle());
2326
helper.setText(R.id.tv_summary, item.getSummary());
2427
}

‎module-discover/src/main/java/com/rae/cnblogs/discover/fragment/AntColumnFragment.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ protected void onReceiveArguments(@NonNull Bundle arguments) {
7777
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
7878
super.onViewCreated(view, savedInstanceState);
7979
int itemLayoutId = mType == IAntColumnContract.TYPE_MY ? R.layout.item_discover_mine_column : R.layout.item_discover_home_column;
80-
mAdapter = new AntColumnAdapter(getContext(), itemLayoutId);
80+
mAdapter = new AntColumnAdapter(getContext(), itemLayoutId, mType);
8181
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
8282
mRecyclerView.setAdapter(mAdapter);
8383
mRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@@ -179,8 +179,11 @@ public void onLoginExpired() {
179179

180180
class AntColumnAdapter extends RaeBaseQuickAdapter<AntColumnInfo, BaseViewHolder> {
181181

182-
AntColumnAdapter(Context context, int layoutId) {
182+
private final int mItemType;
183+
184+
AntColumnAdapter(Context context, int layoutId, int itemType) {
183185
super(context, layoutId, null);
186+
this.mItemType = itemType;
184187
}
185188

186189
@Override
@@ -191,8 +194,7 @@ protected void initView(Context context) {
191194

192195
@Override
193196
protected void convert(BaseViewHolder helper, AntColumnInfo item) {
194-
int itemType = getLayoutId() == R.layout.item_discover_mine_column ? AntColumnHolder.TYPE_MINE : AntColumnHolder.TYPE_NORMAL;
195-
AntColumnHolder holder = new AntColumnHolder(helper, itemType);
197+
AntColumnHolder holder = new AntColumnHolder(helper, mItemType);
196198
holder.bindData(item);
197199
}
198200
}

‎module-discover/src/main/java/com/rae/cnblogs/discover/web/AntColumnWebViewActivity.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
package com.rae.cnblogs.discover.web;
22

3+
import android.content.res.ColorStateList;
4+
import android.os.Build;
5+
import android.os.Bundle;
6+
import android.support.annotation.Nullable;
7+
import android.support.v4.content.ContextCompat;
8+
39
import com.alibaba.android.arouter.facade.annotation.Route;
410
import com.qmuiteam.qmui.util.QMUIDisplayHelper;
511
import com.rae.cnblogs.AppRoute;
@@ -27,4 +33,12 @@ protected int backViewInitOffset() {
2733
protected int getHomeAsUpIndicator() {
2834
return 0;
2935
}
36+
37+
@Override
38+
protected void onCreate(@Nullable Bundle savedInstanceState) {
39+
super.onCreate(savedInstanceState);
40+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
41+
mShareView.setImageTintList(ColorStateList.valueOf(ContextCompat.getColor(this, R.color.black)));
42+
}
43+
}
3044
}

‎module-discover/src/main/res/drawable/bg_mask_modal.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
<gradient
55
android:angle="90"
66
android:endColor="#00000000"
7-
android:startColor="#80000000" />
7+
android:startColor="#40000000" />
88
</shape>

‎module-discover/src/main/res/layout/activity_ant_web.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
android:layout_height="wrap_content"
5757
android:padding="@dimen/default_margin"
5858
android:scaleType="centerCrop"
59-
android:src="@drawable/icon_share_black" />
59+
android:src="@drawable/icon_share_black"
60+
android:tint="@color/black" />
6061
</LinearLayout>
6162
</android.support.v7.widget.Toolbar>
6263

‎module-discover/src/main/res/layout/item_column_detail_header.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
android:layout_width="match_parent"
1616
android:layout_height="match_parent"
1717
android:scaleType="centerCrop"
18-
android:src="@drawable/bg_blogger_blur"
18+
android:src="@color/background_divider"
1919
app:layout_collapseMode="parallax"
2020
app:layout_collapseParallaxMultiplier="0.7"
2121
app:layout_constraintEnd_toEndOf="parent"
@@ -26,7 +26,7 @@
2626
<ImageView
2727
android:layout_width="match_parent"
2828
android:layout_height="match_parent"
29-
android:background="#3C000000"
29+
android:background="#26000000"
3030
app:layout_collapseMode="parallax"
3131
app:layout_collapseParallaxMultiplier="0.7" />
3232

@@ -44,14 +44,16 @@
4444
android:layout_marginStart="24dp"
4545
android:layout_marginBottom="1dp"
4646
android:text="Android开发高手课"
47-
android:textColor="#FFFFFFFF"
48-
android:textSize="21sp" />
47+
android:textColor="#CCFFFFFF"
48+
android:textSize="21sp"
49+
android:visibility="invisible" />
4950

5051
<TextView
5152
android:id="@+id/tv_sub_title"
5253
android:layout_width="wrap_content"
5354
android:layout_height="wrap_content"
5455
android:layout_marginStart="24dp"
56+
android:layout_marginEnd="24dp"
5557
android:layout_marginBottom="16dp"
5658
android:text="Android开发高手课"
5759
android:textColor="#FFFFFFFF"

‎module-discover/src/main/res/layout/item_discover_home_column.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<ImageView
2525
android:id="@+id/img_logo"
2626
android:layout_width="match_parent"
27-
android:layout_height="140dp"
27+
android:layout_height="160dp"
2828
android:scaleType="centerCrop"
2929
android:src="@drawable/default_placeholder_normal"
3030
app:layout_constraintEnd_toEndOf="parent"
Lines changed: 54 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,60 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:app="http://schemas.android.com/apk/res-auto"
1+
<?xml version="1.0" encoding="utf-8"?><!--<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"--><!--xmlns:app="http://schemas.android.com/apk/res-auto"--><!--android:layout_width="match_parent"--><!--android:layout_height="wrap_content"--><!--android:layout_marginStart="12dp"--><!--android:layout_marginTop="16dp"--><!--android:layout_marginEnd="12dp"--><!--android:orientation="vertical"--><!--app:cardBackgroundColor="@color/white"--><!--app:cardCornerRadius="4dp"--><!--app:cardElevation="12dp"--><!--app:contentPadding="20dp">-->
2+
3+
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
44
android:layout_width="match_parent"
55
android:layout_height="wrap_content"
6-
android:layout_marginStart="12dp"
7-
android:layout_marginTop="16dp"
8-
android:layout_marginEnd="12dp"
6+
android:layout_marginTop="12dp"
7+
android:background="@color/white"
98
android:orientation="vertical"
10-
app:cardBackgroundColor="@color/white"
11-
app:cardCornerRadius="4dp"
12-
app:cardElevation="0.5dp"
13-
app:contentPadding="20dp">
9+
android:paddingStart="12dp"
10+
android:paddingTop="24dp"
11+
android:paddingEnd="12dp"
12+
android:paddingBottom="14dp">
13+
14+
<TextView
15+
android:id="@+id/tv_title"
16+
android:layout_width="match_parent"
17+
android:layout_height="wrap_content"
18+
android:text="01 为什么在基于ASP.NET应用寄宿下配置的BaseAddress无效"
19+
android:textColor="@color/black"
20+
android:textSize="18sp" />
21+
22+
<ImageView
23+
android:id="@+id/img_cover"
24+
android:layout_width="match_parent"
25+
android:layout_height="160dp"
26+
android:layout_marginTop="14dp"
27+
android:scaleType="centerCrop"
28+
android:src="@drawable/default_placeholder_normal" />
29+
30+
<TextView
31+
android:id="@+id/tv_summary"
32+
android:layout_width="match_parent"
33+
android:layout_height="wrap_content"
34+
android:layout_marginTop="18dp"
35+
android:lineSpacingMultiplier="1.2"
36+
android:text="为什么在基于ASP.NET应用寄宿下配置的BaseAddress无效"
37+
android:textColor="#FF878C97"
38+
android:textSize="14sp" />
1439

15-
<LinearLayout
40+
41+
<View
42+
android:layout_width="match_parent"
43+
android:layout_height="0.5dp"
44+
android:layout_marginTop="18dp"
45+
android:alpha="0.8"
46+
android:background="@color/dividerColor" />
47+
48+
<TextView
1649
android:layout_width="match_parent"
1750
android:layout_height="wrap_content"
18-
android:orientation="vertical">
19-
20-
<TextView
21-
android:id="@+id/tv_title"
22-
android:layout_width="match_parent"
23-
android:layout_height="wrap_content"
24-
android:text="01 为什么在基于ASP.NET应用寄宿下配置的BaseAddress无效"
25-
android:textColor="@color/black"
26-
android:textSize="18sp" />
27-
28-
<TextView
29-
android:id="@+id/tv_summary"
30-
android:layout_width="match_parent"
31-
android:layout_height="wrap_content"
32-
android:layout_marginTop="14dp"
33-
android:lineSpacingMultiplier="1.2"
34-
android:text="为什么在基于ASP.NET应用寄宿下配置的BaseAddress无效"
35-
android:textColor="#FF878C97"
36-
android:textSize="14sp" />
37-
</LinearLayout>
38-
</android.support.v7.widget.CardView>
51+
android:layout_marginTop="14dp"
52+
android:drawableEnd="@drawable/default_right_arrow"
53+
android:lineSpacingMultiplier="1.2"
54+
android:text="阅读全文"
55+
android:textColor="@color/ph4"
56+
android:textSize="14sp" />
57+
58+
</LinearLayout>
59+
60+
<!--</android.support.v7.widget.CardView>-->

‎module-discover/src/main/res/layout/item_user_column_detail_header.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,10 @@
4747
android:id="@+id/img_cover"
4848
android:layout_width="100dp"
4949
android:layout_height="120dp"
50-
android:layout_marginEnd="10dp"
51-
android:background="@color/background_divider"
50+
android:layout_marginEnd="18dp"
5251
android:scaleType="centerCrop"
5352
android:src="@color/background_divider"
54-
app:riv_corner_radius="8dp" />
53+
app:riv_corner_radius="2dp" />
5554

5655

5756
<!--标题-->

‎module-home/src/main/java/com/rae/cnblogs/home/LauncherActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected void onPause() {
6969
* 显示图片
7070
*/
7171
private void showImage(String url) {
72-
Log.i("Rae", "加载图片:" + url);
72+
// Log.i("Rae", "加载图片:" + url);
7373
AppImageLoader.displayWithoutPlaceHolder(url, mDisplayView);
7474
}
7575

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /