Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Android Articles
Page 58 of 125
How to close or hide the virtual keyboard on Android?
In Android there are some situations, we should close android default keyboard forcefully. For that this example is help for you.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 3Add the following code to src/MainActivity.javaimport android.app.ProgressDialog; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.Button; import android.widget.EditText; import android.widget.ProgressBar; public class MainActivity extends AppCompatActivity implements View.OnClickListener { Handler mHandler; ...
Read MoreHow to get the dimensions of a view in Android?
There are so many cases, we should create dynamic view rather than creating view in XML. In that scenario, we should need to get the dimensions of a view. So here is a simple solution to get the dimensions of a view in android.To get the height of any view use the following codeint width = view.getMeasuredHeight();To get the width of any view use the following codeint height = view.getMeasuredWidth();Before get the width and height, we should assign default measure for a view as shown belowview.measure(0, 0);In the above code view is like either textview ,editText, button ..etc. Here is ...
Read MoreAndroid AsyncTask example and explanation
Android AsyncTask going to do background operation on background thread and update on main thread. In android we cant directly touch background thread to main thread in android development. asynctask help us to make communication between background thread to main thread.Methods of AsyncTaskonPreExecute() − Before doing background operation we should show something on screen like progressbar or any animation to user. we can directly comminicate background operation using on doInBackground() but for the best practice, we should call all asyncTask methods .doInBackground(Params) − In this method we have to do background operation on background thread. Operations in this method should ...
Read MoreHow to get Value of a Edit Text field in Android using Kotlin?
This example demonstrates how to get Value of a Edit Text field 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.Button import android.widget.EditText import android.widget.TextView import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { lateinit var button: Button lateinit var editText: EditText lateinit var string: String lateinit var textView: ...
Read MoreHow to call an activity method from a fragment in Android App using Kotlin.
This example demonstrates how to call an activity method from a fragment in an 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.os.Bundle import android.widget.Toast import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) title = "KotlinApp" val fragmentManager ...
Read MoreHow to add picasso library in android studio?
Before getting into picasso library example, we should know about picasso. Picasso is image processing library and developed by Square Inc. In older days we used to write lengthy of codes to grab image from server or do process., to optimize the process picasso introduced.This example demonstrate about how to integrate picasso library in android studio.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 in build.gradle.apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { ...
Read MoreHow To Turn Your TV Into Smart TV
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 MoreWays To Speed Up Your Android Phone
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 MoreHow to Reclaim your Smart Phone's Storage Space Quickly
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 MoreBest Photography Apps for Android
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