Questions tagged [listview]

17871 questions
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
1

votes
2

answer
786

Views

Xamarin.Forms (IOS) build list view items dynamically (ObservableCollection and Task.Factory)

Directly to the point. My list view looks like the following xaml (Not 100% the same but should be detailed enough) My content... This is bound to my view model which looks like this private CancellationTokenSource cts = null private CancellationToken ct = CancellationToken.None private List tasks =...
Shiriku
1

votes
1

answer
16

Views

List-View/-Adapter doesn'ts list data

I have a (probably small) Problem. My ListView doesn't list the Data I successfully inserted. My ListView is in my notes_layout and is declared as lv_notes in my NotesActivity . The Data it shall take is from my created Database db . The Data are getting inserted in an Other layout. : public class...
Get-Sly
1

votes
1

answer
47

Views

How to invert the list in listView android?

I need help, guys. You need to flip the listView so that the new record is displayed at the top, and the oldest is at the bottom. Example: Original listView: Apple Pear Banana It is necessary so: Banana Pear Apple DataBaseHelper dataBaseHelper = new DataBaseHelper(this); SQLiteDatabase db = dataBase...
Funrab
1

votes
2

answer
126

Views

Only refresh screen when top of list view (Android Studio)

I have this SwipeRefreshLayout XML code: Notice that I have this ListView with the ID: lvRelationShip. In this SwipeRefresh XML file, I want the action of refreshing only to trigger when I scroll to the top of the ListView. Problem: In the ListView when I scroll down to see other items in the list e...
1

votes
1

answer
69

Views

Getting the $page context on a kendoListView template

I'm using a kendoListView and I want to display only the item that satisfied my if conditional: #if(variableFromPageId !== Id){# #:Project.Utils.getDefaultName(Name)# #:Project.Utils.getDefaultDescription(Description)# #}else{# console.log('Do nothing!'); # }# The problems is that variableFromPageI...
IBot
1

votes
1

answer
509

Views

Xamarin Forms listview shows blank item

I tried to show data on custom list view. However, it shows a list with nothing inside. Since the blank item still showing in the list view, so i guess the problem lies on sessionID and username binding but I cant figure out where is the problem. Some answers said that the binding data must the prop...
SamTew
1

votes
1

answer
45

Views

Images/TextViews in ListView shift a bit

TextViews in my ListView change position by a few centimeters if i scroll the list. I think the problem is that the listView is recycling the rows if they arent visible after the scroll-movement. But I dont know how to fix this. And I did not find out when the shift of the TextView appears. Sometime...
1

votes
0

answer
301

Views

PanGestureRecognizer inside ListView (Xamarin.Forms)

I'm making a messaging app in Xamarin.Forms (Android and iOS). Messages are being shown in a ListView. Now I want to add a new feature. When I drag the message balloon to the side, it shows the message info. The user holds the message, drags to right or left. If he drags enough, a new page with the...
LuizLoyola
1

votes
3

answer
452

Views

Android ListView Adapter multiple Activity

I did one List Adapter - it works but I want to do some Listview on different Activities and here is the question if I need to do a new Adapter for each Activity? Is there a way to make one ListAdapter depend on which Activity is selected to display a specific view? I was looking for something about...
laptom

View additional questions