Questions tagged [listview]

17880 questions
0

votes
0

answer
14

Views

Removing cardview in listview Android

I'm using retrofit and I've made a delete method which is working. But my problem is that the OnItemClick isn't getting the item position and giving me this error Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference I'm using cardviews in my listview , this...
nihel
1

votes
1

answer
2.7k

Views

Change dynamically items in a listView

I'm using a custom ListView with a Title and a Subtitle where you can read a brief explanation of the item. For each item on the list, I'm displaying an AlertDialog to select an option (different for each case). When the option is selected, i want to change the Subtitle for the option selected by th...
Kitinz
1

votes
0

answer
13

Views

ListView's first entry always incorrect for RTL

For some reason, the first entry in my ListView is always flipped the wrong way around when I use RTL. For example: Additional information: The ListView is in a DialogFragment. I HAVE updated my manifest to support RTL (the rest of the app works fine) The ListView has an Adapter, the layout per i...
Zee
1

votes
4

answer
6.1k

Views

Android: Listview inside ScrollView

I want to have a layout that can scroll and a listview inside it. The listview will expand it's height base on how many items in it. Only the ScrollView outside is scrollable. This is my code: But the listview is neither expanded nor scrollable. Please help!
Ngo Van
0

votes
0

answer
6

Views

Listing Order Numbers, Items and Subitems from database

So, I'm trying to create a list that pulls from a mysql database that displays an order # as a button and a new window expands to display the order numbers items/subitems with checkboxes to have checked when an item is selected. I have the window to pop up; however, nothing populates and my query p...
Strategix
1

votes
1

answer
2.8k

Views

flutter: Specify listTile height

In this code, I am trying to make a list of buttons or tile 'as buttons doesnot works well for me ' in the very top of the page. Thus, when one is clicked it return a value in the rest of the page. The issue is: The tile here toke around more than half of the page which make it looks inconsistent....
Aya Elsisy
1

votes
3

answer
62

Views

Show only To-dos with today's due-date in Android app

