Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
android_packages_apps_Updater
Commits
9babea83
Commit
9babea83
authored
Oct 12, 2021
by
narinder Rana
Browse files
Merge branch '3918-Q-UI_revamp' into 'v1-q'
3918-Q-UI_revamp See merge request
!44
parents
d32d05fc
0ee7a7d2
Changes
13
Hide whitespace changes
Inline
Side-by-side
Android.mk
View file @
9babea83
...
...
@@ -16,6 +16,8 @@ LOCAL_STATIC_ANDROID_LIBRARIES := \
androidx.preference_preference
\
androidx.recyclerview_recyclerview
\
LOCAL_STATIC_JAVA_LIBRARIES
+=
org.lineageos.platform.sdk
LOCAL_RESOURCE_DIR
:=
\
$(LOCAL_PATH)
/res
...
...
res/drawable/ic_arrow_back.xml
0 → 100644
View file @
9babea83
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
>
<path
android:fillColor=
"@color/theme_accent"
android:pathData=
"M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"
/>
</vector>
res/drawable/ic_foreground.xml
View file @
9babea83
...
...
@@ -6,7 +6,7 @@
<group
android:translateX=
"24.363636"
android:translateY=
"24.363636"
>
<path
android:fillColor=
"
#FAFAFA
"
android:fillColor=
"
@color/theme_accent
"
android:pathData=
"M17,1.01L7,1c-1.1,0 -2,0.9 -2,2v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2L19,3c0,-1.1 -0.9,-1.99 -2,-1.99zM17,19L7,19L7,5h10v14zM16,13h-3L13,8h-2v5L8,13l4,4 4,-4z"
/>
</group>
</vector>
...
...
res/drawable/ic_menu_refresh.xml
View file @
9babea83
...
...
@@ -6,6 +6,6 @@
android:viewportHeight=
"24"
>
<path
android:fillColor=
"@color/
inverted
"
android:fillColor=
"@color/
theme_accent
"
android:pathData=
"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
/>
</vector>
res/drawable/ic_pause.xml
View file @
9babea83
...
...
@@ -4,6 +4,6 @@
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"
#FF000000
"
android:fillColor=
"
@color/theme_accent
"
android:pathData=
"M6,19h4L10,5L6,5v14zM14,5v14h4L18,5h-4z"
/>
</vector>
res/drawable/ic_system_update.xml
View file @
9babea83
...
...
@@ -5,6 +5,6 @@
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"@color/
inverted
"
android:fillColor=
"@color/
theme_accent
"
android:pathData=
"M17,1.01L7,1c-1.1,0 -2,0.9 -2,2v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2L19,3c0,-1.1 -0.9,-1.99 -2,-1.99zM17,19L7,19L7,5h10v14zM16,13h-3L13,8h-2v5L8,13l4,4 4,-4z"
/>
</vector>
res/layout/preferences_dialog.xml
View file @
9babea83
...
...
@@ -18,7 +18,7 @@
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"@string/menu_auto_updates_check"
android:textColor=
"@color/
inverted
"
android:textColor=
"@color/
theme_primary_text
"
android:textSize=
"16sp"
/>
<Spinner
...
...
@@ -35,6 +35,7 @@
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"16dp"
android:text=
"@string/menu_auto_delete_updates"
android:textColor=
"@color/theme_primary_text"
android:textSize=
"16sp"
/>
<Switch
...
...
@@ -43,6 +44,7 @@
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"16dp"
android:text=
"@string/menu_mobile_data_warning"
android:textColor=
"@color/theme_primary_text"
android:textSize=
"16sp"
/>
<Switch
...
...
@@ -51,5 +53,6 @@
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"16dp"
android:text=
"@string/menu_ab_perf_mode"
android:textColor=
"@color/theme_primary_text"
android:textSize=
"16sp"
/>
</LinearLayout>
res/layout/update_item_view.xml
View file @
9babea83
...
...
@@ -82,6 +82,7 @@
<Button
android:id=
"@id/update_action"
style=
"@style/Widget.AppCompat.Button.Borderless.Colored"
android:textColor=
"@color/theme_accent"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"8dp"
...
...
res/mipmap-anydpi/ic_launcher.xml
View file @
9babea83
...
...
@@ -14,7 +14,7 @@
limitations under the License.
-->
<adaptive-icon
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<background
android:drawable=
"@color/
ic
_background"
/>
<background
android:drawable=
"@color/
theme
_background"
/>
<foreground
android:drawable=
"@drawable/ic_foreground"
/>
</adaptive-icon>
res/values-night/colors.xml
deleted
100644 → 0
View file @
d32d05fc
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color
name=
"theme_primary"
>
#212121
</color>
<color
name=
"theme_primary_dark"
>
#1c1c1c
</color>
<color
name=
"theme_accent"
>
@*android:color/accent_device_default_dark
</color>
<color
name=
"inverted"
>
#f5f5f5
</color>
</resources>
res/values/colors.xml
View file @
9babea83
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color
name=
"theme_primary"
>
#f5f5f5
</color>
<color
name=
"theme_primary_dark"
>
#e0e0e0
</color>
<color
name=
"theme_accent"
>
#007fff
</color>
<color
name=
"inverted"
>
#212121
</color>
<color
name=
"ic_background"
>
#333333
</color>
<color
name=
"theme_primary"
>
@lineageos.platform:color/color_default_primary
</color>
<color
name=
"theme_primary_dark"
>
@lineageos.platform:color/color_default_primary_dark
</color>
<color
name=
"theme_accent"
>
@lineageos.platform:color/color_default_accent
</color>
<color
name=
"theme_on_accent"
>
@lineageos.platform:color/color_default_view_on_accent
</color>
<color
name=
"theme_background"
>
@lineageos.platform:color/color_default_background
</color>
<color
name=
"theme_primary_text"
>
@lineageos.platform:color/color_default_primary_text
</color>
<color
name=
"theme_secondary_text"
>
@lineageos.platform:color/color_default_secondary_text
</color>
</resources>
res/values/styles.xml
View file @
9babea83
...
...
@@ -4,23 +4,29 @@
<item
name=
"colorPrimary"
>
@color/theme_primary
</item>
<item
name=
"colorPrimaryDark"
>
@color/theme_primary_dark
</item>
<item
name=
"colorAccent"
>
@color/theme_accent
</item>
<item
name=
"android:textColorPrimary"
>
@color/theme_primary_text
</item>
<item
name=
"android:textColorSecondary"
>
@color/theme_secondary_text
</item>
<item
name=
"actionOverflowButtonStyle"
>
@style/customOverFlow
</item>
<item
name=
"android:homeAsUpIndicator"
>
@drawable/ic_arrow_back
</item>
<item
name=
"windowActionModeOverlay"
>
true
</item>
<item
name=
"android:windowLightStatusBar"
>
@bool/theme_is_light
</item>
<item
name=
"android:windowLightNavigationBar"
>
@bool/theme_is_light
</item>
<item
name=
"android:navigationBarColor"
>
@color/theme_primary_dark
</item>
<item
name=
"android:navigationBarDividerColor"
>
@color/theme_primary_dark
</item>
<item
name=
"android:statusBarColor"
>
@color/theme_primary_dark
</item>
<item
name=
"snackbarStyle"
>
@style/snackbar_style
</item>
</style>
<style
name=
"AppTheme.NoActionBar"
>
<item
name=
"windowActionBar"
>
false
</item>
<item
name=
"windowNoTitle"
>
true
</item>
<item
name=
"android:windowDrawsSystemBarBackgrounds"
>
true
</item>
<item
name=
"android:statusBarColor"
>
@android:color/transparent
</item>
<item
name=
"android:navigationBarColor"
>
@android:color/transparent
</item>
</style>
<style
name=
"AppTheme.AppBarOverlay"
parent=
"ThemeOverlay.AppCompat.ActionBar"
/>
<style
name=
"TextAppearanceInverted"
parent=
"TextAppearance.AppCompat.Widget.ActionBar.Title"
>
<item
name=
"android:textColor"
>
@color/
inverted
</item>
<item
name=
"android:textColor"
>
@color/
theme_primary_text
</item>
</style>
<style
name=
"TextAppearanceTransparent"
parent=
"TextAppearance.AppCompat.Widget.ActionBar.Title"
>
<item
name=
"android:textColor"
>
@android:color/transparent
</item>
...
...
@@ -31,4 +37,15 @@
<item
name=
"android:dropDownVerticalOffset"
>
8dp
</item>
<item
name=
"android:dropDownHorizontalOffset"
>
-16dp
</item>
</style>
<style
name=
"customOverFlow"
>
<item
name=
"android:src"
>
@lineageos.platform:drawable/ic_menu
</item>
<item
name=
"tint"
>
@color/theme_accent
</item>
<item
name=
"android:paddingRight"
>
10dp
</item>
<item
name=
"android:foreground"
>
?android:attr/selectableItemBackground
</item>
</style>
<style
name=
"snackbar_style"
parent=
"Widget.Design.Snackbar"
>
<item
name=
"android:background"
>
@color/theme_primary_dark
</item>
</style>
</resources>
src/org/lineageos/updater/UpdatesActivity.java
View file @
9babea83
...
...
@@ -41,6 +41,7 @@ import android.widget.TextView;
import
androidx.appcompat.app.AlertDialog
;
import
androidx.appcompat.widget.Toolbar
;
import
androidx.core.content.ContextCompat
;
import
androidx.localbroadcastmanager.content.LocalBroadcastManager
;
import
androidx.preference.PreferenceManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
...
...
@@ -386,7 +387,11 @@ public class UpdatesActivity extends UpdatesListActivity {
@Override
public
void
showSnackbar
(
int
stringId
,
int
duration
)
{
Snackbar
.
make
(
findViewById
(
R
.
id
.
main_container
),
stringId
,
duration
).
show
();
Snackbar
snackbar
=
Snackbar
.
make
(
findViewById
(
R
.
id
.
main_container
),
stringId
,
duration
);
View
baseView
=
snackbar
.
getView
();
TextView
textView
=
baseView
.
findViewById
(
R
.
id
.
snackbar_text
);
textView
.
setTextColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
theme_primary_text
));
snackbar
.
show
();
}
private
void
refreshAnimationStart
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment