Comments (10)
I don't understand what do you mean by padding here. Title, summary, icon and other components of AbsMaterialPreferences subclasses have predefined paddings.
As for the default value - yeah, good point. Will add this when I have time.
from materialpreferences.
Here what i want to say, without padding and with padding and divider using linearlayout.
from materialpreferences.
Send your xml please.
from materialpreferences.
I use LinearLayout with android:paddingStart and android:paddingEnd because it's not possible with MaterialStandardPreference, ...
` < com.yarolegovich.mp.MaterialPreferenceCategory
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/pref_cat_general"
app:mpc_title="@string/pref_general"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/activity_horizontal_margin"
android:paddingEnd="@dimen/activity_horizontal_margin"
android:divider="@drawable/divider"
android:showDividers="middle"
android:orientation="vertical">
<com.yarolegovich.mp.MaterialChoicePreference
android:layout_width="match_parent"
android:layout_height="50dp"
android:id="@+id/pref_language"
app:mp_key="pref_key_language"
app:mp_default_value="English"
app:mp_title="@string/pref_title_languages"
app:mp_show_value="onRight"
app:mp_entry_values="@array/languages" />
<com.yarolegovich.mp.MaterialStandardPreference
android:layout_width="match_parent"
android:layout_height="50dp"
app:mp_title="Copyright"
app:mp_summary="Inovim @ 2016" />
<com.yarolegovich.mp.MaterialStandardPreference
android:layout_width="match_parent"
android:layout_height="50dp"
android:id="@+id/pref_version"
app:mp_key="pref_key_version"
app:mp_title="Version" />
</LinearLayout>
</com.yarolegovich.mp.MaterialPreferenceCategory>`
from materialpreferences.
What version are you testing on? LinearLayout is not needed there, paddings should already be applied (no need to specify them in preference category too).
And better not hardcode height, this can cut some part of info.
https://pp.vk.me/c630322/v630322751/31fad/HA_CLCLrQ90.jpg
https://pp.vk.me/c630322/v630322751/31fa3/ncLIWfzp1W0.jpg
from materialpreferences.
Api 18 it's not working, then I add LinearLayout, tested on API 23 it's working but I need for API 18.
from materialpreferences.
I figured it out. Think this is due to support library update. For some reason
setBackgroundResource(Utils.clickableBackground(getContext()));
Removed paddings on pre-lollipop. Will push an update in 10 minutes. Thank you for pointing.
https://github.com/yarolegovich/MaterialPreferences/blob/master/library/src/main/java/com/yarolegovich/mp/AbsMaterialPreference.java#L213
from materialpreferences.
Ok thanks, It'll be good too to put divider for MaterialPreferenceCategory.
from materialpreferences.
use version 1.0.5 now. should work.
as for dividers - I don't have time now, maybe later. or you can do it yourself and create a pull request ;)
from materialpreferences.
Ok if I've time too.
from materialpreferences.
Related Issues (12)
- Layout inflating error HOT 5
- Crash
- Define MaterialChoicePreference entries at runtime HOT 1
- CompositeClickListener doesn't function as expected HOT 1
- Missing setters HOT 2
- MaterialChoicePreference change text color
- jCenter() issue
- How to read setting value in my code
- Support for RTL HOT 3
- Problem using MaterialPreferences and tabs. HOT 1
- MaterialMultiChoicePreference supports dynamic entries? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from materialpreferences.