Found 1631 Articles for Android

How to remove unused space for arraylist Listview in Android?

Nitya Raut
Updated on 30-Jul-2019 22:30:25

179 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 all vowels from textview string in Android?

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:25

266 Views

This example demonstrates How to remove all vowels from textview string 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/activity_main.xml.     In the above code, we have taken name and when user click on button it will print without vowels of edittext value.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import ... Read More

How to use total_changes()in Android sqlite?

Nishtha Thakur
Updated on 30-Jul-2019 22:30:25

48 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.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 ... Read More

How to print list values in reverse order using Collections.reverse() in Android?

Nitya Raut
Updated on 30-Jul-2019 22:30:25

371 Views

This example demonstrates How to print list values in reverse order using Collections.reverse() 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 the ... Read More

How to print list values in random order in Android?

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:25

329 Views

This example demonstrates How to print list values in random order 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 do reverse of string in Android?

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:25

1K+ Views

This example demonstrates How to do reverse of string 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/activity_main.xml. In the above code, we have taken name and when user click on button it will print reverse of edittext value.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.os.Bundle; ... Read More

How to create digital clock with textview in android?

Nitya Raut
Updated on 30-Jul-2019 22:30:25

1K+ Views

This example demonstrates How to create digital clock with 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 textview. It will show clock with blink animation as we see in normal digital clock.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.os.Bundle; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; public ... Read More

How to Count Occurrences of Each Character in String in Android?

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:25

389 Views

This example demonstrates How to Count Occurrences of Each Character in String 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 when user click on button, it will check occurrence of letter in string and gives result in textview.Step 3 − Add the following code to ... Read More

How to convert array to arraylist in android?

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:25

674 Views

This example demonstrates How to convert array to arraylist 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 ... Read More

How to check arraylist is empty for Listview in Android?

Nitya Raut
Updated on 30-Jul-2019 22:30:25

329 Views

This example demonstrates How to check arraylist is empty 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 ... Read More

Advertisements