Add Swipe-to-refresh for Modules, Code Cleanup, Stylizations

Moar updates.  Modules now swipe to refresh and indicate properly-ish.
Cleanup minor code stuff.  Colorize icons to match, set global color
variable so it can be changed...
This commit is contained in:
d8ahazard
2016-09-12 23:05:04 -05:00
parent e690f6d487
commit b3ba79a3ba
11 changed files with 86 additions and 109 deletions
+6 -9
View File
@@ -14,16 +14,10 @@
card_view:cardCornerRadius="2dp"
card_view:cardElevation="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="8dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:layout_gravity="center_vertical">
<TextView
@@ -78,7 +72,7 @@
tools:ignore="ContentDescription" />
</LinearLayout>
<!--TODO - Work in an auto-update notifier, make this fly around like magic -->
<!--<ImageView-->
<!--android:id="@+id/update"-->
<!--android:layout_width="wrap_content"-->
@@ -155,6 +149,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_marginStart="10dp"
android:backgroundTint="@color/icon_grey"
android:background="@drawable/ic_changelog" />
<ImageView
@@ -163,6 +158,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_marginStart="10dp"
android:backgroundTint="@color/icon_grey"
android:background="@drawable/ic_author" />
<ImageView
@@ -171,6 +167,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_marginStart="10dp"
android:backgroundTint="@color/icon_grey"
android:background="@drawable/ic_support" />
@@ -181,6 +178,6 @@
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
+9 -10
View File
@@ -14,16 +14,12 @@
card_view:cardCornerRadius="2dp"
card_view:cardElevation="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:padding="8dp">
android:padding="10dp">
<RelativeLayout
android:layout_width="match_parent"
@@ -59,10 +55,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:gravity="right"
android:gravity="end"
android:background="@drawable/ic_file_download_black"
android:layout_marginEnd="10dp"
android:layout_gravity="right"
android:backgroundTint="@color/icon_grey"
android:layout_gravity="end"
android:layout_alignBaseline="@id/title"
android:layout_alignParentEnd="true"
/>
@@ -128,6 +124,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:backgroundTint="@color/icon_grey"
android:background="@drawable/ic_changelog"/>
<ImageView
android:id="@+id/authorLink"
@@ -135,6 +132,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:backgroundTint="@color/icon_grey"
android:background="@drawable/ic_author"/>
<ImageView
android:id="@+id/supportLink"
@@ -142,6 +140,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:backgroundTint="@color/icon_grey"
android:background="@drawable/ic_support"/>
@@ -159,14 +158,14 @@
android:layout_height="wrap_content"
android:focusable="false"
android:visibility="gone"
android:gravity="right"
android:gravity="end"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
/>
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
<android.support.v4.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_marginTop="?attr/actionBarSize"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
@@ -25,4 +26,4 @@
android:textStyle="italic"
android:visibility="gone"/>
</LinearLayout>
</android.support.v4.widget.SwipeRefreshLayout>
+1 -1
View File
@@ -6,7 +6,7 @@
<color name="accent">#FFC107</color>
<color name="primary_text">#212121</color>
<color name="icons">#FFFFFF</color>
<color name="icon_grey">#757575</color>
<color name="red500">#F44336</color>
<color name="green500">#4CAF50</color>
<color name="blue500">#2196F3</color>
+1
View File
@@ -97,4 +97,5 @@
<string name="pass">MagiskRox666</string>
<string name="some_string">GTYybRBTYf5his9kQ16ZNO7qgkBJ/5MyVe4CGceAOIoXgSnnk8FTd4F1dE9p5Eus</string>
<string name="downloads">Downloads</string>
<string name="url_main">https://api.github.com/orgs/Magisk-Modules-Repo/repos?access_token=</string>
</resources>