Skip to content
This repository was archived by the owner on Jun 8, 2024. It is now read-only.

Commit 8ac9a8e

Browse files
committed
Project: Fix
Signed-off-by: Fung <fython@163.com>
1 parent 9b6aa46 commit 8ac9a8e

5 files changed

Lines changed: 138 additions & 38 deletions

File tree

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
org.gradle.jvmargs=-Xmx1536m
22
BUILD_TOOLS_VERSION=26.0.1
3-
VERSION_NAME=2.9.9 Beta 1
3+
VERSION_NAME=2.9.9 Beta 2
44
TARGET_SDK_VERSION=26
5-
VERSION_CODE=41
5+
VERSION_CODE=42
66
MIN_SDK_VERSION=21

mobile/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ android {
1515
buildTypes {
1616
release {
1717
minifyEnabled false
18-
shrinkResources true
18+
shrinkResources false
1919
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2020
pseudoLocalesEnabled true
21-
zipAlignEnabled true
2221
}
2322
}
2423
sourceSets {

mobile/src/main/kotlin/info/papdt/express/helper/ui/fragment/settings/SettingsMain.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ class SettingsMain : AbsPrefFragment(), Preference.OnPreferenceClickListener, Pr
6868
}
6969

7070
override fun onCreatePreferences(bundle: Bundle?, s: String?) {
71-
addPreferencesFromResource(R.xml.settings_main)
71+
addPreferencesFromResource(
72+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M)
73+
R.xml.settings_main_old else R.xml.settings_main
74+
)
7275

7376
mPrefAlipay = findPreference("alipay")
7477

mobile/src/main/res/layout/activity_main.xml

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,48 +11,55 @@
1111
android:layout_height="wrap_content"
1212
android:background="?attr/colorPrimary">
1313

14-
<android.support.v7.widget.CardView
15-
android:id="@+id/toolbar_box"
14+
<FrameLayout
1615
android:layout_width="match_parent"
1716
android:layout_height="wrap_content"
18-
android:layout_marginTop="8dp"
19-
android:layout_marginBottom="8dp"
20-
android:layout_marginStart="8dp"
21-
android:layout_marginEnd="8dp"
22-
app:cardBackgroundColor="@color/toolbar_box_background"
17+
android:background="?attr/colorPrimary"
2318
app:layout_scrollFlags="enterAlways|scroll">
2419

25-
<android.support.v7.widget.Toolbar
20+
<android.support.v7.widget.CardView
21+
android:id="@+id/toolbar_box"
2622
android:layout_width="match_parent"
27-
android:layout_height="48dp"
28-
android:id="@+id/toolbar"
29-
android:foreground="?attr/selectableItemBackground"
30-
android:clickable="true"
31-
app:theme="@style/Toolbar.Main"
32-
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
33-
34-
<ImageView
35-
android:id="@+id/action_start_search"
36-
android:layout_width="wrap_content"
3723
android:layout_height="wrap_content"
38-
android:layout_marginEnd="24dp"
39-
android:src="@drawable/ic_search_black_24dp"
40-
android:tint="@color/black_in_light"/>
24+
android:layout_marginTop="8dp"
25+
android:layout_marginBottom="8dp"
26+
android:layout_marginStart="8dp"
27+
android:layout_marginEnd="8dp"
28+
app:cardBackgroundColor="@color/toolbar_box_background">
4129

42-
<TextView
43-
android:layout_width="match_parent"
44-
android:layout_height="match_parent"
45-
android:id="@+id/search_edit"
46-
android:text="@string/search_hint_common"
47-
android:gravity="center_vertical"
48-
android:background="@null"
49-
android:textColor="?android:textColorHint"
50-
android:textSize="16sp"
51-
android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
30+
<android.support.v7.widget.Toolbar
31+
android:layout_width="match_parent"
32+
android:layout_height="48dp"
33+
android:id="@+id/toolbar"
34+
android:foreground="?attr/selectableItemBackground"
35+
android:clickable="true"
36+
app:theme="@style/Toolbar.Main"
37+
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
38+
39+
<ImageView
40+
android:id="@+id/action_start_search"
41+
android:layout_width="wrap_content"
42+
android:layout_height="wrap_content"
43+
android:layout_marginEnd="24dp"
44+
android:src="@drawable/ic_search_black_24dp"
45+
android:tint="@color/black_in_light"/>
46+
47+
<TextView
48+
android:layout_width="match_parent"
49+
android:layout_height="match_parent"
50+
android:id="@+id/search_edit"
51+
android:text="@string/search_hint_common"
52+
android:gravity="center_vertical"
53+
android:background="@null"
54+
android:textColor="?android:textColorHint"
55+
android:textSize="16sp"
56+
android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
57+
58+
</android.support.v7.widget.Toolbar>
5259

53-
</android.support.v7.widget.Toolbar>
60+
</android.support.v7.widget.CardView>
5461

55-
</android.support.v7.widget.CardView>
62+
</FrameLayout>
5663

5764
<android.support.design.widget.TabLayout
5865
android:layout_width="match_parent"
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<PreferenceCategory android:title="@string/category_user_interface">
5+
6+
<SwitchPreference android:key="navigation_tint"
7+
android:title="@string/pref_navigation_tint"
8+
android:summary="@string/pref_navigation_tint_summary"/>
9+
10+
<ListPreference android:key="night_mode"
11+
android:title="@string/pref_night_mode"
12+
android:summary="%s"
13+
android:entries="@array/night_mode_choices"
14+
android:entryValues="@array/night_mode_choices_item"
15+
android:defaultValue="0"/>
16+
17+
<Preference android:key="show_tips_again"
18+
android:title="@string/pref_show_tips_again"/>
19+
20+
</PreferenceCategory>
21+
22+
<PreferenceCategory android:title="@string/category_notification">
23+
24+
<SwitchPreference android:key="dont_disturb"
25+
android:title="@string/item_notification_do_not_disturb"
26+
android:summary="@string/item_notification_do_not_disturb_desc"/>
27+
28+
<ListPreference android:key="interval"
29+
android:title="@string/item_notification_interval"
30+
android:summary="%s"
31+
android:entries="@array/notification_interval"
32+
android:entryValues="@array/notification_interval_item"
33+
android:defaultValue="1"/>
34+
35+
</PreferenceCategory>
36+
37+
<PreferenceCategory android:title="@string/category_push">
38+
39+
<SwitchPreference android:key="enable_push"
40+
android:title="@string/pref_enable_push"
41+
android:summary="@string/pref_enable_push_summary"/>
42+
43+
<Preference android:key="firebase_instance_id"
44+
android:title="@string/pref_firebase_instance_id"
45+
android:summary="@string/pref_firebase_instance_id_summary"/>
46+
47+
<EditTextPreference android:key="api_host"
48+
android:title="@string/pref_api_host"
49+
android:summary="%s"
50+
android:singleLine="true"
51+
android:inputType="textUri"/>
52+
53+
<EditTextPreference android:key="api_port"
54+
android:title="@string/pref_api_port"
55+
android:summary="%s"
56+
android:maxLength="5"
57+
android:singleLine="true"
58+
android:inputType="numberDecimal"/>
59+
60+
<Preference android:key="push_sync" android:title="@string/pref_push_sync"/>
61+
62+
<Preference android:key="request_push" android:title="@string/pref_request_push"/>
63+
64+
</PreferenceCategory>
65+
66+
<PreferenceCategory android:title="@string/category_auto_detect_services">
67+
68+
<SwitchPreference android:key="from_clipboard"
69+
android:title="@string/item_detect_clipboard"
70+
android:summary="@string/item_detect_clipboard_desc"/>
71+
72+
<Preference android:key="from_screen"
73+
android:title="@string/item_detect_screen_text"
74+
android:summary="@string/item_detect_screen_text_desc"/>
75+
76+
</PreferenceCategory>
77+
78+
<PreferenceCategory android:title="@string/category_about">
79+
80+
<Preference android:key="version" android:title="@string/app_name"/>
81+
<Preference android:key="github" android:title="@string/github_repo_title" android:summary="@string/github_repo_url"/>
82+
<Preference android:key="alipay" android:title="@string/alipay_support_title" android:summary="@string/alipay_support_summary"/>
83+
<Preference android:key="sina" android:title="@string/author_sina_title" android:summary="@string/author_sina_desc"/>
84+
<Preference android:key="designer" android:title="@string/icon_designer_title" android:summary="@string/icon_designer_summary"/>
85+
<Preference android:key="googleplus" android:title="@string/google_plus_title" android:summary="@string/google_plus_url"/>
86+
<Preference android:key="license" android:title="@string/open_source_license" android:summary="@string/open_source_license_summary"/>
87+
<Preference android:key="contributors" android:title="@string/category_contributors" android:summary="@string/category_contributors_desc"/>
88+
89+
</PreferenceCategory>
90+
91+
</PreferenceScreen>

0 commit comments

Comments
 (0)