Mobile Development Articles

Page 125 of 156

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

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 615 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 create digital clock with textview in android?

Nitya Raut
Nitya Raut
Updated on 30-Jul-2019 2K+ 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 do reverse of string in Android?

Jennifer Nicholas
Jennifer Nicholas
Updated on 30-Jul-2019 2K+ 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 print list values in random order in Android?

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 519 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 remove all vowels from textview string in Android?

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 398 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 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 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 237 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 android device is having low ram or high ram?

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 378 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

How to check Location Manager is running or not in iOS App?

Fendadis John
Fendadis John
Updated on 30-Jul-2019 460 Views

To check any services related to location in ios with swift we can use the CLLocationManager.In this example we’ll see how to check if the location manager is running or not. We’ll do this with help of an sample project. So, create a new project. First we need to create a locationManager object, so in your view controller.var locationManager = CLLocationManager()Now, we first of all we need to check if the location services are enabled on the device or not. To check this we’ll useCLLocationManager.locationServicesEnabled() function, which returns a Boolean value showing whether the location service on device is active ...

Read More
Showing 1241–1250 of 1,551 articles
« Prev 1 123 124 125 126 127 156 Next »
Advertisements