From c34f1ea155fb4c1108ee3e7981d9d3509fdb9969 Mon Sep 17 00:00:00 2001 From: MSkjel <fuckbio@hotmail.com> Date: Wed, 29 May 2019 01:04:02 +0200 Subject: [PATCH] Use Vector Drawable Support Library --- app/build.gradle | 3 ++- app/src/main/AndroidManifest.xml | 2 -- .../xposed/minminguard/ui/fragments/MainFragment.java | 2 ++ app/src/main/res/layout/dialog_app_detail.xml | 8 ++++---- app/src/main/res/layout/navigation_header.xml | 9 +++++---- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3e05fb5..c933bf5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -37,10 +37,11 @@ android { compileSdkVersion 28 buildToolsVersion '28.0.3' defaultConfig { + vectorDrawables.useSupportLibrary = true applicationId "tw.fatminmin.xposed.minminguard" minSdkVersion 14 targetSdkVersion 28 - versionCode 64 + versionCode 65 versionName "2.0.6" } buildTypes { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index fb13239..bdf696f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -18,7 +18,6 @@ android:configChanges="keyboardHidden|orientation|screenSize"> <intent-filter> <action android:name="android.intent.action.MAIN"/> - <category android:name="android.intent.category.LAUNCHER"/> <category android:name="de.robv.android.xposed.category.MODULE_SETTINGS"/> </intent-filter> @@ -56,5 +55,4 @@ android:name="io.fabric.ApiKey" android:value="11b3bd0c3467e4848618141b36a73619c7ef4843"/> </application> - </manifest> diff --git a/app/src/main/java/tw/fatminmin/xposed/minminguard/ui/fragments/MainFragment.java b/app/src/main/java/tw/fatminmin/xposed/minminguard/ui/fragments/MainFragment.java index 06ea204..15f22d5 100644 --- a/app/src/main/java/tw/fatminmin/xposed/minminguard/ui/fragments/MainFragment.java +++ b/app/src/main/java/tw/fatminmin/xposed/minminguard/ui/fragments/MainFragment.java @@ -3,6 +3,7 @@ import android.content.SharedPreferences; import android.os.Bundle; import android.support.v4.app.Fragment; +import android.support.v7.app.AppCompatDelegate; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; @@ -53,6 +54,7 @@ public static MainFragment newInstance(FragmentMode mode) public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); setHasOptionsMenu(true); } diff --git a/app/src/main/res/layout/dialog_app_detail.xml b/app/src/main/res/layout/dialog_app_detail.xml index 465edc2..bc7b64b 100644 --- a/app/src/main/res/layout/dialog_app_detail.xml +++ b/app/src/main/res/layout/dialog_app_detail.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:padding="10dp"> + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="10dp"> <ImageView android:id="@+id/detail_app_icon" diff --git a/app/src/main/res/layout/navigation_header.xml b/app/src/main/res/layout/navigation_header.xml index 4ae5261..4b3561c 100644 --- a/app/src/main/res/layout/navigation_header.xml +++ b/app/src/main/res/layout/navigation_header.xml @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="150dp" - android:background="@color/black"> + android:layout_width="match_parent" + android:layout_height="150dp" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:background="@color/black"> <LinearLayout android:layout_width="wrap_content" @@ -14,7 +15,7 @@ <ImageView android:layout_width="60dp" android:layout_height="60dp" - android:src="@mipmap/ic_launcher" + app:srcCompat="@mipmap/ic_launcher" android:contentDescription="Navigation header icon" /> <TextView