For my app I need a function that only shows the to-dos which due date is today. I am new to Android Studio and Java, so unfortunately I do not know how to write this code. This is my code so far: public boolean onOptionsItemSelected(MenuItem item) { switch (item.getIdemid()) { case R.id.menu_daily...
diem_L
0

votes
1

answer
23

Views

How to change the background color of a list item at click on a button?

I have a ListView and a CustomAdapter. The elements are all successfully loaded into the list. Now I want to change the background color of a certain element of the list by clicking on an external button. But I do not know how to access a specific item in the list. Here is the CustomAdapter class:...
Mehmet Demir
1

votes
2

answer
823

Views

custom listview in android

i find two different lessons of creatinf custom listview in android/ One of them uses ArrayAdapter the other one BaseAdapter/ Can someone explain what the differents between them and advise some simple lesson for dummies on creating custom listview/ thanks
SERG
1

votes
2

answer
1.9k

Views

Android: Periodically change the Text of a TextView of a Custom ListView

In a Custom ListView i have a TextView whose Text must change periodically every 1 min, to the Current Time and Date. So i did this: Timer mTimer = new Timer(); mTimer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { currentTime = System.currentTimeMillis(); (holder.myText).setTex...
Archie.bpgc
1

votes
2

answer
7.1k

Views

How to populate BrightIdeasSoftware.TreeListView ?

I just downloaded ObjectListView, and have an issue with populating it. I got list of MyObject: public class MyObject { public int Id { get; set; } public int ParentId { get; set; } public string Name { get; set; } public int Data { get; set; } public MyObject(int id, int parentId, string name, int...
Romz
1

votes
1

answer
36

Views

Contacts page - use List or build layout with standard Views

I am trying to recreate a page like screenshot below. There are some approaches that comes to my mind but I can't decide which one would be the best. Create a listview and add each row layout accordingly to it. use a constraintlayout and specify how each element would be placed against the other one...
1

votes
0

answer
174

Views

Infinite scroll not working in Listview React Native

i want pagination in my react native application so below is my code this.renderSiteView(rowData, rowID)} onEndReached={this.onEndReached} /> onEndReached() { if (!this.state.waiting) { this.state.offset=10, this.APIGetSiteGPS(this.state.token); } } When i run above code next page data not come so...
Harshal Kalavadiya
1

votes
1

answer
507

Views

Android studio error : java.lang.NullPointerException [duplicate]

This question already has an answer here: What is a NullPointerException, and how do I fix it? 12 answers I'm trying to take input from user and create a list of given numbers. I'm getting java.lang.NULLpointerException but I could not find any error in my code. Passing the user input from MainActi...
1

votes
1

answer
46

Views

How to pass the textview in listview back to php

For this function, I need to pass the item mentioned in the custom listview from Activity1.java back to php in order to retrieve more information (including image via Picasso library) about that particular item in another activity from mysql, so may I know whether the php file is correct and how sho...
DreamCrusher
1

votes
2

answer
509

Views

How to filter ListView by character instead of exact word using SearchView?

I have an SearchView(v7) and Listview. Once user type anything in SearchView the result is produced and I populate in Listview. All works but problem is I have to write exact that word which is present in Listview. Now, I want when user type any matching character from our ListView data that matchin...
Rk215 Tech
1

votes
0

answer
53

Views

Xamarin WebView inside TableView lost value

I have a WebView filled with an HTML code that came from database. This WebView is inside a TableView. This is the XAML code: When the WebView go off the screen, the values disappears. How can I avoid this behavior? Why the WebView is cleared? Thank you! EDIT: I have find that the problem is the Lis...
Hikari
1

votes
1

answer
53

Views

c# - listview does not shows different icons for all item/images?

I am trying to make an image gallery in C#. I am having a problem in viewing thumbnails of images in a ListView. One image shows for all images in image list. This is a ScreenShot: And this is the code: foreach (string path in filePaths) { int i = 0; filename.Add(Path.GetFileName(path)); images.Imag...
Usama
1

votes
3

answer
73

Views

ListView Item's position repeated

I am creating a dynamic listview using fragment in which item's position are repeating after 6th index(Note- items are not repeating). I have to change quantity of item on button click, but when I try to click and change quantity at index 0 it also changes the 7th index quantity. Please help me out...
Rahul Pathak
1

votes
0

answer
40

Views

how to apply circular rotation for imageview in android

I want to create sample app. In that i want to apply rotation for imageview in listitem while listview is scrolling. I find this animation in swiggy app. Anyone please help me. Thanks inadvance.
aparna
1

votes
1

answer
340

Views

How can I lock contentOffset y position of a FlatList when new items are added

I have a flatList with items in it. After I have scrolled down a bit, an item is added to the top. This causes the list to move down by one cell. How can I avoid this?
MendyK
1

votes
2

answer
91

Views

When I chose one item in ListView in Xamarin Android is choosen twin

When I chose one item in ListView in Xamarin Android is choosen twins . In Xamarin.Forms exist setting the Caching Strategy of ListView : RetainElement and RecycleElement . С# var listView = new ListView(ListViewCachingStrategy.RecycleElement); XAML ... How can I config cache in the Xamarin Andro...
Andrei Damaschin
1

votes
0

answer
26

Views

I am Using ListView with Spinner, Whenever I scroll the values are all deleted(Selected Values in Spinner)

Whenever I add a value to my spinner in List View, Its value is deleted while Scrolling.I have used ViewHolder also.But It shows NullPointerException while using ViewHolder. So help me by seeing the code Below. Logcat **FATAL EXCEPTION: main Process: com.example.dellt.quickbill, PID: 19323 java.lang...
Siva Kumaran
1

votes
0

answer
43

Views

Printing a Multi-page Listview

Ok, I have got a printDocument1_PrintPage method which is supposed to print out the contents of a ListView. During execution, the method only prints out the first page. Could someone help me to printout the remaining page(s)? I have identified the end of the first page via the variable ypos and set...
BOB.G
1

votes
0

answer
72

Views

FlatList equivalent to ListView's adjacentRowHighlighted in renderSeparator

When using ListView's renderSeparator function you get the adjacentRowHighlighted parameter so it's possible to style the separator differently depending on whether one of its neighbouring rows is being highlighted by the user. I can't find the same functionality for FlatList and its ItemSeparatorCo...
David
1

votes
0

answer
32

Views

C# parametric delegate creation for ListView grouping

I have a groupable listview with many columns and I want every column to group according to ranges defined by an array. Currently I have to write: _priceColumn.GroupItemAccessor = new ColumnItemValueAccessor(GetPriceGroupValueFromItem) Decimal[] mSplitters = { 1000000, 10000000, 100000000, 100000000...
maer
1

votes
0

answer
267

Views

Xamarin forms listview databind to Microchart

I have a working ListView(PeopleList) connected to an ObservableCollection and would like to use Microchart to display a graph for each item in the ListView. Is this possible and how would you go about binding and updating the chart in code behind? I am new to Xamarin. XML .... Codebehind public asy...
T.Nike
1

votes
0

answer
34

Views

Populate ListView with GeoQuery and extra data

I researched any topic about this... but not found nothing... Can someone help me ? (Sorry about my english) I'm trying to show a ListView populate by GeoQuery (Get by distance) + FirebaseQuery (Get extra data by other node with same ID key by geofire)... private void pickNearby() { GeoFire geofire...
Fabio Freitas
1

votes
1

answer
50

Views

How to Display Images from Assets - Image Name from CursorAdapter?

have db with _id,hName,lName,detail,images images stored in assets images name in db (SQLite) list layout without images working fine, but with images layout display's on names not images (no error in logcat) wanted to bind CursorAdpater with `ImageView' public void bindView(View view, Context conte...
1

votes
1

answer
42

Views

Checkboxes of a ListView are changing theirs values when the List is scrolled

I'm using Android Studio to develop an application and i'm having a problem. In my app, there is a ListView that shows subjects added to a database using an arrayAdapter and the list gives you the option to select or not a subject (with checkboxes). Here is the XML file with the ListView: Here is t...
Carlos Eduardo
1

votes
0

answer
117

Views

React native listview: How to stick a row at bottom of the screen when the row reaches bottom

Using stickyHeaderIndices (Ref: stickyHeaderIndices) property of listview in react native, it is possible to stick a scrolling row stick on the top of the listview. Is there any way to do the same behavior for sticking the row at the bottom, when the row reaches the bottom of the list?
Anooj Krishnan G
1

votes
1

answer
63

Views

The keyboard doesn't appear when I click on the EditText which is in the ListView

I created an Alert Dialog with a ListView in it, the ListView contains an EditText, the problem is when i click on the EditText, the keyboard doesn't show up. plz help me. here is my code: MainActivity: public class MainActivity extends AppCompatActivity { View con_view; ListView listView; AlertDial...
mohamed el jannous
1

votes
0

answer
58

Views

Xamarin.forms] I want to prevent other items in the ListView from clicking when ContextActions is Active

When ContextActions is active on an Android device, you can click another item in the ListView to activate the ContextActions of other items. I would like to prevent other touches other than ContextActions so that I can not select another Item after activating ContextActions by long-clicking the Ite...
user3630962
1

votes
0

answer
39

Views

Convert a decimal from a SQL table to a percent in ListView with C#

What I am trying to do is take the values from a SQL Query and display it in a ListView - which I have successfully done with the code below, which has worked well. However, what I need to do is convert ceaPercentage and boxPercentage from the decimals that they are in the SQL table into a percentag...
John Muraski
1

votes
1

answer
366

Views

can't recognize method in MainActivity on Button Click [duplicate]

This question already has an answer here: Android cannot find method from button's onClick in ListView Row 4 answers I have a custom layout for every item in listview. But the button in the layout doesn't recognize the activity in MainActivity. The ListView is shown in Main View. The layout file fo...
Imad062
1

votes
0

answer
92

Views

Change layout of LinearLayout that is inside CoordinatorLayout

I googled a bit but I can't find solution to my problem. So, I want change programmatically the layout_marginEnd to 5dp of the LinearLayout. But I can't because it always return me this error: android.widget.LinearLayout$LayoutParams cannot be cast to android.support.design.widget.CoordinatorLayout$...
Gian
1

votes
1

answer
120

Views

get image from intent

I'm beginner in android, In my project I want to add texts and image from gallery, from add activity and send to main activity to display in a list view, this is code for add button on main Activity Intent intentForAdd = new Intent(getApplicationContext(),addActivity.class); startActivityForResult(i...
ayah AH
1

votes
1

answer
225

Views

Why is the RecyclerView adapter not updating correctly (only the first time) despite getting the correct data?

This is very strange. For some reason, despite getting the correct data from the REST call, the adapter is not updated correctly in the RecyclerView. Here are the two methods: public Observable getTopicsByCreator(GetTopicsByCreatorRequest request) { return getApi() .getTopics(request) .subscribeOn(S...
bycfly
1

votes
0

answer
284

Views

JavaFX expand ListView/TableView height to full size

I have a simple FXML layout: When there are a lot of items in ListView it gets its own scrollbar. Is there a way to make ListView grow to full size and expand its parent - VBox, in the end having only one scrollbar of the ScrollPane?
ESipalis
1

votes
1

answer
189

Views

App with Fragments close when orientation change

Hi I have an issue with my little App. So I'm using Fragments. One is a list view, the other just a textView. When I click on a ListView the texView print the Title Clicked. In portrait i got the ListView and in Landscape the 2 Frag. It work fine but when i change orientation and click (fine it's w...
Mohamed

View additional questions