diff --git a/SettingsUI/build.gradle b/SettingsUI/build.gradle index bbd51f1..01b4bc0 100644 --- a/SettingsUI/build.gradle +++ b/SettingsUI/build.gradle @@ -21,7 +21,7 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' - compile 'com.android.support:appcompat-v7:23.1.1' - compile 'com.android.support:preference-v7:23.1.1' - compile 'com.android.support:preference-v14:23.1.1' + compile 'com.android.support:appcompat-v7:23.2.0' + compile 'com.android.support:preference-v7:23.2.0' + compile 'com.android.support:preference-v14:23.2.0' } diff --git a/SettingsUI/src/main/java/me/qixingchen/settings/PreferenceFragment.java b/SettingsUI/src/main/java/me/qixingchen/settings/PreferenceFragment.java index 5bff929..20318ae 100644 --- a/SettingsUI/src/main/java/me/qixingchen/settings/PreferenceFragment.java +++ b/SettingsUI/src/main/java/me/qixingchen/settings/PreferenceFragment.java @@ -10,20 +10,26 @@ * Created by Rikka on 2016/2/19. */ public abstract class PreferenceFragment extends android.support.v14.preference.PreferenceFragment { - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View view = super.onCreateView(inflater, container, savedInstanceState); + public void addDefaultListDivider() { + + // hide Google's divider added in 23.2.0 + setDivider(null); RecyclerView listView = getListView(); - listView.addItemDecoration(new BaseRecyclerViewItemDecoration(container.getContext()) { + listView.addItemDecoration(new BaseRecyclerViewItemDecoration(getActivity()) { @Override public boolean canDraw(RecyclerView parent, View child, int childCount, int position) { - return ((position < childCount - 1) + return (position < childCount - 1 && parent.getChildAt(position + 1).findViewById(android.R.id.summary) != null && child.findViewById(android.R.id.summary) != null); } }); + } + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + View view = super.onCreateView(inflater, container, savedInstanceState); + addDefaultListDivider(); return view; } } diff --git a/app/build.gradle b/app/build.gradle index 23c5d6e..6552168 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,7 +21,7 @@ android { } productFlavors { - def String name = "1.4.4" + def String name = "1.4.5" COOLAPK { applicationId "rikka.searchbyimage" @@ -51,11 +51,13 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' - compile 'com.android.support:appcompat-v7:23.1.1' - compile "com.android.support:customtabs:23.1.1" - compile 'com.android.support:design:23.1.1' - compile 'com.android.support:support-v4:23.1.1' + compile 'com.android.support:appcompat-v7:23.2.0' + compile "com.android.support:customtabs:23.2.0" + compile 'com.android.support:design:23.2.0' + compile 'com.android.support:support-v4:23.2.0' compile 'com.github.bumptech.glide:glide:3.6.1' compile 'com.squareup.okhttp3:okhttp:3.0.1' + compile 'com.github.RikkaW:DayNight-Theme:v1.0.4' + compile project(':SettingsUI') } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 672dad4..62a2587 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -52,6 +52,7 @@ diff --git a/app/src/main/res/layout/activity_edit_sites.xml b/app/src/main/res/layout/activity_edit_sites.xml index e575145..ae1cf43 100644 --- a/app/src/main/res/layout/activity_edit_sites.xml +++ b/app/src/main/res/layout/activity_edit_sites.xml @@ -24,8 +24,8 @@ diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 66503d5..7d3b205 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -24,8 +24,8 @@ diff --git a/app/src/main/res/layout/list_item_edit_sites.xml b/app/src/main/res/layout/list_item_edit_sites.xml index 3627763..5fa81ec 100644 --- a/app/src/main/res/layout/list_item_edit_sites.xml +++ b/app/src/main/res/layout/list_item_edit_sites.xml @@ -27,7 +27,7 @@ @@ -46,7 +46,6 @@ + + #212121 + @color/material_grey_850 + #20ffffff + #FFF + + \ No newline at end of file diff --git a/app/src/main/res/values-night/styles.xml b/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..8035887 --- /dev/null +++ b/app/src/main/res/values-night/styles.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index beb0349..9d03538 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -17,4 +17,6 @@ @color/colorAccent + #FFF + @color/material_grey_50 diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 8b75a64..2863d73 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,7 +1,7 @@ - - - - - -