Found 1631 Articles for Android

How to make a background 20% transparent on Android

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

4K+ Views

If you want to give transparent background for your view, This example demonstrate about How to make a background 20% transparent on Android.All hex value from 100% to 0% alpha100% — FF99% — FC98% — FA97% — F796% — F595% — F294% — F093% — ED92% — EB91% — E890% — E689% — E388% — E087% — DE86% — DB85% — D984% — D683% — D482% — D181% — CF80% — CC79% — C978% — C777% — C476% — C275% — BF74% — BD73% — BA72% — B871% — B570% — B369% — B068% — AD67% — AB66% — A865% ... Read More

How to Launch an application from another application on Android

Chandu yadav
Updated on 30-Jul-2019 22:30:25

6K+ Views

In android, we can lunch other applications using packing name. This example demonstrate about How to Launch an application from another application on 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 created one textview. When you click on textview, it will open YouTube.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import ... Read More

How to use poll() in android PriorityBlockingQueue?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

83 Views

Before getting into the example, we should know what PriorityBlockingQueue is. It is an unbounded queue and follows the same order as a priority queue. The main usage of priority blocking queue is, it going to handle out of memory error.This example demonstrates about How to use poll() in android PriorityBlockingQueueStep 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 PriorityBlockingQueue ... Read More

How to Go back to previous activity in android

George John
Updated on 30-Jul-2019 22:30:25

4K+ Views

If you wants to go back from one activity to another activity, This example demonstrate about how to go back to previous activity 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 given text view, when the user click on text view, it will open new activity.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import ... Read More

How to use poll() in android ConcurrentLinkedDeque?

Samual Sam
Updated on 30-Jul-2019 22:30:25

95 Views

Before getting into an example, we should know what ConcurrentLinkedDeque is, it is unbounded deque based on linked nodes. Multiple threads can access deque elements with safety.This example demonstrates about How to use poll() in android ConcurrentLinkedDequeStep 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 ConcurrentLinkedDeque elements.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Build; import android.os.Bundle; ... Read More

How to Get the current language in Android device?

Ankith Reddy
Updated on 30-Jul-2019 22:30:25

2K+ Views

While doing internalization in android application, we should know what is the current language in android device. This example demonstrate about how to Get the current language in Android device.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 Button. When user click on button, it will take device country name and language and append to text view.Step 3 − Add the following code ... Read More

How to use peekLast() in android LinkedBlockingDeque?

karthikeya Boyini
Updated on 30-Jun-2020 14:59:22

64 Views

Before getting into an example, we should know what LinkedBlockingDeque is. It is implemented by Collection interface and the AbstractQueue class. It provides optional boundaries based on linked nodes.It going to pass memory size to a constructor and helps to provide memory wastage in android.This example demonstrates about How to use peekLast() in android LinkedBlockingDequeStep 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 ... Read More

How to use peekLast() in android ConcurrentLinkedDeque?

Samual Sam
Updated on 30-Jun-2020 14:58:49

73 Views

Before getting into an example, we should know what ConcurrentLinkedDeque is, it is unbounded deque based on linked nodes. Multiple threads can access deque elements with safety.This example demonstrates about How to use peekLast() in android ConcurrentLinkedDequeStep 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 ConcurrentLinkedDeque elements.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Build; import android.os.Bundle; ... Read More

How to use peekFirst() in android LinkedBlockingDeque?

karthikeya Boyini
Updated on 30-Jun-2020 14:58:20

70 Views

Before getting into an example, we should know what LinkedBlockingDeque is. It is implemented by Collection interface and the AbstractQueue class. It provides optional boundaries based on linked nodes. It going to pass memory size to a constructor and helps to provide memory wastage in android.This example demonstrates about How to use peekFirst() in android LinkedBlockingDequeStep 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 ... Read More

How to use peekFirst() in android ConcurrentLinkedDeque?

Samual Sam
Updated on 30-Jun-2020 14:57:54

51 Views

Before getting into the example, we should know what ConcurrentLinkedDeque is, it is unbounded deque based on linked nodes. Multiple threads can access deque elements with safety.This example demonstrates about How to use peekFirst() in android ConcurrentLinkedDequeStep 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 ConcurrentLinkedDeque elements.Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.os.Build; import android.os.Bundle; ... Read More

Advertisements