jenzz / android-materialpreference Goto Github PK
View Code? Open in Web Editor NEW[DEPRECATED] A simple backward-compatible implementation of a Material Design Preference aka settings item
License: MIT License
[DEPRECATED] A simple backward-compatible implementation of a Material Design Preference aka settings item
License: MIT License
In the readme you wanted to show a side-by-side comparison but the material screenshot is missing. Would be nice to have to be able to compare before using the lib. Thanks!
Temporary workaround for now: Just use AppCompat's colorAccent
style attribute.
I'm trying to change the color of the title text and the background and I can't. Could you tell me if there's anyway to customize the colors of my preference layout?
This is what I am currently doing. Problem is I am getting NPE on the onPreferenceClickListener.
I am needing to set the color through code and not a theme. i figured I could just override this method and set the color this way. If I comment out all the listeners then I don't get a NPE and it changes the category text color. But doing it this way is causing the preferences not to be found for some reason
Just something to note. Everything worked just fine before overriding the PreferenceCategory so I know the error isn't somewhere else in my code.
MyPreferenceCategory.Java
import com.jenzz.materialpreference.PreferenceCategory;
import android.widget.TextView;
public class MyPreferenceCategory extends PreferenceCategory {
public MyPreferenceCategory(Context context) {
super(context);
}
@Override
protected void onBindView(View view) {
super.onBindView(view);
TextView titleView = (TextView) view.findViewById(R.id.title);
titleView.setTextColor(Color.BLUE);
}
}
Fragment.java
com.jenzz.materialpreference.Preference installPref = (com.jenzz.materialpreference.Preference) findPreference("install");
installPref.setOnPreferenceClickListener(this);
Layout.xml
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:id="@+id/screen">
<com.my.app.MyPreferenceCategory
android:title="@string/lbl_installText"
android:key="installCat">
<com.jenzz.materialpreference.Preference
android:title="@string/lbl_install"
android:key="install" >
</com.jenzz.materialpreference.Preference>
</com.my.app.MyPreferenceCategory>
</PreferenceScreen>
i user toolbar ,the padding is error
Title says it all...
There is an issue while including the gradle into project.It giving the error as not reolved
Would you add support for ListPreference and MultiSelectListPreference ?
Thanks
Are you going to implement PreferenceScreen?
As in title, I have my disableDependentsState set to true, so that when my CheckBox is ticked, another pref is disabled, however no matter how I set the attribute, the other pref is always enabled/disabled when CheckBox on/off respectively
I've tried using the source lib and changing line 42 to look in index 2 (which I think is correct anyway) but it still doesn't seem to work
Thanks for the lib!
The categories and preferences are aligning with each other. I see that is the way the sample app is. But is there anyway to change that? Didn't see any reference for it so I thought I would ask
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.