Android Articles

Page 97 of 125

How to remove unused space for arraylist Listview in Android?

Nitya Raut
Nitya Raut
Updated on 30-Jul-2019 294 Views

This example demonstrates How to remove unused space for arraylist Listview in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.                     In the above code, we have taken name and record number as Edit text, when user click on save button it will store the data into arraylist. Click on ...

Read More

How to remove white spaces for textview in Android?

Jennifer Nicholas
Jennifer Nicholas
Updated on 30-Jul-2019 2K+ Views

This example demonstrates How to remove white spaces for textview in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. In the above code, we have taken name and when user click on button it will remove editext value and append values to textview.Step 3 − Add the following code to ...

Read More

How to set minimum capacity for arraylist Listview in Android?

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 175 Views

This example demonstrates How to set minimum capacity for arraylist Listview in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.                             In the above code, we have taken name and record number as Edit text, when user click on save button it will store the data into arraylist. Click on refresh button to get ...

Read More

How to sort Listview in Android?

Nitya Raut
Nitya Raut
Updated on 30-Jul-2019 2K+ Views

This example demonstrate about How to sort Listview in Android using collections.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.                     In the above code, we have taken name and record number as Edit text, when user click on save button it will store the data into arraylist. Click on refresh button to ...

Read More

How to store elements in numeric order for Listview in Android?

Jennifer Nicholas
Jennifer Nicholas
Updated on 30-Jul-2019 248 Views

This example demonstrate about How to store elements in numeric order for Listview in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.                         In the above code, we have taken name and record number as Edit text, when user click on save button it will store the data into arraylist. Click on ...

Read More

How to use comparator interface for Listview in Android?

Nitya Raut
Nitya Raut
Updated on 30-Jul-2019 393 Views

This example demonstrate about How to use comparator interface for Listview in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.                     In the above code, we have taken name and record number as Edit text, when user click on save button it will store the data into arraylist. Click on ...

Read More

How to use fill() for Listview in Android?

Nitya Raut
Nitya Raut
Updated on 30-Jul-2019 487 Views

This example demonstrate about How to use fill() for Listview in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.                           In the above code, we have taken name and record number as Edit text, when user click on save button it will store the data into arraylist. Click on refresh button to get ...

Read More

How to use rotate() for Listview in Android?

Jennifer Nicholas
Jennifer Nicholas
Updated on 30-Jul-2019 311 Views

This example demonstrate about How to use rotate() for Listview in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.                   In the above code, we have taken name and record number as Edit text, when user click on save button it will store the data into arraylist. Click on refresh button to ...

Read More

How to append data from array deque to arraylist for listview in Android?

Anvi Jain
Anvi Jain
Updated on 30-Jul-2019 437 Views

This example demonstrate about How to append data from array deque to array list for list view in AndroidStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/login.xml.                                 In the above code, we have taken name as Edit text, when user click on save button it will store the data into arraylist. Click on refresh button to ...

Read More

How to android device is having low ram or high ram?

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 388 Views

This example demonstrate about How to android device is having low ram or high ram.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the above code, we have taken text view to show device is low ram device or high ram.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.app.ActivityManager; import android.content.Context; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.telephony.TelephonyManager; import android.view.WindowManager; import android.widget.TextView; public class MainActivity ...

Read More
Showing 961–970 of 1,250 articles
« Prev 1 95 96 97 98 99 125 Next »
Advertisements