Found 2041 Articles for Mobile Development

How can I make my layout scroll vertically in Android?

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

7K+ Views

Before getting into example, we should know what is vertical Scroll View(Scroll View). Vertical Scroll view provide by android.widget.ScrollView class. It is used to scroll child views in a vertical direction.This example demonstrates how to use Vertical Scroll 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.                                                     ... Read More

How to use android date change listener ?

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

751 Views

Before getting into the example, we should know what is date picker and how does it work in android. The date picker is a subclass of frame layout and it allows to select the date, month and year.This example demonstrates how to use android date change listener.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 declare date picker to select the date. when you select the ... Read More

How to integrate Android Snackbar?

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

386 Views

Snackbar is just like Toast in android but it going to interact with action. It going to show the message at the bottom of the screen without any interaction with other views and close automatically after a time-out.This example demonstrates how to integrate Android Snackbar.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 design support library dependency.apply plugin: 'com.android.application' android {    compileSdkVersion 28    defaultConfig {       applicationId "com.example.andy.myapplication"       minSdkVersion 19 ... Read More

Get current time and date on Android

Ankith Reddy
Updated on 30-Jun-2020 05:28:09

9K+ Views

As per Oracle documentation, SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner. In this example, we have imported simple date format class from java as shown below -import java.text.SimpleDateFormat; import java.util.Date;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, it going to print the current date on the window manager.Step 3 − Add the following code to ... Read More

How to use Android sequence layout?

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

380 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

How to check edit text's text is email address or not in Android?

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

184 Views

Before getting into an example, we should know the test scenario. In the login page, usually, we take email id and password from edit text. While taking email id from edit text. we should know, it is the valid format or not.This example demonstrates how to check the edit text's text is an email address or not.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 layout, we ... Read More

How do I use tabHost for Android?

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

445 Views

Before getting into example we should know what is tab host in android. Tab host holds set of tabs. Each tab contains either fragment or activity as per project specification. The user can scroll tabs from left to right or right to left.This example demonstrates how to use tab host 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.                             ... Read More

What are intent-filters in Android?

George John
Updated on 30-Jun-2020 05:29:17

4K+ Views

An intent filter is an instance of the IntentFilter class. Intent filters are helpful while using implicit intents, It is not going to handle in java code, we have to set it up in AndroidManifest.xml. Android must know what kind of intent it is launching so intent filters give the information to android about intent and actions.Before launching intent, android going to do action test, category test and data test. This example demonstrate about how to use intent filters in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required ... Read More

How to set Adapter to Auto Complete Text view?

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

1K+ Views

 Before getting into an example, we should know what is autocomplete textview in android. Autocomplete textview is just like an edit text and it is a subclass of editext, but it is going to show suggestion from a list as a dropdown list. We have to set up Threshold value to auto-complete text view. for example, we have set it up Threshold as 1 so if user enters one letter is going to give suggestion according to Threshold letter.This example demonstrates about how to set up an adapter to auto-complete Textview.Step 1 − Create a new project in Android Studio, ... Read More

How to insert new cell into UITableView using Swift?

Rishi Rathor
Updated on 30-Jul-2019 22:30:24

864 Views

To insert a new cell into UITableView we'll first have to create a table view cell and then add it to the table view using Cell for row at method of Table view.We can create a cell using Storyboard or by creating a nib of class UITableViewCell.In the View controller drag and drop a table view and connect it's outlet to the ViewController class.Let's create a cell in the table view we just created and create it's class, call it CustomCell, and assign the class to cell.Give it an identifier "CustomCell"Add a label in the cell and change it to ... Read More

Advertisements