- 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 34486 Articles for Programming
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
855 Views
Before getting into Custom Toast, we should know about what is toast. Toast is used to display message on current screen for sometime. After some time it doing to disappear. In this example we can learn how to customize toast message.This example demonstrate about how to create custom toast message 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 ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
43K+ Views
The duplicate characters in a string are those that occur more than once. These characters can be found using a nested for loop. Problem Statement Given a Java program to find the duplicate character in a given string. Input String = Tutorialspoint Output Duplicate Characters in above string are: t o i In the above string, t o i are duplicate characters as it occurs more than once. Approach to find all duplicate characters in a string Below are the steps to find all duplicate characters in a string − ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
537 Views
The n-th character from a string can be removed using the substring() function. An example of this is given as follows − String = Happy The 3rd character is removed = Hapy A program that demonstrates this is given as follows − Example Live Demo public class Example { public static void main(String args[]) { String str = "Apple"; System.out.println("Original string: " + str ); System.out.println("String with 4th character removed: " + removeChar(str, 4)); ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
192 Views
Before getting info speed up gradle build, we should know that, what is gradle build.Before eclipse, we dont have any automation scripts to build java and XML code to android apk. So that we used commands to generate apk. To optimize this process, gradle build come into the picture. Gradle is automated script to build and generate apk using android studio. What is Gradle sync ? Gradle sync is automation process to download dependencies which are declare in gradle file. A simple example as shown below − How to speed Gradle Build in android? Step 1 − Open gradle.properties ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
3K+ Views
Before getting into example we should know what is action bar in android. Action bar just like header in android. Either we can use same action bar for all screen or we can change action bar for particular activity.This example demonstrate about how to create a custom action bar 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 2 − Add the following code to src/MainActivity.javaimport android.os.Bundle; import android.support.v7.app.ActionBar; import ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
311 Views
Timber library is a extended library of android Log's. While developing android applications, most of developers prefer Android Logs. But here problem is about clean logs while deploy android project. To avoid this process using Timber library.This example demonstrate about how to integrate Timber 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 Timber library in build.gradle as shown belowapply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.example.andy.myapplication" ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
205 Views
Before getting into webview implementation we should know what is webview. Webview is a extended of a view and it is used to show HTML content or web pages.Methods are available in webview.clearHistory() − it is used to clear webview historydestroy() − It is used to destroy internal state of webview.getUrl() −it is used to return current webview url.getTitle() − It is used to return current webview tittle.canGoBack() − It indicates about current webview has back history items.Using webview, it opens webview content in default android browsers. If you want to open inside of application. ShouldOverrideUrlLoading as shown below.private class ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
3K+ Views
Before getting into listview example, we should know about listview, Listview is a collection of items pulled from arraylist, list or any databases. Most uses of listview is a collection of items in vertical format, we can scroll up/down and click on any item.This example demonstrate about How to make a 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 activity_main.xml, we have declared a ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
5K+ Views
Before getting into listview example, we should know about listview, Listview is a collection of items pulled from arraylist, list or any databases. Most uses of listview is a collection of items in vertical format, we can scroll up/down and click on any item.What is custom listview?Custom listview works based on customAdapter. In this custom adapter we can pass custom object. We are passing subject data to listview as shown below.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 ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
3K+ Views
Before getting into listview example, we should know about listview, Listview is a collection of items pulled from arraylist, list or any databases. Most uses of listview is a collection of items in vertical format, we can scroll up/down and click on any item.What is custom listview?Custom listview works based on customAdapter. In this custom adapter we can pass custom object. We are passing subject data to listview as shown below −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 ... Read More