Android Articles

Page 118 of 125

Standard Android Button with a different color?

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

This example demonstrate about Standard Android Button with a different colorStep 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 button view to show different colors.Step 3 − Add the following code to drawable / background.xml                                                         ...

Read More

Uninstall APKs programmatically

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

This example demonstrate about Uninstall APKs programmaticallyStep 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.Step 3 − Add the following code to src/MainActivity.java import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.widget.TextView; import android.widget.Toast; public class MainActivity extends Activity {    TextView text;    @Override    public void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main);   ...

Read More

How to pass data from one activity to another in Android using shared preferences?

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 2K+ Views

This example demonstrate about How to pass data from one activity to another in Android using shared preferencesStep 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.         Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);   ...

Read More

How to use shared preference in Android between activities?

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

This example demonstrate about How to use shared preference in Android between activities.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.         Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main);     ...

Read More

How to use Android sequence layout?

George John
George John
Updated on 30-Jul-2019 591 Views

Before getting into android sequence layout, we should know what is sequence layout in android. Sequence layout contains a sequence of steps with the progress bar. According to sequence, it follows an animated progress bar.This example demonstrates How to use Android sequence layout.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(app) and add design support library dependency.apply plugin: 'com.android.application' android {    compileSdkVersion 28    defaultConfig {       applicationId "com.example.andy.myapplication"       minSdkVersion 19     ...

Read More

Android Working with Recycler View

Ankith Reddy
Ankith Reddy
Updated on 30-Jul-2019 2K+ Views

Recycler view is a more advanced version of listview and works based on View holder design pattern. Using recyclerview we can show grids as well as a list of items.This example demonstrates how to integrate RecyclerView by creating a beautiful student records app that displays student name with age.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 and add Recycler view library dependency.apply plugin: 'com.android.application' android {    compileSdkVersion 28    defaultConfig {       applicationId "com.example.andy.tutorialspoint"   ...

Read More

How to set random background for Recyclerview in Android?

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 3K+ Views

Before getting into set random background color for recycler view example, we should know what is Recycler view in android. Recycler view is a more advanced version of the list view and it works based on View holder design pattern. Using recycler view we can show grids and list of items.This example demonstrates How to set the random background for Recyclerview by creating a beautiful student records app that displays student name with age.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 ...

Read More

How to sort Strings on an Android RecyclerView?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 2K+ Views

Before getting into Sort array list elements for recycler view example, we should know, what is Recycler view in android. Recycler view is a more advanced version of the list view and it works based on View holder design pattern. Using recycler view we can show grids and list of items.This example demonstrates how to integrate Sorted Recycler View by creating a beautiful student records app that displays student name with age.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 ...

Read More

How to build a Horizontal ListView with RecyclerView in Android?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 1K+ Views

Before getting into example, we should know what is Recycler view in android. Recycler view is more advanced version of list view and it works based on View holder design pattern. Using recycler view we can show grids and list of items.This example demonstrate about how to build a horizontal list view with Recycler View by creating a beautiful student records app that displays student name with age.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 and add Recycler ...

Read More

How to Scroll top in RecyclerView with LinearLayoutManager in Android?

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 3K+ Views

Before getting into example, we should know what is Recycler view in android. Recycler view is more advanced version of list view and it works based on View holder design pattern. Using recycler view we can show grids and list of items .This example demonstrate about how to Scroll top in RecyclerView with LinearLayoutManager by creating a beautiful student records app that displays student name with age .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 and add Recycler ...

Read More
Showing 1171–1180 of 1,250 articles
« Prev 1 116 117 118 119 120 125 Next »
Advertisements