android-listfragment

ListFragment / CursorAdapter Showing Empty (No Data)

旧街凉风 提交于 2019-12-10 18:54:59
问题 I am unable to get my listview to display my data, it only shows the empty/no data textview. I have been trying to solve this one for a while, scoured stackoverflow and the net. Tried lots of different things. Logcat shows that my newView/bindView is not getting called/reached. I think that it is either an error in my XML layout (my CursorAdapter doesn't know to inflate my row layout/view). <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res

ImageView loading high resolution image as very poor quality

ぃ、小莉子 提交于 2019-12-10 17:05:12
问题 I am using a ListFragment to display a ListView of Lazy Loaded ImageView objects using the Android Universal Image Loader. The correct data is coming from my datasource and I have the URL to my fairly high resolution images (about 1000px wide, 150kb). I am using these to completely fill each row that is 110dp high. The problem I am having is the images are loading at a very poor resolution: The problem isn't the source image as it is high enough quality: http://www.puc.edu/__data/assets/image

Android: cannot refresh Listview using CustomAdapter

邮差的信 提交于 2019-12-10 13:14:47
问题 I need to refresh the list view with new data. This code below is used to obtain data in OnCreateView that is in FragmentActivity at the first time. override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? { val url = "something" val request_queue = Volley.newRequestQueue(this.context) val stringRequest = StringRequest(Request.Method.GET, url, Response.Listener<String> { response -> val pending_job = Gson().fromJson<ArrayList<HashMap

ListFragment hide indeterminant progress indicator when using custom view

痞子三分冷 提交于 2019-12-10 12:21:57
问题 I currently have a ListFragment from which I am returning a custom ListView from the OnCreateView() (included below). The issue I have is when there are only a few items in the view, you can see the progress indicator in the background. setListShown(true) hides the progress indicator, but when returning a custom view it results in an IllegalStateException. Any ideas on a way to hide the progress indicator? @Override public ListView onCreateView(LayoutInflater inflater, ViewGroup container,

ListFragment multi-choice does not show selection

浪子不回头ぞ 提交于 2019-12-10 11:33:23
问题 I'm trying to implement the contextual action bar in my app. I'm extending a ListFragment and I have a custom ArrayAdapter and list item xml defined. Clicking on items works fine and the background color changes on the list item. Where I'm running into trouble is when selecting multiple items. The contextual action bar comes up and I can tell I'm actually selecting items when I touch them because I'm having it log which items are selected, but the background highlight color on the list item

Android ImageView does not match_parent inside FrameLayout below GingerBread

烂漫一生 提交于 2019-12-10 03:05:41
问题 I am trying to build a speech bubble for a chat room. Each of the speech bubbles has the attached xml layout. I am achieving this by setting the textView to wrap_content , the speech bubble imageView to match_parent and the frame_layout to wrap_content . So that the speech_bubble image behind the text scales according to the amount of text in the bubble. I set the width on the textView to match parent and the height to wrap_content and for some reason, it works perfectly as required in Ice

update ListFragment when Activity finishes

て烟熏妆下的殇ゞ 提交于 2019-12-09 19:00:32
问题 I have create a listfragment and a button which looks like as follows ( Image on the left ) whenever i click on a ADD button a new Activity opens up and inside that user write something and click on DONE , the activty finishes and return to the ListFragment , but after click over DONE how would i update the ListFragment with new values. i mean where can i write notifyDataSetChanged. Note: when i click on DONE , the data will get store in the database , and when the ListFragment loads , it

Android, Tab layout which has listfragment from json parsing

好久不见. 提交于 2019-12-08 13:11:16
问题 i'm trying to build android app which has tab layout which also has listfragment. i want total of three tabs, first home, second listview and third when clicked on listview it switches to third tabs and show some information all using json parsing. i'm using this tutorials as a reference http://www.androidhive.info/2013/10/android-tab-layout-with-swipeable-views-1/ and for listview i'm using following - http://www.androidhive.info/2012/10/android-multilevel-listview-tutorial/ Now the question

ListFragment RuntimeException 'android.R.id.list' missing

早过忘川 提交于 2019-12-08 09:45:09
问题 Edit 1/16/2013: Problem Resolved! Two days ago, I released an updated version of the app and correctly identified the ListViews as I had originally done, by using android:id="@android:id/list . Really though, the exception being thrown was misleading and that had nothing to do with the actual problem... The real fix came when I implemented the suggestions by Sean on inflating the ListFragment views by passing null to the ViewGroup . I have not received the same Exception from the new version,

How to pass data between multiple Fragments in Android

筅森魡賤 提交于 2019-12-08 07:33:23
问题 In my main Activity, I have a DialogFragment that contains a FragmentTabHost. I have two tabs, one that is a DialogFragment and one that is a ListFragment. When either the 'OK' button is pressed in the inner DialogFragment or when an element in the ListFragment is pressed, I want to pass two Strings (that are entered in two TextView's in the inner DialogFragment and are displayed in each element in the ListFragment) back to the Activity, but I am unsure of how to do this with multiple levels