- 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 1631 Articles for Android
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
281 Views
This example demonstrates how to set Android Toast duration longer than Toast.LENGTH_LONG using Kotlin.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.ktimport android.os.Bundle import android.os.CountDownTimer import android.view.View import android.widget.Toast import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { private lateinit var mToastToShow: Toast override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) title = "KotlinApp" ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
1K+ Views
This example demonstrates how to convert a Base64 string into a BitMap image in Android App using Kotlin.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.ktimport android.graphics.Bitmap import android.graphics.BitmapFactory import android.os.Bundle import android.util.Base64 import android.widget.ImageView import androidx.appcompat.app.AppCompatActivity import java.io.ByteArrayOutputStream class MainActivity : AppCompatActivity() { lateinit var imageView: ImageView override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
512 Views
This example demonstrates how to set the absolute position of a view in Android using Kotlin.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.ktimport android.os.Bundle import android.widget.ImageView import android.widget.RelativeLayout import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val relativeLayout: RelativeLayout = findViewById(R.id.relativeLayout) val imageView = ImageView(this) ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
467 Views
This example demonstrates how to disable Home and other system buttons in Android using Kotlin.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.Example Step 3 − Add the following code to src/MainActivity.ktExampleimport android.os.Bundle import android.view.View import androidx.appcompat.app.AppCompatActivity import java.util.* class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) title = "KotlinApp" } override fun onWindowFocusChanged(hasFocus: ... Read More
![Mahesh Parahar](https://www.tutorialspoint.com/assets/profiles/127878/profile/60_2277600-1655382864.jpg)
205 Views
Kotlin was introduced in Android development considering multiple enhancements in Kotlin w.r.t Java. For example:Less no. of Lines and easier development with the same functionality.Java: TextView displayText = (TextView) findViewById(R.id.textView); displayText.setText("Hello World"); Kotlin: textView.setText("Hello World")Compile-time handling of infamous null pointer exception.var value: String = "abc" // compilation error value = nullData class instead of POJO.data class User(val name: String, val age: Int)The following are some of the important differences between Java and Kotlin.Sr. No.KeyJavaKotlin1ExceptionsJava uses checked exceptions for exception handling.Kotlin has no checked exception. It throws compile-time errors.2Null HandlingJava has not enforced null check thus null pointer exception ... Read More
![Sharon Christine](https://www.tutorialspoint.com/assets/profiles/13517/profile/60_82215-1512649681.jpg)
2K+ Views
Instead of shopping for an expensive smart TV, you’ll be able to convert your existing TV into a web-enabled entertainment center by just spending a few thousands of rupees. With this, you’ll have access to everything the Web, the PC and the Google Play store have to offer.Here are some helpful gadgets which will facilitate your recent TV work like a smart TV –Portable Media PlayersIf you’re working on a tight budget, you might want to consider an ultra-portable media player. These thumb-sized sticks, which resemble USB pen drives, are capable of streaming content – pictures, music, videos – wirelessly ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
184 Views
No one likes a slow running smartphone, but over the time you may have noticed that your once-speedy Android device has slowed down considerably. There are plenty of tips and tricks to speed up your Android device and make it perform like new. Some of them are:Clear your Cached DataAndroid apps are constantly caching small pieces of data which can build up over time in applications that typically affect the performance of the phone and you want to clear an app’s cached data, either to regain some used space or to try to fix a misbehaving app. To clear cache ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
69 Views
A smartphone is not just a phone, it can be a phone, a music player, a video player, a radio, an electronic musical instrument, a GPS, a gaming console, a heart rate monitor, a personal trainer, a digital camera, a document scanner, a messenger, a word processor, a personal pocket computer and the list of infinite possibilities goes on and on beyond your expectation, even beyond your imagination.Not only a gadget, a smartphone can be a status symbol for a huge number of people. A smartphone reflects and complements the personality of its owner. There is only one answer to ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
100 Views
Many a time, we click photos and would like to get them edited as per our needs which complete the job. There exists a lot of tools and tricks in various android apps in the play store that will let your favorite photos look even better.Before that, most of the best camera apps have the capability to make even the dullest of photos pop with vivid color and life. Luckily there are a range of available photo editors which are either free of cost or of extremely cheap rates on the Google Play Store designed to provide best results. Let ... Read More
![Sharon Christine](https://www.tutorialspoint.com/assets/profiles/13517/profile/60_82215-1512649681.jpg)
92 Views
Google’s recent attempt to beat Apple at its core, might end up hurting its own Android partner, Samsung, especially in the Indian market.On Tuesday, Oct 14th Alphabet Inc’s Google at an event, has made an announcement about its launch of new “Pixel” smart-phone. Its latest effort is to target consumers to buy its Google branded device and to challenge the iPhone, most powerful personal device of world from Apple, at the high end of $400 billion global market.Rick Osterloh, Google hardware chief, has revealed few details about “Pixel” smart-phone after the event launch. He added, this smartphone has the best ... Read More