Skip to content

Commit 5b9a9b7

Browse files
committed
Refactor UI implentation with the new AndroidX or Material Design library natively
Replace with Material Design Theming templete Replace with vector icons Add customized typography Signed-off-by: xcffl <[email protected]>
1 parent 72c47ed commit 5b9a9b7

File tree

153 files changed

+3211
-2193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+3211
-2193
lines changed

app/build.gradle

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ apply plugin: 'com.android.application'
22
apply plugin: 'org.greenrobot.greendao'
33

44
android {
5-
compileSdkVersion 28
5+
compileSdkVersion 29
66

77
defaultConfig {
88
applicationId "fr.gaulupeau.apps.InThePoche"
9-
minSdkVersion 21
10-
targetSdkVersion 28
9+
minSdkVersion 24
10+
targetSdkVersion 29
1111
versionCode 215
1212
versionName "2.3.0-beta.1"
1313

1414
javaCompileOptions {
1515
annotationProcessorOptions {
16-
arguments = [ eventBusIndex : 'fr.gaulupeau.apps.Poche.EventBusIndex' ]
16+
arguments = [eventBusIndex: 'fr.gaulupeau.apps.Poche.EventBusIndex']
1717
}
1818
}
1919
}
@@ -33,8 +33,9 @@ android {
3333

3434
buildTypes {
3535
release {
36-
minifyEnabled false
36+
minifyEnabled true
3737
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
38+
multiDexEnabled = true
3839
}
3940
debug {
4041
applicationIdSuffix '.debug'
@@ -50,6 +51,7 @@ android {
5051
}
5152
}
5253
}
54+
buildToolsVersion = '29.0.2'
5355
}
5456

5557
greendao {
@@ -58,10 +60,11 @@ greendao {
5860
}
5961

6062
dependencies {
61-
implementation 'androidx.appcompat:appcompat:1.0.2'
63+
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
6264
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
63-
implementation 'androidx.recyclerview:recyclerview:1.0.0'
64-
implementation 'com.google.android.material:material:1.0.0'
65+
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta03'
66+
implementation 'androidx.preference:preference:1.1.0-rc01'
67+
implementation 'com.google.android.material:material:1.1.0-alpha09'
6568
implementation 'org.greenrobot:eventbus:3.1.1'
6669
implementation 'org.greenrobot:greendao:3.2.2'
6770
annotationProcessor 'org.greenrobot:eventbus-annotation-processor:3.1.1'

app/src/main/AndroidManifest.xml

Lines changed: 68 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,47 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
4-
package="fr.gaulupeau.apps.InThePoche"
5-
android:installLocation="auto">
6-
7-
<uses-permission android:name="android.permission.INTERNET" />
8-
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
9-
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
10-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="22"/>
11-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <!-- needed by TTS service for Android P or above -->
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="fr.gaulupeau.apps.InThePoche"
5+
android:installLocation="auto">
126

137
<application
148
android:name="fr.gaulupeau.apps.Poche.App"
159
android:allowBackup="true"
1610
android:icon="@drawable/icon"
1711
android:label="@string/app_name"
12+
android:networkSecurityConfig="@xml/network_security_config"
1813
android:supportsRtl="true"
19-
android:theme="@style/LightTheme"
20-
android:networkSecurityConfig="@xml/network_security_config">
14+
android:theme="@style/MyTheme.DayNight">
2115
<activity
22-
android:name="fr.gaulupeau.apps.Poche.ui.MainActivity"
23-
android:theme="@style/LightTheme.NoActionBar">
16+
android:name="fr.gaulupeau.apps.Poche.ui.preferences.SettingsActivity"
17+
android:label="@string/title_activity_settings"
18+
android:parentActivityName="fr.gaulupeau.apps.Poche.ui.MainActivity"
19+
android:theme="@style/MyTheme.DayNight">
20+
<meta-data
21+
android:name="android.support.PARENT_ACTIVITY"
22+
android:value="fr.gaulupeau.apps.Poche.ui.MainActivity" />
23+
</activity>
24+
<activity android:name="fr.gaulupeau.apps.Poche.ui.MainActivity"
25+
android:theme="@style/MyTheme.DayNight">
2426
<intent-filter>
25-
<action android:name="android.intent.action.MAIN"/>
26-
<action android:name="android.intent.action.SEARCH"/>
27+
<action android:name="android.intent.action.MAIN" />
28+
<action android:name="android.intent.action.SEARCH" />
2729

28-
<category android:name="android.intent.category.LAUNCHER"/>
30+
<category android:name="android.intent.category.LAUNCHER" />
2931
</intent-filter>
30-
<meta-data android:name="android.app.searchable"
31-
android:resource="@xml/searchable"/>
32+
33+
<meta-data
34+
android:name="android.app.searchable"
35+
android:resource="@xml/searchable" />
3236
</activity>
3337
<activity
3438
android:name="fr.gaulupeau.apps.Poche.ui.ReadArticleActivity"
35-
android:hardwareAccelerated="true" />
36-
<activity
37-
android:name="fr.gaulupeau.apps.Poche.ui.ManageArticleTagsActivity"/>
39+
android:hardwareAccelerated="true"
40+
android:theme="@style/MyTheme.DayNight"/>
41+
<activity android:name="fr.gaulupeau.apps.Poche.ui.ManageArticleTagsActivity" />
3842
<activity
3943
android:name="fr.gaulupeau.apps.Poche.ui.AddUrlProxyActivity"
40-
android:theme="@style/ProxyTheme">
44+
android:theme="@style/MyTheme.DayNight">
4145
<intent-filter android:label="@string/app_name">
4246
<action android:name="android.intent.action.SEND" />
4347

@@ -52,7 +56,7 @@
5256
android:enabled="false"
5357
android:excludeFromRecents="true"
5458
android:noHistory="true"
55-
android:theme="@style/ProxyTheme">
59+
android:theme="@style/MyTheme.DayNight">
5660
<intent-filter>
5761
<action android:name="android.intent.action.VIEW" />
5862

@@ -76,37 +80,40 @@
7680
<data android:mimeType="application/vnd.wap.xhtml+xml" />
7781
</intent-filter>
7882
</activity>
79-
80-
<activity android:name="fr.gaulupeau.apps.Poche.ui.preferences.SettingsActivity">
83+
<activity android:name="fr.gaulupeau.apps.Poche.ui.preferences.SettingsActivity$SyncFragment">
8184
<intent-filter>
8285
<action android:name="android.intent.action.MANAGE_NETWORK_USAGE" />
86+
8387
<category android:name="android.intent.category.DEFAULT" />
8488
</intent-filter>
8589
</activity>
86-
87-
<activity android:name="fr.gaulupeau.apps.Poche.ui.preferences.ConnectionWizardActivity">
90+
<activity android:name="fr.gaulupeau.apps.Poche.ui.preferences.ConnectionWizardActivity"
91+
android:theme="@style/MyTheme.DayNight">
8892
<intent-filter>
89-
<action android:name="android.intent.action.VIEW"/>
90-
<category android:name="android.intent.category.DEFAULT"/>
91-
<category android:name="android.intent.category.BROWSABLE"/>
92-
<data android:scheme="wallabag"/>
93+
<action android:name="android.intent.action.VIEW" />
94+
95+
<category android:name="android.intent.category.DEFAULT" />
96+
<category android:name="android.intent.category.BROWSABLE" />
97+
98+
<data android:scheme="wallabag" />
9399
</intent-filter>
94100
</activity>
95101

102+
<provider
103+
android:name="androidx.core.content.FileProvider"
104+
android:authorities="${applicationId}.fileprovider"
105+
android:exported="false"
106+
android:grantUriPermissions="true">
107+
<meta-data
108+
android:name="android.support.FILE_PROVIDER_PATHS"
109+
android:resource="@xml/provider_paths" />
110+
</provider>
111+
96112
<receiver android:name="androidx.media.session.MediaButtonReceiver">
97113
<intent-filter>
98114
<action android:name="android.intent.action.MEDIA_BUTTON" />
99115
</intent-filter>
100116
</receiver>
101-
102-
<service
103-
android:name="fr.gaulupeau.apps.Poche.tts.TtsService"
104-
android:exported="false">
105-
<intent-filter>
106-
<action android:name="android.intent.action.MEDIA_BUTTON" />
107-
</intent-filter>
108-
</service>
109-
110117
<receiver android:name="fr.gaulupeau.apps.Poche.ui.IconUnreadWidget">
111118
<intent-filter>
112119
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
@@ -120,8 +127,9 @@
120127
android:name="fr.gaulupeau.apps.Poche.network.ConnectivityChangeReceiver"
121128
android:enabled="false">
122129
<intent-filter>
123-
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"
124-
tools:ignore="BatteryLife" />
130+
<action
131+
android:name="android.net.conn.CONNECTIVITY_CHANGE"
132+
tools:ignore="BatteryLife" />
125133
</intent-filter>
126134
</receiver>
127135
<receiver
@@ -135,28 +143,31 @@
135143
android:name="fr.gaulupeau.apps.Poche.service.AlarmReceiver"
136144
android:enabled="false" />
137145

146+
<service
147+
android:name="fr.gaulupeau.apps.Poche.tts.TtsService"
148+
android:exported="false">
149+
<intent-filter>
150+
<action android:name="android.intent.action.MEDIA_BUTTON" />
151+
</intent-filter>
152+
</service>
138153
<service
139154
android:name="fr.gaulupeau.apps.Poche.service.WallabagJobService"
140-
android:permission="android.permission.BIND_JOB_SERVICE"
141-
android:exported="true" />
142-
155+
android:exported="true"
156+
android:permission="android.permission.BIND_JOB_SERVICE" />
143157
<service
144158
android:name="fr.gaulupeau.apps.Poche.service.MainService"
145159
android:exported="false" />
146-
147160
<service
148161
android:name="fr.gaulupeau.apps.Poche.service.SecondaryService"
149162
android:exported="false" />
150-
151-
<provider
152-
android:name="androidx.core.content.FileProvider"
153-
android:authorities="${applicationId}.fileprovider"
154-
android:exported="false"
155-
android:grantUriPermissions="true">
156-
<meta-data
157-
android:name="android.support.FILE_PROVIDER_PATHS"
158-
android:resource="@xml/provider_paths"/>
159-
</provider>
160163
</application>
164+
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
165+
<uses-permission
166+
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
167+
android:maxSdkVersion="22" />
168+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
169+
<uses-permission android:name="android.permission.INTERNET" />
170+
171+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
161172

162-
</manifest>
173+
</manifest>
73.4 KB
Binary file not shown.
146 KB
Binary file not shown.

app/src/main/assets/ic_web.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)