Skip to content

Commit 883f2f1

Browse files
author
ChenRui
committed
登录UI优化
1 parent 52319cd commit 883f2f1

File tree

10 files changed

+40
-27
lines changed

10 files changed

+40
-27
lines changed

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,21 @@ private void preformLogin() {
219219

220220
@OnClick(R.id.ll_login_contract)
221221
public void onLoginContractClick() {
222-
mLoginContractDialog.setOnDismissListener(null);
223-
mLoginContractDialog.show();
222+
// mLoginContractDialog.setOnDismissListener(null);
223+
// mLoginContractDialog.show();
224+
225+
HintCardDialog dialog = new HintCardDialog(this);
226+
dialog.setMessage(getString(R.string.login_help_message));
227+
dialog.setEnSureText(getString(R.string.go_now));
228+
dialog.setOnEnSureListener(new IAppDialogClickListener() {
229+
@Override
230+
public void onClick(IAppDialog dialog, int buttonType) {
231+
dialog.dismiss();
232+
AppRoute.jumpToWeb(getContext(), getContext().getString(R.string.url_login_help));
233+
}
234+
});
235+
dialog.showCloseButton();
236+
dialog.show();
224237
}
225238

226239

app/src/main/java/com/rae/cnblogs/image/ImagePreviewActivity.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import android.Manifest;
44
import android.content.Intent;
55
import android.content.pm.PackageManager;
6-
import android.content.res.Resources;
76
import android.net.Uri;
87
import android.os.Bundle;
98
import android.os.Environment;
@@ -22,6 +21,7 @@
2221
import com.rae.cnblogs.AppUI;
2322
import com.rae.cnblogs.GlideApp;
2423
import com.rae.cnblogs.R;
24+
import com.rae.cnblogs.RaeAnim;
2525
import com.rae.cnblogs.ThemeCompat;
2626
import com.rae.cnblogs.activity.BaseActivity;
2727

@@ -40,7 +40,6 @@
4040
import io.reactivex.functions.Function;
4141
import io.reactivex.observers.DefaultObserver;
4242
import io.reactivex.schedulers.Schedulers;
43-
import skin.support.SkinCompatManager;
4443

4544
/**
4645
* 图片预览
@@ -63,6 +62,9 @@ public class ImagePreviewActivity extends BaseActivity implements ViewPager.OnPa
6362
@BindView(R.id.view_holder)
6463
View mNightView;
6564

65+
@BindView(R.id.rl_content)
66+
View mContentView;
67+
6668
ImageAdapter mAdapter;
6769

6870
@Override
@@ -99,6 +101,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
99101

100102
@Override
101103
public void finish() {
104+
RaeAnim.fadeOut(mCloseView);
102105
super.finish();
103106
overridePendingTransition(0, R.anim.image_scale_out);
104107
}

app/src/main/res/anim/image_scale_in.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
<scale
66
android:duration="300"
7-
android:fromXScale="90%p"
8-
android:fromYScale="90%p"
7+
android:fromXScale="80%p"
8+
android:fromYScale="80%p"
99
android:pivotX="50%"
1010
android:pivotY="50%"
1111
android:toXScale="100%p"
1212
android:toYScale="100%p"/>
1313
<alpha
1414
android:duration="300"
15-
android:fromAlpha="0.5"
15+
android:fromAlpha="0"
1616
android:toAlpha="1"/>
1717
</set>

app/src/main/res/anim/image_scale_out.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
android:pivotX="50%"
1212
android:pivotY="50%"
1313
android:startOffset="50"
14-
android:toXScale="90%p"
15-
android:toYScale="90%p"/>
14+
android:toXScale="80%p"
15+
android:toYScale="80%p"/>
1616

1717
<alpha
1818
android:duration="300"
1919
android:fromAlpha="1"
20-
android:toAlpha="0.5"/>
20+
android:toAlpha="0"/>
2121
</set>
Loading
Loading

app/src/main/res/layout/activity_image_preview.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<RelativeLayout
3+
android:id="@+id/rl_content"
34
xmlns:android="http://schemas.android.com/apk/res/android"
45
android:layout_width="match_parent"
56
android:layout_height="match_parent"

app/src/main/res/layout/activity_login.xml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
android:paddingBottom="12dp"
3030
android:paddingLeft="12dp"
3131
android:paddingRight="12dp"
32-
android:paddingTop="12dp"
32+
android:paddingTop="32dp"
3333
android:scaleType="center"
34-
android:src="@drawable/ic_back_closed"/>
34+
android:src="@drawable/login_btn_close"/>
3535

3636
</RelativeLayout>
3737

@@ -171,29 +171,22 @@
171171
android:id="@+id/ll_login_contract"
172172
android:layout_width="match_parent"
173173
android:layout_height="wrap_content"
174-
android:gravity="bottom">
175-
176-
<TextView
177-
android:layout_width="wrap_content"
178-
android:layout_height="wrap_content"
179-
android:gravity="center"
180-
android:text="@string/login_tips"
181-
android:textColor="@color/ph4"
182-
android:textSize="12sp"
183-
android:visibility="gone"/>
174+
android:gravity="center"
175+
android:orientation="horizontal">
184176

185177
<TextView
186178
android:id="@+id/tv_login_contract"
187-
android:layout_width="match_parent"
179+
android:layout_width="wrap_content"
188180
android:layout_height="wrap_content"
189-
android:gravity="center"
190181
android:paddingBottom="36dp"
191182
android:paddingTop="12dp"
192-
android:text="@string/login_contract"
183+
android:text="@string/login_tips"
193184
android:textColor="@color/ph4"
194185
android:textSize="10sp"/>
186+
195187
</LinearLayout>
196188

189+
197190
</LinearLayout>
198191

199192

app/src/main/res/layout/item_system_message.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
android:layout_width="match_parent"
55
android:layout_height="wrap_content"
66
android:orientation="vertical"
7+
android:layout_marginTop="10dp"
78
android:paddingLeft="10dp"
89
android:paddingRight="10dp">
910

@@ -12,7 +13,7 @@
1213
android:layout_height="wrap_content"
1314
android:background="@drawable/bg_message_card"
1415
app:cardCornerRadius="4dp"
15-
app:cardElevation="10dp"
16+
app:cardElevation="4dp"
1617
app:cardPreventCornerOverlap="false"
1718
app:cardUseCompatPadding="true"
1819
app:contentPadding="5dp">

app/src/main/res/values/strings.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<string name="nomore_loading"> ——阅读完毕——</string>
3131
<string name="no_more_tips">全部加载完毕</string>
3232
<string name="register">注册</string>
33-
<string name="login_tips">登录即表示同意</string>
33+
<string name="login_tips">登录遇到问题?</string>
3434
<string name="login_contract">博客园APP隐私说明</string>
3535
<string name="login_contract_content">博客园APP已经开源,登录过程我们会收集您遇到的错误信息以及您的博客名称,但我们不会收集您的帐号密码信息,请放心登录。\n\n您在登录过程如有任何问题请前往设置-帮助中心查找原因,或者联系博客园官方团队contact@cnblogs.com。</string>
3636
<string name="login_user_name_hint">用户名</string>
@@ -110,4 +110,6 @@
110110
<string name="url_license">http://www.raeblog.com/cnblogs/license.html</string>
111111
<string name="system_message">系统消息</string>
112112
<string name="url_signin">https://passport.cnblogs.com/user/signin</string>
113+
<string name="login_help_message">登录遇到问题您可以点击立即前往查看相关的问题以及原因,或者截图向我们进行意见反馈。</string>
114+
<string name="url_login_help">http://www.raeblog.com/cnblogs/loginHelp.html</string>
113115
</resources>

0 commit comments

Comments
 (0)