Skip to content
This repository was archived by the owner on May 1, 2021. It is now read-only.

Commit 082259a

Browse files
fixed crashes . updated SDK versions
1 parent 508ce7a commit 082259a

File tree

9 files changed

+20
-17
lines changed

9 files changed

+20
-17
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
.DS_Store
66
/build
77
/captures
8+
/app/*.log
9+
/*.log

app/app.iml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
7272
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
7373
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
74-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.0/jars" />
74+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.1/jars" />
7575
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
7676
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
7777
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
@@ -89,8 +89,8 @@
8989
</content>
9090
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
9191
<orderEntry type="sourceFolder" forTests="false" />
92-
<orderEntry type="library" exported="" name="support-annotations-22.2.0" level="project" />
93-
<orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" />
92+
<orderEntry type="library" exported="" name="support-v4-22.2.1" level="project" />
93+
<orderEntry type="library" exported="" name="support-annotations-22.2.1" level="project" />
9494
<orderEntry type="module" module-name="material_preferences_library" exported="" />
9595
</component>
9696
</module>

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ android {
2525

2626
dependencies {
2727
compile fileTree(include: ['*.jar'], dir: 'libs')
28+
compile 'com.android.support:support-v4:22.2.1'
2829
compile project(':material_preferences_library')
29-
compile 'com.android.support:support-v4:22.2.0'
3030
}

app/src/main/res/xml/settings_example.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
android:summary="just some summary text"
66
android:title="A simple Preference"/>
77

8+
<!--Note: for icons, you need to use this : app:icon="..." -->
9+
810
<com.lb.material_preferences_library.custom_preferences.ListPreference
911
android:defaultValue="dark"
1012
android:key="@string/pref_theme"

material_preferences_library/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ android {
2525

2626
dependencies {
2727
compile fileTree(include: ['*.jar'], dir: 'libs')
28-
compile 'com.android.support:appcompat-v7:22.2.0'
28+
compile 'com.android.support:appcompat-v7:22.2.1'
2929
}

material_preferences_library/material_preferences_library.iml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@
8989
</content>
9090
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
9191
<orderEntry type="sourceFolder" forTests="false" />
92-
<orderEntry type="library" exported="" name="support-annotations-22.2.0" level="project" />
93-
<orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" />
94-
<orderEntry type="library" exported="" name="appcompat-v7-22.2.0" level="project" />
92+
<orderEntry type="library" exported="" name="support-v4-22.2.1" level="project" />
93+
<orderEntry type="library" exported="" name="support-annotations-22.2.1" level="project" />
94+
<orderEntry type="library" exported="" name="appcompat-v7-22.2.1" level="project" />
9595
</component>
9696
</module>

material_preferences_library/src/main/java/com/lb/material_preferences_library/custom_preferences/DialogPreference.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ protected void init(final Context context,final AttributeSet attrs,final int def
107107
mDialogIcon=a.getDrawable(R.styleable.DialogPreference_dialogIcon);
108108
mPositiveButtonText=a.getString(R.styleable.DialogPreference_positiveButtonText);
109109
mNegativeButtonText=a.getString(R.styleable.DialogPreference_negativeButtonText);
110-
mDialogLayoutResId=a.getResourceId(R.styleable.DialogPreference_dialogLayout,
111-
mDialogLayoutResId);
110+
mDialogLayoutResId=a.getResourceId(R.styleable.DialogPreference_dialogLayout,mDialogLayoutResId);
112111
a.recycle();
113112
}
114113

@@ -143,7 +142,7 @@ public void setDialogTitle(int dialogTitleResId)
143142

144143
/**
145144
* Sets the message of the dialog. This will be shown on subsequent dialogs.
146-
* <p>
145+
* <p/>
147146
* This message forms the content View of the dialog and conflicts with
148147
* list-based dialogs, for example. If setting a custom View on a dialog via
149148
* {@link #setDialogLayoutResource(int)}, include a text View with ID
@@ -294,7 +293,7 @@ public void setDialogLayoutResource(int dialogLayoutResId)
294293
/**
295294
* Prepares the dialog builder to be shown when the preference is clicked.
296295
* Use this to set custom properties on the dialog.
297-
* <p>
296+
* <p/>
298297
* Do not {@link AlertDialog.Builder#create()} or
299298
* {@link AlertDialog.Builder#show()}.
300299
*/
@@ -397,7 +396,7 @@ protected View onCreateDialogView()
397396

398397
/**
399398
* Binds views in the content View of the dialog to data.
400-
* <p>
399+
* <p/>
401400
* Make sure to call through to the superclass implementation.
402401
*
403402
* @param view The content View of the dialog, if it is custom.

material_preferences_library/src/main/java/com/lb/material_preferences_library/custom_preferences/Preference.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ public class Preference extends android.preference.Preference
2323
protected void init(final Context context,final AttributeSet attrs,final int defStyleAttr,final int defStyleRes)
2424
{
2525
setLayoutResource(R.layout.mpl__preference);
26-
final TypedArray a=context.obtainStyledAttributes(
27-
attrs,R.styleable.Preference,defStyleAttr,defStyleRes);
28-
_iconResId=a.getResourceId(a.getIndex(R.styleable.Preference_icon),0);
26+
final TypedArray a=context.obtainStyledAttributes(attrs,R.styleable.Preference,defStyleAttr,defStyleRes);
27+
_iconResId=a.getResourceId(R.styleable.Preference_icon,0);
28+
a.recycle();
2929
}
3030

3131
@TargetApi(VERSION_CODES.LOLLIPOP)

material_preferences_library/src/main/res/values/mpl__attrs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- Base attributes available to Preference. -->
1010
<declare-styleable name="Preference">
1111
<!-- The optional icon for the preference -->
12-
<attr name="icon"/>
12+
<attr name="icon" />
1313
</declare-styleable>
1414

1515
<!-- Default style for DialogPreference. -->

0 commit comments

Comments
 (0)