listview

Android retrieve and display SMS conversation [closed]

吃可爱长大的小学妹 提交于 2021-01-29 08:14:36
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . Improve this question I'm trying to build a sms app. I've managed to get all the inbox message and display them in a thread but my approaching is probably wrong. I use a HashMap to store the address and based on it to delete existing message(only display the newest sms) public

Adding different options for Expandable listview

南笙酒味 提交于 2021-01-29 07:36:56
问题 I have an expandable list View that has a check button, but the problem is I can only add one child item. dataItem.setSubCategory(arSubCategory); arCategory.add(dataItem); dataItem = new DataItem(); dataItem.setCategoryName("Art"); arSubCategory = new ArrayList<>(); for(int j = 1; j < 6; j++) { SubCategoryItem subCategoryItem = newSubCategoryItem(); subCategoryItem.setIsChecked(ConstantManager.CHECK_BOX_CHECKED_FALSE); subCategoryItem.setSubCategoryName("Art: "+j); arSubCategory.add

Adding different options for Expandable listview

十年热恋 提交于 2021-01-29 07:31:21
问题 I have an expandable list View that has a check button, but the problem is I can only add one child item. dataItem.setSubCategory(arSubCategory); arCategory.add(dataItem); dataItem = new DataItem(); dataItem.setCategoryName("Art"); arSubCategory = new ArrayList<>(); for(int j = 1; j < 6; j++) { SubCategoryItem subCategoryItem = newSubCategoryItem(); subCategoryItem.setIsChecked(ConstantManager.CHECK_BOX_CHECKED_FALSE); subCategoryItem.setSubCategoryName("Art: "+j); arSubCategory.add

xamarin form listview image binding

巧了我就是萌 提交于 2021-01-29 06:45:20
问题 If I add an item to a listview, the items is added but the image is not showed. I have to restart application to view it. The Item is correctly added but the image is not visible. here the cs. ObservableCollection<Libreria> items = new ObservableCollection<Libreria>(new Libreria().GetLibrerie()); public Home() { InitializeComponent (); lstLibrerie.ItemsSource = items; //pickerLibrerie.ItemsSource = new Libreria().GetLibrerie(); } public void Reload(Libreria newLib) { items.Insert(0, newLib);

Picker ItemSource values not binding in a XAML ListView

梦想的初衷 提交于 2021-01-29 05:25:04
问题 Hoping you can advise as I've tried all methods to bind a picker in a Listview to my item source values using both code-behind and MVVM. The picker binding works outside of the ListView, but not inside - is this out of the box or just not possible? Please see my list below! code <ListView x:Name="TypesList" HeightRequest="53" BackgroundColor="White" IsGroupingEnabled="True" IsPullToRefreshEnabled="false" ItemsSource="{Binding Items}" IsRefreshing="{Binding IsBusy}" RefreshCommand="{Binding

Android-Get Background color of listview(item) programmatically

人走茶凉 提交于 2021-01-28 21:51:02
问题 First I create a background color for listview items like below, I have two custom listview like this: My custom list for setting color: Code: @Override public View getView(final int position, View convertView, ViewGroup parent) { Holder holder = new Holder(); final View rowView; rowView = inflater.inflate(R.layout.table_one, null); holder.tv = (TextView) rowView.findViewById(R.id.textView1); holder.tv.setText(result[position]); rowView.setBackgroundColor(Color.WHITE); rowView

“ArrayAdapter requires the resource ID to be a TextView” issue

拟墨画扇 提交于 2021-01-28 20:44:20
问题 I seem to have problems using custom styles for ListView. All online searches (stackOverflow and other sites) pty much say the same: - create an my_style.xml layout file. - use it in the adapter. But for some reason this doesn't seem to be working for me. MainAct.java: arrayAdapter = new ArrayAdapter<String>(this, android.R.layout.list_content, items); XML file: <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id

Adding items to a ListView in C# in a WPF application

混江龙づ霸主 提交于 2021-01-28 19:07:26
问题 I want to create a listview of files on the disk for further processing when selected. So I created a listview with the columns filename, date, and size. I then load the listview with the following function: private void Window_Loaded(object sender, RoutedEventArgs e) { foreach (string s in Directory.GetLogicalDrives()) { filelist.Items.Add(s); } } This lists the drives in the system to start which is fine, but what shows up on screen is filename date size c:\ c:\ c:\ d:\ d:\ d:\ So, my

ListView doesn't get styled with theme when using custom adapter

六月ゝ 毕业季﹏ 提交于 2021-01-28 18:00:32
问题 I have minidemo with three fragments. One displays two TextView and an editview directly, the next treat the same layout as rows in a list with custom adapter, the third displays a plain list with standard adapter (simple_list_item_1) The activity uses a standard theme ( Theme.AppCompat.Light.DarkActionBar ), which I have not modified. I would have expected all three blocks to be styled similarly. Instead, the second block with the custom adapter does not seem to get styled according to the

Display whole content of listview item

筅森魡賤 提交于 2021-01-28 14:10:16
问题 Here I want to display whole content of the listview item on the listview . How can I achive this? ArrayAdapter< String> myadapter = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_list_item_single_choice,answers); listview.setAdapter(myadapter); listview.setChoiceMode(ListView.CHOICE_MODE_SINGLE); Main.xml <ListView android:id="@+id/questions_list" android:layout_width="match_parent" android:layout_height="fill_parent" android:cacheColorHint="@android:color