优化包体积

master
Z 4 years ago
parent f57a981cc0
commit feca1a1c3d
  1. 3
      app/build.gradle
  2. 6
      app/src/main/java/com/novel/read/ui/widget/HeadLayout.java
  3. BIN
      app/src/main/res/drawable-night-xxhdpi/ic_arrow_right.png
  4. BIN
      app/src/main/res/drawable-night-xxhdpi/ic_arrow_right.webp
  5. BIN
      app/src/main/res/drawable-night-xxhdpi/ic_go_add.png
  6. BIN
      app/src/main/res/drawable-night-xxhdpi/ic_go_add.webp
  7. BIN
      app/src/main/res/drawable-night-xxhdpi/ic_net_error.png
  8. BIN
      app/src/main/res/drawable-night-xxhdpi/ic_net_error.webp
  9. BIN
      app/src/main/res/drawable-night-xxhdpi/ic_no_data.png
  10. BIN
      app/src/main/res/drawable-night-xxhdpi/ic_no_data.webp
  11. BIN
      app/src/main/res/drawable-xxhdpi/ic_appraise.png
  12. BIN
      app/src/main/res/drawable-xxhdpi/ic_appraise.webp
  13. BIN
      app/src/main/res/drawable-xxhdpi/ic_arrow_right.png
  14. BIN
      app/src/main/res/drawable-xxhdpi/ic_arrow_right.webp
  15. BIN
      app/src/main/res/drawable-xxhdpi/ic_book_end.png
  16. BIN
      app/src/main/res/drawable-xxhdpi/ic_book_end.webp
  17. BIN
      app/src/main/res/drawable-xxhdpi/ic_book_type.png
  18. BIN
      app/src/main/res/drawable-xxhdpi/ic_book_type.webp
  19. BIN
      app/src/main/res/drawable-xxhdpi/ic_click.png
  20. BIN
      app/src/main/res/drawable-xxhdpi/ic_click.webp
  21. BIN
      app/src/main/res/drawable-xxhdpi/ic_daily.png
  22. BIN
      app/src/main/res/drawable-xxhdpi/ic_daily.webp
  23. BIN
      app/src/main/res/drawable-xxhdpi/ic_delete_search.png
  24. BIN
      app/src/main/res/drawable-xxhdpi/ic_delete_search.webp
  25. BIN
      app/src/main/res/drawable-xxhdpi/ic_end.png
  26. BIN
      app/src/main/res/drawable-xxhdpi/ic_end.webp
  27. BIN
      app/src/main/res/drawable-xxhdpi/ic_geng.png
  28. BIN
      app/src/main/res/drawable-xxhdpi/ic_geng.webp
  29. BIN
      app/src/main/res/drawable-xxhdpi/ic_go_add.png
  30. BIN
      app/src/main/res/drawable-xxhdpi/ic_go_add.webp
  31. BIN
      app/src/main/res/drawable-xxhdpi/ic_go_appraise.png
  32. BIN
      app/src/main/res/drawable-xxhdpi/ic_go_appraise.webp
  33. BIN
      app/src/main/res/drawable-xxhdpi/ic_hot.png
  34. BIN
      app/src/main/res/drawable-xxhdpi/ic_hot.webp
  35. BIN
      app/src/main/res/drawable-xxhdpi/ic_hot_search.png
  36. BIN
      app/src/main/res/drawable-xxhdpi/ic_hot_search.webp
  37. BIN
      app/src/main/res/drawable-xxhdpi/ic_idea.png
  38. BIN
      app/src/main/res/drawable-xxhdpi/ic_idea.webp
  39. BIN
      app/src/main/res/drawable-xxhdpi/ic_net_error.png
  40. BIN
      app/src/main/res/drawable-xxhdpi/ic_net_error.webp
  41. BIN
      app/src/main/res/drawable-xxhdpi/ic_no_data.png
  42. BIN
      app/src/main/res/drawable-xxhdpi/ic_no_data.webp
  43. BIN
      app/src/main/res/drawable-xxhdpi/ic_rank.png
  44. BIN
      app/src/main/res/drawable-xxhdpi/ic_rank.webp
  45. BIN
      app/src/main/res/drawable-xxhdpi/ic_recommend.png
  46. BIN
      app/src/main/res/drawable-xxhdpi/ic_recommend.webp
  47. BIN
      app/src/main/res/drawable-xxhdpi/ic_setting.png
  48. BIN
      app/src/main/res/drawable-xxhdpi/ic_setting.webp
  49. 5
      app/src/main/res/drawable/bg_banner.xml
  50. 5
      app/src/main/res/drawable/bg_google_login.xml
  51. 18
      app/src/main/res/drawable/ic_google.xml
  52. 62
      app/src/main/res/layout/activity_login.xml
  53. 42
      app/src/main/res/layout/activity_vip_shop.xml
  54. 2
      app/src/main/res/layout/fragment_mine.xml
  55. 20
      app/src/main/res/layout/view_dynamic.xml
  56. 11
      app/src/main/res/layout/view_tab_layout_min.xml
  57. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher.png
  58. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  59. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher.png
  60. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  61. BIN
      app/src/main/res/mipmap-xhdpi/bg_splash.png
  62. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher.png
  63. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  64. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  65. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  66. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  67. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  68. 1
      build.gradle

