Show scrollbar ListView android
Ngày đăng:
17/12/2021
Trả lời:
0
Lượt xem:
72
ListView is like a tableView in iPhone or iOS . In this example i will show you how to add a String Array in to the ListView and also make the listView Scrollable. First the xml file . Here the line
will make the scrolling vertically Now the java file package com.Ch.Example.pack; import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.AdapterView.OnItemClickListener; public class Example extends Activity { /** Called when the activity is first created. */ ListView list; private ListThe screen will be like this Here is a other useful posts related to listviews. 1. ListView with Sections in android. More Similar Posts
|