android-listview

Changing focus from Button in ListView row to list item

雨燕双飞 提交于 2019-12-14 00:26:06
问题 I have a ListView with list items that have a Button on them. You can no longer select the list item, only the Button on the list item. How do you change the focus back to the list item? 回答1: For the Button in your list row layout add the attribute: android:focusable="false" 来源: https://stackoverflow.com/questions/9572990/changing-focus-from-button-in-listview-row-to-list-item

Android RecyclerView Edittext issue

ぃ、小莉子 提交于 2019-12-14 00:19:30
问题 I'm creating a list of editable items (received from backend). I'm using the "new" recyclerview for this. There a couple of possible viewTypes in my recyclerview: checkbox spinner edittext The problem I'm having is with the EditText gaining focus. AdjustResize kicks in fine and my keyboard is shown. But the EditText that has gained focus isn't visible anymore in the list. (position in the list in the now resized portion is below the visible positions). I don't want to be using AdjustPan in

How to display data in a ListView once you parse the XML with nested tag?

南楼画角 提交于 2019-12-13 22:44:30
问题 I have the XML file which is like this: <activities> <activity> <filename>http://www.someurl.com/documentSetting/members/0/701/66/videos/521/521.mp4</filename> <thumbnail>http://www.someurl.com/documentSetting/members/0/701/66/videos/521/521_120x90.jpg</thumbnail> <id>521</id> <is_private>0</is_private> <comments> <comment> <id>111</id> <body>Good video</body> <member_id>oo7</member_id> <profile_image>http://www.someurl.com/images/avatar/default_male_qlone.png</profile_image> </comment>

ListView items hide behind the EditText. Need whatsapp like chat activity

随声附和 提交于 2019-12-13 22:40:23
问题 I am having trouble in my layout implementation. Whenever I click on the edittext the softinput keyboard appears and hides the listview items, what i need is that whenever soft keyboard pops up and if the listview's last item is visible, it should be brought above the edit text, if its not visible, the list should remain the way it is (the same way it is in whatsapp), heres my layout code <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas

Empty text view message when listview is empty

有些话、适合烂在心里 提交于 2019-12-13 21:20:01
问题 I have a ListView with an empty list catch in the XML and it works fine. How to toggle ListView Empty Text please ? This is my XML code : <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <TextView android:id="@+id/empty" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/emptyList" />

ListView using multiple Subitems

人走茶凉 提交于 2019-12-13 20:36:02
问题 Hello and again a question about a List this time.. a ListView...... I'm using a BaseAdapter to inflate a layout which includes a RelativeLayout(Parent) and 4 ImagesViews which are alignBaseline(horizontal) to the first ImageView.(It doesn't really matter) They all have the same source, which is an imageArray. The Problem is that the getView-Method only fires for every ListItem created/reused/scrolled into the view..but not for the childs of the ListItem(my ImageViews). So as you already

Ignore spaces while searching listview android [duplicate]

家住魔仙堡 提交于 2019-12-13 20:03:10
问题 This question already has answers here : How to delete instantly SPACE from an edittext if a user presses the space? (7 answers) Closed 5 years ago . I am using an edittext and a listview in my app. I implemented the search functionality and made the edittext a search bar. I am using a TextWatcher to detect changes instantly. But when I type space into the edittext , all the listview items are gone. So, how do I ignore the spaces typed by the user into the edittext ?: public class

Don't change the name on the listView

拟墨画扇 提交于 2019-12-13 18:43:43
问题 I have a listView in Activity A as shown below. All the values and name were actually returned from Activity C to B then only A. When the first list is clicked, it should display text Project and value 3 on editText B. But it displays Medical which was actually getting from the last list. After I change the value from 3 to 43 and return to A, the name changed. What should I do so that the name will remain the same ? Activity A ArrayAdapter<String> adapter; ArrayList<String> m_listItems = new

Add header Image in navigation drawer on android studio sample navigation drawer

僤鯓⒐⒋嵵緔 提交于 2019-12-13 18:37:53
问题 i need to add header image like this Post : can I add an image header in navigation drawer layout but, im using android studio sample navigation drawer for doing this. it is good or bad for design this ? and the better way or Compact way for doing this ? any suggestion ? thanks. 回答1: Can I add an Image Header in Navigation Drawer Layout? Yes you can add with no problems. If you use android studio navigation drawer or some thing else every thing are same. Some additional methods will be

AsyncTask NullPointerException

柔情痞子 提交于 2019-12-13 18:25:47
问题 I am using AsyncTask class and as soon as i start the app I am getting null pointer exception and app goes Forceclose.In this Activity i want to parse the json string and load the data in listview. here is the Activiy. public class JsonExampleActivity extends ListActivity { /** Called when the activity is first created. */ ProgressDialog mDialog; Context mContext; Location location; LocationManager lm; final String TAG="a.c.b"; JSONFunction JSONfunction; double latitude[]=new double[20];