icon right with preference-headers Android -
i used wizard android créate settings activity app. have added custom layout, nothing unusual, background , border.
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="@mipmap/fondo_01"> <listview android:id="@android:id/list" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/corners_main_layout" android:layout_marginleft="16dp" android:layout_marginright="16dp" android:layout_margintop="16dp" android:paddingleft="16dp" /> </relativelayout>
in method onbuildheaders add setcontentview, ok...:
@override @targetapi(build.version_codes.honeycomb) public void onbuildheaders(list<header> target) { loadheadersfromresource(r.xml.pref_headers, target); setcontentview(r.layout.config_custom);
the following xml header:
<preference-headers xmlns:android="http://schemas.android.com/apk/res/android"> <!-- these settings headers used on tablets. --> <header android:fragment="com....." android:icon="@drawable/ic_info_black_24dp" android:title="@string/pref_header_general" /> <header android:fragment="com...." android:icon="@drawable/ic_notifications_black_24dp" android:title="@string/pref_header_notifications" /> <header android:fragment="com......." android:icon="@drawable/ic_sync_black_24dp" android:title="@string/pref_header_data_sync" /> </preference-headers>
"android:icon" add icon left, need add right. how it?
Comments
Post a Comment