kenumir / materialsettings Goto Github PK
View Code? Open in Web Editor NEWMaterialSettings - small library to create settings activity
License: Other
MaterialSettings - small library to create settings activity
License: Other
ActionBarActivity not exist now
can you please update the library ?
Exactly where should the jitpack ref go...
I'm having incredible issues with jitpack and dependencies....
thanks
Hi,
This library cannot be compiled with the latest support libraries due to the fact it is not based on AppCompatActivity.
Hi.
I'm trying to add item in a for loop, But it has error :" Binary XML file line #13: You must supply a layout_width attribute. "
I'm using this code in onCreate() method:
List<ParseObject> list = null;
try {
list = query.find();
} catch (ParseException e) {
e.printStackTrace();
}
for (int i = 0; i < list.size(); i++) {
addItem(new SwitcherItem(getApplication(), String.valueOf(i)).setTitle(list.get(i).getString("title")));
}
The list has 6 items.
I also added them to activity
<activity
android:name=".Activity.SettingActivity"
android:label="@string/title_activity_setting"
android:theme="@style/MaterialSettingsTheme">
</activity>
How to save data after close activity? I didn't find it in the sample.
FYI the download link https://bintray.com/kenumir/MaterialDialogs/MaterialSettings/_latestVersion responds with a 404.
Caused by: java.lang.RuntimeException: Binary XML file line #2: You must supply a layout_width attribute.
java.lang.RuntimeException: Unable to start activity ComponentInfo{cn.liuyanbing.surveyor/cn.liuyanbing.surveyor.activity.SettingsActivity}: java.lang.RuntimeException: Binary XML file line #2: You must supply a layout_width attribute.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2190)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2239)
at android.app.ActivityThread.access$800(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1202)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5047)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Binary XML file line #2: You must supply a layout_width attribute.
at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:492)
at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:5948)
at android.view.ViewGroup$MarginLayoutParams.(ViewGroup.java:6117)
at android.widget.LinearLayout$LayoutParams.(LinearLayout.java:1831)
at android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:1743)
at android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:58)
at android.view.LayoutInflater.inflate(LayoutInflater.java:483)
at android.view.LayoutInflater.inflate(LayoutInflater.java:400)
at com.kenumir.materialsettings.MaterialSettingsItem.initView(MaterialSettingsItem.java:31)
at com.kenumir.materialsettings.MaterialSettingsItem.getView(MaterialSettingsItem.java:36)
at com.kenumir.materialsettings.MaterialSettings.addItem(MaterialSettings.java:131)
at cn.liuyanbing.surveyor.activity.SettingsActivity.onCreate(SettingsActivity.java:20)
at android.app.Activity.performCreate(Activity.java:5249)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2154)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2239)
at android.app.ActivityThread.access$800(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1202)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5047)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)
Add class MaterialSettingsFragment like activity (MaterialSettings) to embed settings inside app frame.
Can we add an item for drop down list ?
I see the error
Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: You must supply a layout_width attribute.
Caused by: java.lang.UnsupportedOperationException: Binary XML file line #2: You must supply a layout_width attribute.
I am getting the below error when i add the repository and dependency in the gradle file.
Error:Artifact 'appcompat-v7.jar (com.android.support:appcompat-v7:22.0.0)' not found.
Searched in the following locations:
https://jitpack.io/com/android/support/appcompat-v7/22.0.0/appcompat-v7-22.0.0.jar
I installed the sample example of this library, but when I checked CheckboxItem, then I returned to open setting Activity, The Value wasn't saved.
I debugged the sample app, I Found this Code is commented, I removed the comments on this code,
//if (ctx instanceof MaterialSettingsFragment)
// this.mMaterialSettings = (MaterialSettingsFragment) ctx;
THE SAMPLE EXAMPLE WORKED :D :D
Or something like flag android:dependency in standard CheckBoxPreference
All settings is set like in demo app. Error occurs when starting settings activity.
03-25 10:19:54.474 17243-17243/com.sampleapp E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.hv.sampleapp , PID: 17243
java.lang.NoSuchFieldError: No static field material_settings_top_frame of type I in class Lcom/kenumir/materialsettings/R$id; or its superclasses (declaration of 'com.kenumir.materialsettings.R$id' appears in /data/app/app-1/base.apk)
at com.kenumir.materialsettings.MaterialSettings.onCreate(MaterialSettings.java:59)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
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.