Found 1631 Articles for Android

How to use pie chart graph in android?

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

3K+ Views

This example demonstrate about How to use pie chart graph 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 − Open build.gradle(module level) and add library dependency.apply plugin: 'com.android.application' android {    packagingOptions {       exclude 'META-INF/proguard/androidx-annotations.pro'    }    packagingOptions {       exclude 'META-INF/DEPENDENCIES'       exclude 'META-INF/LICENSE'       exclude 'META-INF/LICENSE.txt'       exclude 'META-INF/license.txt'       exclude 'META-INF/NOTICE'       exclude 'META-INF/NOTICE.txt'       exclude 'META-INF/notice.txt'     ... Read More

How to Add One Side Left Border to TextView in Android using XML?

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

911 Views

This example demonstrate about How to Add One Side Left Border to TextView in Android using XML.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 and linear layout. In Linear layout we have added background as text_style. So create a file called text_style.xml in drawable as shown below – ... Read More

Android Determine App Starts First Time OR Not Programmatically?

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

1K+ Views

This example demonstrates about Android Determine App Starts First Time OR Not Programmatically.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, when user open application, it will check whether it is the first time or not. If first time, it will append first-time text to textview or else it shows more than first-time text.Step 3 − Add the following code to src/MainActivity.javapackage ... Read More

How to use checktextview in android?

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

428 Views

Before getting into the example, we should know what checktextview in android is. Check textview is expanded by textview and contains checkable interface. Using Checktextview we can find that, whether a user is clicked on textview or not.This example demonstrate about How to use checktextview 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 CheckedTextView, when user clicked on textview, it will ... Read More

How to get the duplicates values from Arraylist and then get those items in another Arraylist in Android?

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

987 Views

This example demonstrate about How to get the duplicates values from Arraylist and then get those items in another Arraylist.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 show duplication list items from array list.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.ArrayAdapter; import android.widget.ListView; import java.util.ArrayList; import java.util.HashSet; import java.util.Set; public class MainActivity extends AppCompatActivity ... Read More

How to get phone number in android?

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

5K+ Views

This example demonstrate about How to get phone number 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. When user open application, Phone number going to append on textview.Step 3 − Add the following code to src/MainActivity.java.package com.example.andy.myapplication; import android.Manifest; import android.content.Context; import android.content.pm.PackageManager; 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.telephony.TelephonyManager; import android.widget.TextView; import ... Read More

How to update ui from Intent Service in android?

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

2K+ Views

Before getting into example, we should know what Intent service is in android. Intent Service is going to do back ground operation asynchronously. When user call startService() from activity , it doesn’t create instance for each request. It going to stop service after done some action in service class or else we need to stop service using stopSelf().This example demonstrate about How to update ui from Intent Service.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 start intent service for every 10 sec’s in android?

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

1K+ Views

Before getting into example, we should know what Intent service is in android. Intent Service is going to do back ground operation asynchronously. When user call startService() from activity , it doesn't create instance for each request. It going to stop service after done some action in service class or else we need to stop service using stopSelf().This example demonstrate about How to start intent service for every 10 sec’s.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 ... Read More

How to share intent from intentservice in android?

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

305 Views

Before getting into example, we should know what Intent service is in android. Intent Service is going to do back ground operation asynchronously. When user call startService() from activity , it doesn’t create instance for each request. It going to stop service after done some action in service class or else we need to stop service using stopSelf().This example demonstrate about How to share intent from intentservice.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. ... Read More

How to run continues thread in android?

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

467 Views

Before getting into an example, we should know what thread in android is. Threads are generic processing tasks that can do most things, but one thing they cannot do is update the UI.This example demonstrates about How to run continues thread 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. When the user clicks on textview, it will start continues thread ... Read More

Advertisements