GithubHelp home page GithubHelp logo

jenzz / android-materialpreference Goto Github PK

View Code? Open in Web Editor NEW
509.0 509.0 62.0 273 KB

[DEPRECATED] A simple backward-compatible implementation of a Material Design Preference aka settings item

License: MIT License

Java 100.00%

android-materialpreference's People

Contributors

msutherland4807 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-materialpreference's Issues

Gradle issue

There is an issue while including the gradle into project.It giving the error as not reolved

Switch Preference

snap 2015-03-22 at 11 00 26
I just found out there is no switch preference, should I use the one available in stock or switch to something else? any advice? thanks for your reply in advance

Anyway to change the margins

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

Side-by-side comparison missing

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!

CheckBoxPreference disableDependentsState not working

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!

Changing the color of PreferenceCategory Text

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>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.