android-listview

How to set WearableListView item height

落花浮王杯 提交于 2019-12-10 12:47:43
问题 I make WearableListView list. Problem is that setting android:layout_height="20dp" doesn't help How to set height in this case? In Android Wear sample projects Notifications and Timer they also just set atribute android:layout_height="80dp". But I tried to set in the projects android:layout_height="20dp" but it didn't help! (below is my project source code): list_item.xml: <?xml version="1.0" encoding="utf-8"?> <base.mobitee.com.mobiteewatch.adapter.HolesListItemLayout xmlns:android="http:/

Android ListActivity - how to add a view below the ListView?

南笙酒味 提交于 2019-12-10 12:46:44
问题 I'm trying to put a ProgressBar view below a ListView for a ListActivity. I want it to be always below the last row in the listView. The ProgressBar, which is placed in a LinearLayout, does appear, as long as the list (which is filled by an adapter at runtime) is not exceeding the screen. As soon as the list is larger than the screen, the ProgressBar is no longer visible. The layout xml looks like this: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android

Fragment has default white background on replace() instead of transparent one

為{幸葍}努か 提交于 2019-12-10 12:45:34
问题 I am facing a strange problem while using fragments and just cant figure it out. When I am replacing fragments inside my MainActivity container, some will keep the desired transparent background, and some will show a default-like white one. I actually want all my fragments to be transparent and 'use' the background assigned to the MainActivity. For example: Fragment A: white background <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"

Change listview adapter to recycler view adapter

╄→尐↘猪︶ㄣ 提交于 2019-12-10 12:35:27
问题 When I load images from SD card to ListView, it starts lagging. I can not scroll smoothly. So, I decided to use recycler view and maybe Picasso. The only problem I am facing is that, ListView adapter is not working with RecyclerView. How can I rewrite the following code/adapter to work with RecyclerView? All the best and Happy New Year! public class Saveditems extends BaseActivity { ArrayList<String> f = new ArrayList<>();// list of file paths File[] listFile; @Override public void onCreate

Listview not getting populated, getView() isn't getting called

萝らか妹 提交于 2019-12-10 12:31:04
问题 I'm having a few problems getting my listview to show up in a simple application i'm writing. For some reason the getView() method of my adapter class isn't getting called. However, when when getCount() is called in my adapter class it isn't returning 0 but is in fact returning the proper value. I'm really confused as to why this isn't working. Here is my Activity: import android.app.Activity; import android.os.Bundle; import android.widget.ListView; public class CardListActivity extends

Android BaseAdapter ListView Button Click to access other activity item

只愿长相守 提交于 2019-12-10 12:24:16
问题 I have BaseAdapter class for listview , two button is in this listview . When click this button ,i want to that open or closing slinding drawer . Full screen my application picture http://tinypic.com/view.php?pic=wtjg2s&s=8#.VFngCvmsXtt My baseadapter class public class SCariList extends BaseAdapter{ NCari cari = new NCari(); Context context; Activity activity; private LayoutInflater inflater; private List<NCari> cariList; public SCariList(Activity activity , List<NCari> cariler,Context con){

Android ListView setOnItemClickListener not registering click with custom adapter

戏子无情 提交于 2019-12-10 12:21:49
问题 Well, I am not sure what is up. I've been through many SO "answers" without any results. I have a custom adapter running on my listview. I want to be able to click on the list item to "see more" but I cannot even get the click to register. Here is my activity: import java.util.ArrayList; import java.util.List; import android.app.ProgressDialog; import android.content.Context; import android.os.Bundle; import android.text.method.LinkMovementMethod; import android.util.Log; import android.view

custom ArrayAdapter<Object> ViewHolder : imageView changes for several items in Listview not for one only

折月煮酒 提交于 2019-12-10 12:18:59
问题 ok i encounter a problem with this custom ArrayAdapter public class AuthorsAdapter extends ArrayAdapter<Entity> { View row; static class ViewHolder { TextView textViewTitle; TextView textViewEntitySummary; ImageView imageViewPicture; } public AuthorsAdapter(Context context, LinkedList<Entity> entity) { super(context, 0, entity); } @Override public View getView( final int position, View convertView, final ViewGroup parent) { row = convertView; final ViewHolder holder; if (row == null) { row =

Get name of ListView item

老子叫甜甜 提交于 2019-12-10 12:17:46
问题 I can't get name of ListView item by click. I fill data from database with SimpleCursorAdapter , and when I click on item I want to get item name, but I recive data like this android.content.ContentResolver$CursorWrapperInner@4054b988 . How I can get text from it? There is m click listener: protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); Object object = this.getListAdapter().getItem(position); String item = object.toString

hidden listview not showing all elements

你离开我真会死。 提交于 2019-12-10 11:55:06
问题 I have a layout in which there are some tags that opens and closes some extra information. One of these tags, shows a listview. But instead of showing all the elements, it shows just one by one with scrolling enabled. I just want to show all the items in the listview. Normal state of the screen: http://i39.tinypic.com/2n1baq1.png After clicking on the tag: http://i41.tinypic.com/2dvliqq.png This is the critical xml of the screen: <TextView android:id="@+id/tv_school" android:layout_width=