-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add preferences #84
Add preferences #84
Conversation
@@ -25,18 +25,18 @@ android { | |||
} | |||
|
|||
dependencies { | |||
compile fileTree(dir: 'libs', include: ['*.jar']) | |||
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { | |||
implementation fileTree(dir: 'libs', include: ['*.jar']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, would you kindly change a few things before I merge :)
README.md
Outdated
@@ -162,10 +162,12 @@ MaterialAboutCard card = new MaterialAboutCard.Builder() | |||
|
|||
### Add Items to a card: | |||
|
|||
There are currently two types of items you can add to a card - [`MaterialAboutTitleItem`][9] and [`MaterialAboutActionItem`][10]. Other types of items are planned, for example "person" items which feature buttons to showcase a single person. Feel free to submit a PR or Issue for more item ideas. | |||
There are currently 4 types of items you can add to a card - [`MaterialPreferenceTitleItem`][9], [`MaterialPreferenceActionItem`][10], [`MaterialPreferenceCheckboxItem`][12] and [`MaterialPreferenceSwitchItem`][13]. Other types of items are planned, for example "person" items which feature buttons to showcase a single person. Feel free to submit a PR or Issue for more item ideas. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use the naming convention MaterialAboutCheckboxItem
and MaterialAboutTitleItem
etc. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oups
build.gradle
Outdated
@@ -28,6 +28,7 @@ ext { | |||
minSdkVersion = 14 | |||
|
|||
supportLibVersion = '27.1.1' | |||
constraintLayoutLibVersion = '1.1.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the constraint layout library used at all?
/** | ||
* Created by François Dexemple on 04/05/2018 | ||
*/ | ||
public interface MaterialAboutOnCheckedChangedListener { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename this to MaterialAboutItemOnCheckedChangedAction
for consistency. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I will do it but it's not really an action (like click), it's a listener
@@ -1,28 +1,39 @@ | |||
package com.danielstone.materialaboutlibrary.util; | |||
|
|||
import android.content.Context; | |||
import android.icu.util.ValueIterator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this import used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, I delete it
@@ -0,0 +1,85 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh. Could you possibly create the layout with LinearLayouts etc, just to keep dependencies down when not needed. :)
@@ -0,0 +1,84 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
I made the corrections. The only details I did not manage to do with Linear layout is to center the switch and the checkbox. You'll see when you put a checkbox under a switch that they are not centered |
Thanks! I'll check it out and merge onto master branch later |
I forget some error in the README. See PR #86 |
#77