divider

Remove the bottom divider of an android ListView

偶尔善良 提交于 2019-11-27 11:04:12
I have a fixed height ListView . It has divider between list items, but it also displays dividers after the last list item. Is there a way to not display a divider after the last item in ListView ? Just add android:footerDividersEnabled="false" to your ListView description As @ScootrNova said, this seems to be behaving differently (a.k.a buggy) in android 4.4.x (I don't know exactly when the problem is introduced) This is related to the specific case of using using padding + clipToPadding="false" - in 4.4.x the footer is drawn outside of the view but clips to padding reveals it. The solution I

Listview divider margin

£可爱£侵袭症+ 提交于 2019-11-27 10:30:18
问题 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=

How can I add a custom divider image to the UITabBar?

。_饼干妹妹 提交于 2019-11-27 05:49:52
问题 I have a UITabBar that I am trying to style after the new iOS 6 App Store look. I have some pretty good looking gradients, but I am wondering how to set the divider image. Aside from manually adding the line to each image, is there anything I can do to reproduce the divider look? 回答1: You can add an image for each item , for the selected and unselected states. Like this: UIImage *selectedImage0 = [UIImage imageNamed:@"image1.png"]; UIImage *unselectedImage0 = [UIImage imageNamed:@"image1

RecyclerView remove divider / decorator after the last item

可紊 提交于 2019-11-27 05:28:02
问题 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"/>

How to show divider between spinner items?

北城余情 提交于 2019-11-27 04:35:13
问题 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? 回答1: 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=

NavigationView: how to insert divider without subgroup?

纵饮孤独 提交于 2019-11-27 04:06:12
问题 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

How to set divider between columns in tablelayout?

只谈情不闲聊 提交于 2019-11-27 03:26:15
问题 I want to create a table with column dividers. I want to divide my columns with a vertical bar image. To achieve this I have used "android:divider="@drawable/abc" but its not working. Below is my xml file for same: <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" android:stretchColumns="*" android:padding="5dip" android:divider="@drawable/tracking_green" > <TableRow

Android GridView draw dividers

有些话、适合烂在心里 提交于 2019-11-27 00:06:33
I'd like to know the simplest way to draw dividers between items (currently textviews) within a GridView. The only way I can think of is to draw borders around those textviews so when combined, they look like continuous horizontal and vertical dividers. There is a setDivider() for listviews but not gridviews? Thanks. Unfortunately, after looking at the source code, I could not see any easy way to add borders other than taking the approach of adding borders to the each cell. As a reference, I will post my solution here. list_item.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns

Styling titleDivider in Dialog

核能气质少年 提交于 2019-11-26 21:10: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

How to add (vertical) divider to a horizontal LinearLayout?

我是研究僧i 提交于 2019-11-26 19:34:11
I'm trying to add a divider to a horizontal linear layout but am getting nowhere. The divider just doesn't show. I am a total newbie with Android. This is my layout XML: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" > <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/llTopBar" android:orientation="horizontal" android:divider="#00ff00" android:dividerPadding="22dip"