@ -25,6 +25,9 @@ android {
abiFilters "armeabi", "arm64-v8a"// "armeabi-v7a",
}
multiDexEnabled true
resConfigs "zh", "zh-rCN"
resConfigs "zh", "zh-rTW"
resConfigs "zh", "zh-rHK"
}
signingConfigs {

@ -34,10 +34,10 @@ public class HeadLayout extends LinearLayout {
TypedArray typedArray = getContext().obtainStyledAttributes(attrs, R.styleable.HeadLayout);
boolean showHead = typedArray.getBoolean(R.styleable.HeadLayout_showHead, true);
int headText=typedArray.getResourceId(R.styleable.HeadLayout_headText,R.string.empty_info);
int headImg= typedArray.getResourceId(R.styleable.HeadLayout_headImg, R.mipmap.ic_launcher);
int headImg= typedArray.getResourceId(R.styleable.HeadLayout_headImg, R.mipmap.icon_read_book);
boolean showRight = typedArray.getBoolean(R.styleable.HeadLayout_showRightText, true);
int rightText=typedArray.getResourceId(R.styleable.HeadLayout_rightText,R.string.empty_info);
int rightImg=typedArray.getResourceId(R.styleable.HeadLayout_rightImg,R.mipmap.ic_launcher);
int rightImg=typedArray.getResourceId(R.styleable.HeadLayout_rightImg,R.mipmap.icon_read_book);
if (showHead){
mTvHead.setText(headText);
Drawable drawable = ContextCompat.getDrawable(getContext(), headImg);
@ -48,7 +48,7 @@ public class HeadLayout extends LinearLayout {
}
if (showRight){
mTvMore.setText(rightText);
if (rightImg!=R.mipmap.ic_launcher){
if (rightImg!=R.mipmap.icon_read_book){
Drawable drawable = ContextCompat.getDrawable(getContext(), rightImg);
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
mTvHead.setCompoundDrawables(null, null, drawable, null);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1012 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1015 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="5dp"/>
</shape>

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="20dp"/>
<solid android:color="@color/md_blue_400"/>
</shape>

@ -1,18 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M213.2,515.48c0,-33.48 5.63,-65.59 15.62,-95.69L53.45,287.16A511.05,511.05 0,0 0,0 515.48c0,82.05 19.2,159.44 53.35,228.15l175.31,-132.86c-10.24,-30.72 -15.44,-62.9 -15.46,-95.28"
android:fillColor="#ffffff"/>
<path
android:pathData="M521.24,210.94a303.36,303.36 0,0 1,191.87 67.89l151.63,-149.91C772.35,49.31 653.9,0.08 521.24,0.08 315.26,0.08 138.21,116.74 53.45,287.16l175.49,132.63c40.4,-121.5 155.6,-208.87 292.35,-208.87"
android:fillColor="#ffffff"/>
<path
android:pathData="M523.47,813.24c-137.47,0 -253.24,-86.81 -293.89,-207.56l-176.26,131.84C138.5,906.88 316.42,1022.77 523.47,1022.77c127.72,0 249.68,-44.39 341.25,-127.64l-167.35,-126.67c-47.18,29.11 -106.65,44.8 -173.95,44.8"
android:fillColor="#ffffff"/>
<path
android:pathData="M1023.44,510.62c0,-30.26 -4.79,-62.87 -11.9,-93.13H523.42v197.89H804.35c-14,67.48 -52.22,119.35 -106.96,153.09l167.32,126.67c96.18,-87.37 158.72,-217.55 158.72,-384.51"
android:fillColor="#ffffff"/>
</vector>

@ -1,62 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.login.LoginActivity">
<com.novel.read.ui.widget.TitleBar
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:attachToActivity="true"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:title="@string/user_login" />
<ImageView
android:id="@+id/iv_logo"
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@mipmap/icon_read_book"
android:layout_marginTop="80dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title_bar"/>
<TextView
android:id="@+id/tv_des"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_logo"
android:layout_margin="15dp"
android:textColor="@color/secondaryText"
android:text="@string/many_book_free"/>
<TextView
android:id="@+id/tv_g_login"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:gravity="center"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_des"
app:layout_constraintBottom_toBottomOf="parent"
android:background="@drawable/bg_login"
android:paddingVertical="10dp"
android:paddingHorizontal="25dp"
android:textColor="@color/white"
android:drawableStart="@drawable/ic_google"
android:drawablePadding="15dp"
android:text="@string/g_login"/>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.vip.VipShopActivity">
<com.novel.read.ui.widget.TitleBar
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:title=" " />
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textStyle="bold"
android:textSize="25sp"
android:textColor="@color/primaryText"
android:layout_marginStart="15dp"
android:layout_marginTop="5dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title_bar"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp"
android:text="成为会员即可享有完整体验。\n1、阅读无广告\n开通VIP会员可享受阅读无广告,畅享纯净阅读。\n2、更多个性化功能\n开通VIP会员可享:自定义阅读背景、自定义字体等会员权益。"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_name"/>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -60,7 +60,7 @@
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_marginStart="15dp"
android:src="@mipmap/ic_launcher"
android:src="@mipmap/icon_read_book"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ViewStub
android:id="@+id/errorViewStub"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout="@layout/view_net_error" />
<ViewStub
android:id="@+id/progressViewStub"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout="@layout/view_loading" />
</merge>

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.tabs.TabLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="?attr/actionBarStyle"
app:tabBackground="@android:color/transparent"
app:tabRippleColor="@android:color/transparent"
app:tabMaxWidth="100dp"
app:tabMinWidth="10dp" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

@ -30,3 +30,4 @@ allprojects {
task clean(type: Delete) {
delete rootProject.buildDir
}

Loading…
Cancel
Save