Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
gregkorossy committed Sep 24, 2018
2 parents b628c9c + d7db7c9 commit 3a592ae
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 83 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

**2018-09-24**

New version: 28.0.0.0 (based on v28.0.0)

- No support preferences related changes in the support library.
- Fixed issues #174 and #175

**2018-09-13**

New version: 28.0.0.0-rc02 (based on v28.0.0-rc02)
Expand Down
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This library is meant to fix some of the problems found in the official support preference-v7 library. Also, there are [new preference types](#extra-types) available, such as `RingtonePreference`, `DatePickerPreference`, and `TimePickerPreference`.

Support Library (28.0.0-rc02):
Support Library (28.0.0):
[ ![Download](https://api.bintray.com/packages/gericop/maven/com.takisoft.fix%3Apreference-v7/images/download.svg) ](https://bintray.com/gericop/maven/com.takisoft.fix%3Apreference-v7/_latestVersion)

AndroidX (1.0.0-beta01):
Expand All @@ -23,12 +23,12 @@ If you would like to support me, you may donate some small amount via PayPal.
### 1. Add gradle dependency
First, **remove** the unnecessary lines of preference-v7 and preference-v14 from your gradle file as the bugfix contains both of them:
```gradle
implementation 'com.android.support:preference-v7:28.0.0-rc02'
implementation 'com.android.support:preference-v14:28.0.0-rc02'
implementation 'com.android.support:preference-v7:28.0.0'
implementation 'com.android.support:preference-v14:28.0.0'
```
And **add** this single line to your gradle file:
```gradle
implementation 'com.takisoft.fix:preference-v7:28.0.0.0-rc02'
implementation 'com.takisoft.fix:preference-v7:28.0.0.0'
```
> Notice the versioning: the first three numbers are *always* the same as the latest official library while the last number is for own updates. I try to keep it up-to-date but if, for whatever reasons, I wouldn't notice the new support library versions, just issue a ticket.
Expand Down Expand Up @@ -91,7 +91,7 @@ For example, the sample app uses `PreferenceFixTheme.Light.NoActionBar` as the p
**Theme.MaterialComponents**
There's a NEW module called `preference-v7-material` that provides the new `Theme.MaterialComponents` related themes. You can add it to your project like this:
```gradle
implementation 'com.takisoft.fix:preference-v7-material:28.0.0.0-rc02'
implementation 'com.takisoft.fix:preference-v7-material:28.0.0.0'
```

> Note that you may need to use multidexing after this because it uses the support design library which is a huge codebase.
Expand All @@ -106,18 +106,18 @@ Now you can enjoy using the support preferences API without losing all your hair
There are additional preferences not part of the official support library, but decided to add them to some extra libraries. You can add all of them to your project using

```gradle
implementation 'com.takisoft.fix:preference-v7-extras:28.0.0.0-rc02'
implementation 'com.takisoft.fix:preference-v7-extras:28.0.0.0'
```

or one or more groups:

Preference | Dependency | Preview
-|-|-
[`RingtonePreference`](https://github.com/Gericop/Android-Support-Preference-V7-Fix/wiki/Preference-types#ringtonepreference) | `compile 'com.takisoft.fix:preference-v7-ringtone:28.0.0.0-rc02'` | ![API 26](https://raw.githubusercontent.com/Gericop/Android-Support-Preference-V7-Fix/master/images/ringtone_api26.png)
[`DatePickerPreference`](https://github.com/Gericop/Android-Support-Preference-V7-Fix/wiki/Preference-types#datepickerpreference) | `compile 'com.takisoft.fix:preference-v7-datetimepicker:28.0.0.0-rc02'` | ![API 26](https://raw.githubusercontent.com/Gericop/Android-Support-Preference-V7-Fix/master/images/datepicker_api26.png)
[`TimePickerPreference`](https://github.com/Gericop/Android-Support-Preference-V7-Fix/wiki/Preference-types#timepickerpreference) | `compile 'com.takisoft.fix:preference-v7-datetimepicker:28.0.0.0-rc02'` | ![API 26](https://raw.githubusercontent.com/Gericop/Android-Support-Preference-V7-Fix/master/images/timepicker_api26.png)
[`ColorPickerPreference`](https://github.com/Gericop/Android-Support-Preference-V7-Fix/wiki/Preference-types#colorpickerpreference) | `compile 'com.takisoft.fix:preference-v7-colorpicker:28.0.0.0-rc02'` | ![API 26](https://raw.githubusercontent.com/Gericop/Android-Support-Preference-V7-Fix/master/images/colorpicker_api26_fixed.png)
[`SimpleMenuPreference`](https://github.com/Gericop/Android-Support-Preference-V7-Fix/wiki/Preference-types#simplemenupreference) | `compile 'com.takisoft.fix:preference-v7-simplemenu:28.0.0.0-rc02'` | ![API 26](https://raw.githubusercontent.com/Gericop/Android-Support-Preference-V7-Fix/master/images/simplemenu_api26.png)
[`RingtonePreference`](https://github.com/Gericop/Android-Support-Preference-V7-Fix/wiki/Preference-types#ringtonepreference) | `compile 'com.takisoft.fix:preference-v7-ringtone:28.0.0.0'` | ![API 26](https://raw.githubusercontent.com/Gericop/Android-Support-Preference-V7-Fix/master/images/ringtone_api26.png)
[`DatePickerPreference`](https://github.com/Gericop/Android-Support-Preference-V7-Fix/wiki/Preference-types#datepickerpreference) | `compile 'com.takisoft.fix:preference-v7-datetimepicker:28.0.0.0'` | ![API 26](https://raw.githubusercontent.com/Gericop/Android-Support-Preference-V7-Fix/master/images/datepicker_api26.png)
[`TimePickerPreference`](https://github.com/Gericop/Android-Support-Preference-V7-Fix/wiki/Preference-types#timepickerpreference) | `compile 'com.takisoft.fix:preference-v7-datetimepicker:28.0.0.0'` | ![API 26](https://raw.githubusercontent.com/Gericop/Android-Support-Preference-V7-Fix/master/images/timepicker_api26.png)
[`ColorPickerPreference`](https://github.com/Gericop/Android-Support-Preference-V7-Fix/wiki/Preference-types#colorpickerpreference) | `compile 'com.takisoft.fix:preference-v7-colorpicker:28.0.0.0'` | ![API 26](https://raw.githubusercontent.com/Gericop/Android-Support-Preference-V7-Fix/master/images/colorpicker_api26_fixed.png)
[`SimpleMenuPreference`](https://github.com/Gericop/Android-Support-Preference-V7-Fix/wiki/Preference-types#simplemenupreference) | `compile 'com.takisoft.fix:preference-v7-simplemenu:28.0.0.0'` | ![API 26](https://raw.githubusercontent.com/Gericop/Android-Support-Preference-V7-Fix/master/images/simplemenu_api26.png)

---

Expand Down Expand Up @@ -163,7 +163,7 @@ The original implementation uses `?attr/textAppearanceSmall` as the message styl
---

## Version
The current stable version is **28.0.0.0-rc02**.
The current stable version is **28.0.0.0**.

## Notes #
This demo / bugfix is set to work on API level 14+.
Expand All @@ -182,6 +182,13 @@ API 15 | API 21 | API 26

### Changelog

**2018-09-24**

New version: 28.0.0.0 (based on v28.0.0)

- No support preferences related changes in the support library.
- Fixed issues #174 and #175

**2018-09-13**

New version: 28.0.0.0-rc02 (based on v28.0.0-rc02)
Expand Down
9 changes: 4 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@
project.ext.buildToolsVersion = '28.0.2'
project.ext.minSdkVersion = 14
project.ext.sdkVersion = 28
project.ext.supportLibraryVersion = '28.0.0-rc02'
project.ext.supportLibraryVersion = '28.0.0'
project.ext.supportLibraryVersionPrefix = '28.0.0'
project.ext.supportLibraryVersionSuffix = '-rc02'
project.ext.supportLibraryVersionSuffix = ''
project.ext.fixLibraryVersion = '0'

project.ext.extrasLibraryVersionSuffix = ''

buildscript {
repositories {
jcenter()
maven { url "https://maven.google.com" }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-rc02'
classpath 'com.android.tools.build:gradle:3.2.0-rc03'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'

Expand All @@ -28,7 +27,7 @@ buildscript {
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
google()
maven { url "https://dl.bintray.com/gericop/maven" }
}
}
2 changes: 1 addition & 1 deletion preference-v7-colorpicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ext {
dependencies {
implementation project(':preference-v7')
implementation "com.android.support:appcompat-v7:${rootProject.supportLibraryVersion}"
api 'com.takisoft.fix:colorpicker:1.0.5-rc01'
api 'com.takisoft.fix:colorpicker:1.0.5'
}

//apply from: 'https://raw.githubusercontent.com/numetriclabz/jcenter/master/installv.gradle'
Expand Down
2 changes: 1 addition & 1 deletion preference-v7-datetimepicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ext {

dependencies {
implementation project(':preference-v7')
api 'com.takisoft.fix:datetimepicker:1.0.7-rc01'
api 'com.takisoft.fix:datetimepicker:1.0.7'
}

//apply from: 'https://raw.githubusercontent.com/numetriclabz/jcenter/master/installv.gradle'
Expand Down
4 changes: 2 additions & 2 deletions preference-v7/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
}

-keepclassmembers class android.support.v7.preference.PreferenceGroupAdapter$PreferenceLayout {
private int resId;
private int widgetResId;
private int mResId;
private int mWidgetResId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public PreferenceGroupAdapter(PreferenceGroup preferenceGroup) {
private void getReflectionFields() {
try {
Class<?> aClass = Class.forName("android.support.v7.preference.PreferenceGroupAdapter$PreferenceLayout");
fieldResId = aClass.getDeclaredField("resId");
fieldWidgetResId = aClass.getDeclaredField("widgetResId");
fieldResId = aClass.getDeclaredField("mResId");
fieldWidgetResId = aClass.getDeclaredField("mWidgetResId");

fieldResId.setAccessible(true);
fieldWidgetResId.setAccessible(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
android:clipToPadding="false"
android:gravity="center_vertical"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingStart="?android:attr/listPreferredItemPaddingStart">
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">

<LinearLayout
android:id="@+id/icon_frame"
Expand All @@ -35,9 +35,9 @@
android:gravity="start|center_vertical"
android:minWidth="60dp"
android:orientation="horizontal"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:paddingEnd="12dp"
android:paddingTop="4dp">
android:paddingBottom="4dp">

<android.support.v7.internal.widget.PreferenceImageView
android:id="@android:id/icon"
Expand All @@ -50,19 +50,19 @@
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/pref_seekbar_fix_negative"
android:layout_marginStart="@dimen/pref_seekbar_fix_negative"
android:layout_marginLeft="@dimen/pref_seekbar_fix_negative"
android:layout_marginEnd="@dimen/pref_seekbar_fix_negative"
android:layout_marginRight="@dimen/pref_seekbar_fix_negative"
android:layout_marginStart="@dimen/pref_seekbar_fix_negative"
android:layout_weight="1"
android:clipChildren="false"
android:clipToPadding="false"
android:paddingBottom="8dp"
android:paddingEnd="@dimen/pref_seekbar_fix_positive"
android:paddingStart="@dimen/pref_seekbar_fix_positive"
android:paddingLeft="@dimen/pref_seekbar_fix_positive"
android:paddingTop="16dp"
android:paddingEnd="@dimen/pref_seekbar_fix_positive"
android:paddingRight="@dimen/pref_seekbar_fix_positive"
android:paddingStart="@dimen/pref_seekbar_fix_positive"
android:paddingTop="16dp">
android:paddingBottom="8dp">

<TextView
android:id="@android:id/title"
Expand All @@ -78,8 +78,8 @@
android:id="@android:id/summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@android:id/title"
android:layout_below="@android:id/title"
android:layout_alignStart="@android:id/title"
android:maxLines="4"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary" />
Expand All @@ -91,12 +91,12 @@
<android.support.v7.preference.UnPressableLinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignStart="@android:id/title"
android:layout_below="@android:id/summary"
android:layout_marginEnd="@dimen/pref_seekbar_fix_negative"
android:layout_alignStart="@android:id/title"
android:layout_marginStart="@dimen/pref_seekbar_fix_negative"
android:layout_marginLeft="@dimen/pref_seekbar_fix_negative"
android:layout_marginEnd="@dimen/pref_seekbar_fix_negative"
android:layout_marginRight="@dimen/pref_seekbar_fix_negative"
android:layout_marginStart="@dimen/pref_seekbar_fix_negative"
android:clipChildren="false"
android:clipToPadding="false">

Expand All @@ -108,25 +108,27 @@
android:background="@null"
android:clickable="false"
android:focusable="false"
android:paddingEnd="@dimen/pref_seekbar_fix_positive"
android:paddingStart="@dimen/pref_seekbar_fix_positive"
android:paddingLeft="@dimen/pref_seekbar_fix_positive"
android:paddingRight="@dimen/pref_seekbar_fix_positive"
android:paddingStart="@dimen/pref_seekbar_fix_positive" />
android:paddingEnd="@dimen/pref_seekbar_fix_positive"
android:paddingRight="@dimen/pref_seekbar_fix_positive" />

<TextView
android:id="@+id/seekbar_value"
android:layout_width="@dimen/preference_seekbar_value_width"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/pref_seekbar_fix_positive"
android:layout_marginStart="@dimen/preference_seekbar_padding_end"
android:layout_marginLeft="@dimen/preference_seekbar_padding_end"
android:layout_marginEnd="@dimen/pref_seekbar_fix_positive"
android:layout_marginRight="@dimen/pref_seekbar_fix_positive"
android:layout_marginStart="@dimen/preference_seekbar_padding_end"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:fontFamily="sans-serif-condensed"
android:gravity="end|center_vertical"
android:maxLines="1"
android:scrollbars="none"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
android:textAppearance="@style/Preference_TextAppearanceMaterialSubhead" />
<!-- android:textAppearance="?android:attr/textAppearanceListItemSmall" -->
</android.support.v7.preference.UnPressableLinearLayout>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
android:clipToPadding="false"
android:gravity="center_vertical"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingStart="?android:attr/listPreferredItemPaddingStart">
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">

<LinearLayout
android:id="@+id/icon_frame"
Expand All @@ -34,9 +34,9 @@
android:gravity="start|center_vertical"
android:minWidth="60dp"
android:orientation="horizontal"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:paddingEnd="12dp"
android:paddingTop="4dp">
android:paddingBottom="4dp">

<android.support.v7.internal.widget.PreferenceImageView
android:id="@android:id/icon"
Expand All @@ -49,15 +49,15 @@
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/pref_seekbar_fix_negative"
android:layout_marginStart="@dimen/pref_seekbar_fix_negative"
android:layout_marginEnd="@dimen/pref_seekbar_fix_negative"
android:layout_weight="1"
android:clipChildren="false"
android:clipToPadding="false"
android:paddingBottom="8dp"
android:paddingEnd="@dimen/pref_seekbar_fix_positive"
android:paddingStart="@dimen/pref_seekbar_fix_positive"
android:paddingTop="16dp">
android:paddingTop="16dp"
android:paddingEnd="@dimen/pref_seekbar_fix_positive"
android:paddingBottom="8dp">

<TextView
android:id="@android:id/title"
Expand All @@ -67,14 +67,14 @@
android:fadingEdge="horizontal"
android:maxLines="1"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceListItem" />
android:textAppearance="@style/Preference_TextAppearanceMaterialSubhead" />

<TextView
android:id="@android:id/summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@android:id/title"
android:layout_below="@android:id/title"
android:layout_alignStart="@android:id/title"
android:maxLines="4"
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="?android:attr/textColorSecondary" />
Expand All @@ -86,10 +86,10 @@
<android.support.v7.preference.UnPressableLinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignStart="@android:id/title"
android:layout_below="@android:id/summary"
android:layout_marginEnd="@dimen/pref_seekbar_fix_negative"
android:layout_alignStart="@android:id/title"
android:layout_marginStart="@dimen/pref_seekbar_fix_negative"
android:layout_marginEnd="@dimen/pref_seekbar_fix_negative"
android:clipChildren="false"
android:clipToPadding="false">

Expand All @@ -101,8 +101,8 @@
android:background="@null"
android:clickable="false"
android:focusable="false"
android:paddingEnd="@dimen/pref_seekbar_fix_positive"
android:paddingStart="@dimen/pref_seekbar_fix_positive" />
android:paddingStart="@dimen/pref_seekbar_fix_positive"
android:paddingEnd="@dimen/pref_seekbar_fix_positive" />

<TextView
android:id="@+id/seekbar_value"
Expand All @@ -112,10 +112,11 @@
android:layout_marginStart="@dimen/preference_seekbar_padding_end"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:fontFamily="sans-serif-condensed"
android:gravity="end|center_vertical"
android:maxLines="1"
android:scrollbars="none"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
android:textAppearance="@style/Preference_TextAppearanceMaterialSubhead" />
</android.support.v7.preference.UnPressableLinearLayout>

</RelativeLayout>
Expand Down
Loading

0 comments on commit 3a592ae

Please sign in to comment.