Found 1966 Articles for Apps/Applications

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

How do I put a border around an Android textview?

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

10K+ Views

If you wants to see text view as 3D view as we seen in Microsoft power point 3d texts. This example demonstrate about how do I put a border around an Android text view.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 one text view with background as border so we need to create a file in drawable as boarder.xml and add the following content. ... Read More

How to use peek() in android ConcurrentLinkedQueue?

karthikeya Boyini
Updated on 30-Jun-2020 14:57:28

84 Views

Before getting into an example, we should know what ConcurrentLinkedQueue is, it is an unbounded queue based on linked nodes. Multiple threads can access queue elements with safety. Elements travel based on queue strategy as FIFO and elements going to insert from a tail. It does not allow null values.This example demonstrates about How to use peek() in android ConcurrentLinkedQueueStep 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, ... Read More

How to Scroll top in RecyclerView with LinearLayoutManager

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

107 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 view & ... Read More

Advertisements