Get increasing numbers in listview

   Hello sketchers, 

In this post were going to get numbers that increase by 1 into a Listview from a Textview.

We recently increased numbers by +1 and displayed the process on the textview, check it out ;

•Firstly, you need a liststring to store and display the numbers present in it, a button to get numbers from the textview and last but not list, a listview to display the numbers from the liststring .

1: Create a list string

  -To create a list string, just go to oncreate, open the bottomsheet by clicking the blue circle, click variables then click add variables to show this dialog

Name your list string anything

2: Go to on-button click (Add).
  -From here, use the "add to list string" block and "getText" inside it, to add the value from the textview extracted using (textview1).getText block. Next, drag the blocks "setListViewdata" and "refresh" , to display list string data directly to the listview.
Button "Add"

3: Go to on-button click 2 (delete).
  -since we'll delete all the numbers from the listview using this button, use the blocks "clear list block" and "refresh" to clear all the data and update the listview once clicked.

Button "delete"

4: Compile project
  - When the app is opened (oncreate), the process of increasing +1 will start immediately. Click on 'Add' button to get the present number to the textview. You can click the add button as many times as you want to get many numbers in the listview.  When you click delete, all the numbers added to the listview will be cleared .

Thanks for taking your time in reading this post today i hope it helped you in some way. The video below is associated to the this Post's tutorial.

No comments:

Note: Only a member of this blog may post a comment.

Powered by Blogger.