divider

Listview divider margin

若如初见. 提交于 2019-11-28 17:14:02
I'm trying to set a margin to a listview divider. The divider is a dashed line: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line" > <stroke android:dashGap="1dp" android:dashWidth="1.5dp" android:width="1dp" android:color="#FF404040" /> <size android:height="3dp" /> </shape> and a listview where i set the divider <ListView android:id="@+id/lv_news_feed_list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/white" android:divider="@drawable/ch_dashed_line_divider" /> but

RecyclerView remove divider / decorator after the last item

爱⌒轻易说出口 提交于 2019-11-28 05:16:46
I have a quite simple RecyclerView. This is how I set the divider DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL); itemDecorator.setDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.news_divider)); recyclerView.addItemDecoration(itemDecorator); And this is drawable/news_divider.xml <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="@color/white_two"/> <size android:height="1dp"/> </shape> The problem is for some stupid reason the divider is not just created

Styling titleDivider in Dialog

筅森魡賤 提交于 2019-11-27 22:48:53
I am wondering how it is possible to get rid of (or change color) titleDivider in Dialog. It is a blue line below dialog title shown on honeycomb+ devices. I guess this is relevant piece of layout from SDK, but since there is no style attribute I dont know how to style it. If i try with findViewById there is no android.R.id.titleDivider <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:fitsSystemWindows="true"> <TextView android:id="@android:id/title" style="?android:attr/windowTitleStyle" android:layout_width="match_parent" android

How to show divider between spinner items?

亡梦爱人 提交于 2019-11-27 21:58:17
I using listviews and expandedviews that has dividers and I can set them but on spinner its looks like it is no divider between items. Someone that has a idea of how to fix this? X09 This worked for me: <style name="SpinnerStyle" parent="Widget.AppCompat.ListView.DropDown"> <item name="android:divider">#d1d1d1</item> <item name="android:dividerHeight">0.5dp</item> </style> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="android:dropDownListViewStyle">@style/SpinnerStyle</item> The advantage of using this is that it doesn't

Android: Cannot style spinner divider

最后都变了- 提交于 2019-11-27 21:26:17
I'm trying to create a theme for my first Android app, and it is driving me round the bend. I finally managed to figure out how to style items in a dropdown list, but now I can't change the colour of the divider between list items. I have searched similar questions on stackoverflow, and tried dozens of combinations, but nothing seems to work. Here is my styles.xml file (abbreviated for clarity): <?xml version="1.0" encoding="utf-8"?> <resources> <style name="MyTheme" parent="android:Theme.Light"> <item name="android:spinnerStyle">@style/spinnerStyle</item> <item name="android

Android divider color DatePicker dialog

偶尔善良 提交于 2019-11-27 20:09:19
问题 I'm trying to change color of the blue dividers for a DatePicker in a dialog. This is just a normal DialogFragment with a DatePicker and a ButtonBar. Does anyone know to change these dividers, or if it's even possible without replacing the entire DatePicker with a custom one? Mini rant Now I've seen too many answers suggesting the following code: <style name="datePickerTheme" parent="@android:style/Widget.DeviceDefault.DatePicker"> <item name="android:divider">**your @drawable/ or @color/

How can I remove the divider between the ActionBar and the tabs

你说的曾经没有我的故事 提交于 2019-11-27 18:29:33
问题 I'm trying to remove the divider between the ActionBar and the tabs but I did not succeed yet. I've tried this <item name="android:actionBarDivider">@color/tab_color</item> in my style.xml but nothing. In few words I'd like to have something like this: Here's my style.xml: <style name="AppTheme" parent="Theme.AppCompat.Light"/> <style name="Theme.Styled" parent="@style/Theme.AppCompat.Light"> <item name="android:windowContentOverlay">@null</item> <item name="android:windowDisablePreview">true

NavigationView: how to insert divider without subgroup?

你。 提交于 2019-11-27 14:37:00
How I can put a divider without title Subgroup in the new NavigationView? <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <group android:checkableBehavior="single"> <item android:id="@+id/drawer_armario" android:icon="@drawable/armario" android:title="@string/armario" /> <item android:id="@+id/drawer_amigos" android:icon="@drawable/amigos" android:title="@string/amigos" /> </group> <item android:title="Configuración"> <menu> <item android:id="@+id/drawer_ajustes" android:icon="@drawable/ajustes" android:title="@string/ajustes" /> <item

How to generate a ListView with headers above some sections?

不羁岁月 提交于 2019-11-27 14:30:47
I want to generate a ListView that has some dividers between some of the entries, like it can be seen in some of the property sections. See the example below. I try to generate a List that consists of some textviews followed by one of the fancy dividers explaining the next part of the list and then again some text views. How can this be done? I thought about creating different views to add to the list? Is this the way to go? I got a solution. I don't know if it is the best one. I use a custom adapter derived from ArrayAdapter for the list as described in this tutorial . In the adapter class I

How to add dividers between specific menu items?

◇◆丶佛笑我妖孽 提交于 2019-11-27 12:47:32
Background I have a menu item in the action bar (toolbar actually) that when clicked, shows a list of items to choose from, similar to radio-buttons: <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:icon="@drawable/..." android:title="@string/..." app:showAsAction="always"> <menu> <group android:id="@+id/..." android:checkableBehavior="single"> <item .../> <item .../> <item .../> </group> </menu> </item> </menu> I need to put an item below this list of items, that will have a divider between it and the list.