- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2041 Articles for Mobile Development
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
1K+ Views
This example demonstrates how do I change the position of the dialog on Screen 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. Step 3 − Add the following code to src/MainActivity.javaimport android.app.AlertDialog; import android.content.DialogInterface; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Gravity; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); AlertDialog.Builder builder = new AlertDialog.Builder(this); ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
4K+ Views
This example demonstrates how set an icon for my Android application .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 − Further follow the path to reach the desired folder to add icon (app → res → mipmap).Step 3 - Add you app icon. You can just simply copy and paste the image in mipmap folder.Step 4 - After placing the image in the mipmap folder. You need to rename the default icon name to your icon image name.Step 5 − Add the following ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
640 Views
This example demonstrates how to pass data 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.sample; import android.content.Intent; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import static java.lang.Thread.sleep; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); startActivity(new Intent(MainActivity.this, SecondActivity.class)); try { sleep(3000); ... Read More
![Sadiqaadil](https://www.tutorialspoint.com/articles/images/user_icon.png)
795 Views
In this post we will learn how to take screen shot programmatically in iOS.We will add on textField where we will change the value, take the screen shot by press of a button and then show the screen shot in an imageView which we will place just below the button itself.Remember that you can add this functionality on long press or any other gesture, and even save the image if you want. But right now we will just focus on capturing the screen shot and showing it on an image view.So let’s get startedStep 1 − Open Xcode → New ... Read More
![Sadiqaadil](https://www.tutorialspoint.com/articles/images/user_icon.png)
814 Views
In this post we will learn how to repeat a task after a regular interval.In this example we will update a label after a particular interval of time repeatedly.In iOS we user Timer to achieve this task. Lets get startedStep 1 − Open Xcode → New Project → Single View Application → Let’s name it “Timer”Step 2 − Open Main.storyboard and add a label as shown below.Step 3 − Attach one @IBOutlet for the bottom label. Name it timerLabelStep 4 − We will show the seconds since when the app is launched on the label. So, declare two variables in ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
189 Views
This example demonstrates how to pass data 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 res/layout/activity_second.xml. Step 4 − Add the following code to src/MainActivity.javapackage com.example.sample; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.text.TextUtils; import android.view.View; import android.widget.Button; import android.widget.EditText; import ... Read More
![Sadiqaadil](https://www.tutorialspoint.com/articles/images/user_icon.png)
205 Views
In this post we will learn how to load PDF in UIWebView.Loading PDF in WebView is simple. Just follow the following steps.Step 1 − Open Xcode → New Project → Single View Application → Let’s name it “PDFInWebView”Step 2 − Open Main.storyboard and add UIWebView as shown belowStep 3 − Create @IBOutlet for the UIWebView, name it webview.Step 4 − Add as sample PDF project. We will load this PDF in webivew. I am adding a PDF file named sample PDF.Step 5 − Add the following lines in viewDidLoad method of ViewControllerif let pdf = Bundle.main.url(forResource: "sample", withExtension: "pdf", subdirectory: ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
99 Views
This example demonstrates how to pass data between Activities on Android application.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
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
314 Views
This example demonstrates how to create Android Hello World App.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.sample; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }Step 4 − Add the following code to Manifests/AndroidManifest.xml ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
6K+ Views
This example demonstrates how to Justify Text in TextView 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. Step 3 − Add the following code to src/MainActivity.javapackage com.example.sample; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }Step 3 − Add the following code to Manifests/AndroidManifest.xml ... Read More