Android Articles

Page 95 of 125

How to read an image file in internal storage in android?

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

This example demonstrates How to read an image file in internal storage 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 a button and image view. When user click on button, it will take an image from internal storage and append to image view.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.content.Context; import android.content.ContextWrapper; import android.graphics.drawable.Drawable; import android.os.Bundle; ...

Read More

How to write an image file in internal storage in android?

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

This example demonstrates How to write an image file in internal storage 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 a button. When user click on button, It will store data in internal storage.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.content.Context; import android.content.ContextWrapper; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.widget.Button; import ...

Read More

How to save data with syntax without Content Values in Android sqlite?

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

Before getting into example, we should know what sqlite data base in android is. SQLite is an opensource SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrates How to save data with syntax without ContentValues in Android sqlite.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details ...

Read More

How to use NOT NULL constraints in Android sqlite?

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 347 Views

Before getting into example, we should know what sqlite database in android is. SQLite is an opensource SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrate about How to use NOT NULL constraints in Android sqlite.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create ...

Read More

How to use UNIQUE constraints in Android sqlite?

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

Before getting into an example, we should know what SQLite database in android is. SQLite is an opensource SQL database that stores data to a text file on a device. Android comes in with built-in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrates How to use UNIQUE constraints in Android SQLite.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new ...

Read More

How to use synchronizedSet in Android?

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

This example demonstrate about How to use synchronizedSet 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 refresh button to get the changes of listview.Step 3 ...

Read More

How to use unmodifiableSet in Android?

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

This example demonstrate about How to use unmodifiableSet 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 refresh button to get the changes of listview.Step 3 ...

Read More

How to use vector class in Android listview?

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

This example demonstrate about How to use vector class in Android listviewStep 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 the name and record number as Edit text, when user clicks on save button it will store the data into ArrayList. Click on ...

Read More

How to add header item for Listview in Android?

Jennifer Nicholas
Jennifer Nicholas
Updated on 30-Jul-2019 3K+ Views

This example demonstrates How to add header item 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 the name and record number as Edit text, when the user clicks on the save button it will store the data into ArrayList. Click on ...

Read More

How to add multiple copies in arrylist for Listview in Android?

Vrundesha Joshi
Vrundesha Joshi
Updated on 30-Jul-2019 223 Views

This example demonstrates How to add multiple copies in arrylist 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
Showing 941–950 of 1,250 articles
« Prev 1 93 94 95 96 97 125 Next »
Advertisements