Found 1966 Articles for Apps/Applications

How to add footer view to android listview?

Anuradha Nanda
Updated on 26-Jun-2020 12:49:14

410 Views

This example demonstrate about How to add footer view to android listview.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 code, we have taken listview to show array valuesStep 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.Gravity; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ListView; import android.widget.TextView; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; public class MainActivity extends AppCompatActivity ... Read More

Factory method to create Immutable Set in android?

Fendadis John
Updated on 26-Jun-2020 12:48:36

70 Views

This example demonstrate about Factory method to create Immutable Set 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 listview to add immutable set.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.Set; public class MainActivity extends AppCompatActivity {    ListView ... Read More

Factory method to create Immutable List in android?

Arushi
Updated on 26-Jun-2020 12:48:02

129 Views

This example demonstrate about Factory method to create Immutable List 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 listview to add immutable list.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; public class MainActivity extends ... Read More

How to sort an array elements in android?

Anuradha Nanda
Updated on 26-Jun-2020 12:45:22

966 Views

This example demonstrate about How to sort an array elements 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 text view to sorted array.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.widget.TextView; import java.util.ArrayList; public class MainActivity extends AppCompatActivity {    TextView text;    int temp;    int[] ... Read More

How to check edit text values are Anagram or Not in android?

Arushi
Updated on 26-Jun-2020 12:44:44

88 Views

This example demonstrate about How to check edit text values are Anagram or Not 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 two edit texts to take the data from the user and when user click on a button it will give the result on toast.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Build; import ... Read More

How to check edit text values are Anagram or Not and Count Occurrences of Anagrams in android?

Fendadis John
Updated on 26-Jun-2020 12:44:06

76 Views

This example demonstrate about How to check edit text values are Anagram or Not and Count Occurrences of Anagrams 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 two edit texts to take the data from user and when user click on button it will give result on toast.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import ... Read More

How to valid textview data is only digits in android?

Fendadis John
Updated on 26-Jun-2020 12:43:30

127 Views

This example demonstrate about How to valid textview data is only digits 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 a text view to show digits.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.Manifest; import android.content.pm.PackageManager; import android.location.Address; import android.location.Geocoder; import android.location.Location; import android.location.LocationManager; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v4.app.ActivityCompat; import android.support.v7.app.AppCompatActivity; import android.text.TextUtils; import android.widget.TextView; import ... Read More

How to print current package name in android?

Anuradha Nanda
Updated on 26-Jun-2020 12:42:33

1K+ Views

This example demonstrate about How to print current package name 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 a text view to show the current package name.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; import java.security.Security; import java.util.Locale; public class MainActivity extends AppCompatActivity {    TextView textView;   ... Read More

How to print current package cache directory information in android?

Vikyath Ram
Updated on 26-Jun-2020 12:41:59

501 Views

This example demonstrate about How to print current package cache directory information 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 text view to show current package cache information.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; import java.security.Security; import java.util.Locale; public class MainActivity extends AppCompatActivity {    TextView textView; ... Read More

How to print current activity name in android?

Arushi
Updated on 26-Jun-2020 12:41:18

663 Views

This example demonstrate about How to print current activity name 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 text view to show current activity name.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; import java.security.Security; import java.util.Locale; public class MainActivity extends AppCompatActivity {    TextView textView;    @RequiresApi(api = ... Read More

Advertisements