
Search In
How to add imageview to the layout and change the source of the image with the click of the button.
This is a very simple android code in which we set the mage view in the layout and then use the the imageview to set the new source.This change
In the below example I have created a commuication between an activity and fragments classes. In the below example user enters name in SendFragment part and click submit button then in second fragment on displayFragment show user name input result.
This Blog simply illustrate how to use dynamic data binding in android
Tired of writing same code again and again for finding views and setting data into it ?
here is a simple solution which will now reduce the developer's effort for doing same
Android Marshmallow i.e. API level 23 divided the permissions into two type :-
Normal permissions those permissions which do not risk user privacy . If your app lists a normal permission in its manifest, the system grants the permission automatical
In the below example code I have created change location page. Here I have first created select_location.xml layout. In select_location layout I have added ScollView , TextView and imageView and In Selectlocation.Activity I have intializeUI value and
We can count steps in Android by using two sensors i.e. TYPE_STEP_COUNTER and TYPE_STEP_DETECTOR.
These two sensors were introduced in API level 19.
TYPE_STEP_COUNTER:- This sensor returns number of steps taken by the user since last rebo
Using the below code I have created pdf viewer function. Here I have created pdf Viewer Activity and used string download_token,publication_heading,download_info and pdf data fetch data in DatabaseHelper. I have also used DownloadManger fuction. Bel
Today we are going to learn something about J-Unit testing in android. We will be implementing an automation library known as Robotium, for genreating the test cases for testing the various functionalities in our app. First of all you need to add the
In the below example I have created an animation splash screen. Here I have first created animate.xml and traslate.xml layout in anim folder and in activity_main.xml layout I have added ImageView. I have used AnimationUtil.loadAnimation method in Mai
If you are looking to perform certain task on swiping on the imageView or other widgets in android (the task may be change of activity, or change of the image on imageview).
Here is the code snippet that can help you out with this.
Step 1:- Declare
