Posts

Showing posts from September, 2018

AdMob Ads - Android Studio Tutorial

Image
In this video series we will work on AdMob Ads ✓ Banner Ads ✓ Interstitial Ads ✓ Rewarded Video Ads

Take Picture with Camera - Android Studio - Kotlin

Image
In this video, we will capture images with Camera using the Camera Intent. The camera will be opened after clicking the button. If an image is captured it will be set to an ImageView. We will require the following permission:  1) CAMERA  2) WRITE_EXTERNAL STORAGE  So we will also handle Runtime Permission for OS Marshmallow and above. >> Watch for java VIDEO Step 1:  Create a new Project  or  open new project Step 2: Code AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android= "http://schemas.android.com/apk/res/android" package= "com.blogspot.atifsoftwares.takepicture_kotlin" > <!--Adding Camera, Write External Storage Permission--> <uses-permission android:name= "android.permission.CAMERA" /> <uses-permission android:name= "android.permission.WRITE_EXTERNAL_STORAGE" /> <application android:allowBackup...

Take Picture with Camera - Android Studio - Java

Image
In this video, we will capture images with Camera using the Camera Intent. The camera will be opened after clicking the button. If an image is captured it will be set to an ImageView. We will require the following permission:  1) CAMERA  2) WRITE_EXTERNAL STORAGE  So we will also handle Runtime Permission for OS Marshmallow and above. >> Watch For Kotlin VIDEO Step 1:  Create a new project   OR   Open your project Step 2: Code AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android= "http://schemas.android.com/apk/res/android" package= "com.blogspot.atifsoftwares.takepicture_java" > <!--Adding Camera, Write External Storage Permission--> <uses-permission android:name= "android.permission.CAMERA" /> <uses-permission android:name= "android.permission.WRITE_EXTERNAL_STORAGE" /> <application android...

Pick an Image from the Gallery – Android Studio - Kotlin

Image
How to Pick an Image from the Gallery? In this tutorial, we will walk through the complete process of selecting an image from the device’s Gallery in an Android application. This feature is commonly used in many modern apps—for uploading profile pictures, choosing photos for posts, or attaching images to forms. We will start by creating a simple layout with a button that the user can tap to open the Gallery. Once the button is clicked, the system’s built-in image picker will appear, allowing the user to browse their photo library and select a single image. After the user chooses an image, we will retrieve its URI and display it inside an  ImageView  within our app. >> Check for Java >> Check for Kotlin >> Check for Compose Code: activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:app= "http://schemas.android.com/apk/res-auto" ...

Pick an Image from the Gallery – Android Studio - Java

Image
How to Pick an Image from the Gallery? In this tutorial, we will walk through the complete process of selecting an image from the device’s Gallery in an Android application. This feature is commonly used in many modern apps—for uploading profile pictures, choosing photos for posts, or attaching images to forms. We will start by creating a simple layout with a button that the user can tap to open the Gallery. Once the button is clicked, the system’s built-in image picker will appear, allowing the user to browse their photo library and select a single image. After the user chooses an image, we will retrieve its URI and display it inside an ImageView within our app. >> Check for Java >> Check for Kotlin >> Check for Compose Code: activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:app= "http://schemas.android.com/apk/res-auto" ...

Text Color of a Substring - Android Studio - Kotlin

Image
We will change the color of some sub-strings of text of TextView using the ''SpannableString'', and "ForeGroundColorSpan" classes using Android Studio IDE and Java language ✓RED ✓GREEN ✓BLUE Check For Java VIDEO Step 1:  Create a new Project  or  open new project Step 2: Code activity_main.xml <? xml version = "1.0" encoding = "utf-8" ?> < android . support . constraint . ConstraintLayout xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: app = "http://schemas.android.com/apk/res-auto" xmlns: tools = "http://schemas.android.com/tools" android: layout_width = "match_parent" android: layout_height = "match_parent" tools: context = ".MainActivity" > < TextView android: id = "@+id/text_view" android: textSize = "20sp" android: layout_width = "wrap...

Text Color of a Substring - Android Studio - Java

Image
We will change the color of some sub-strings of text of TextView using the ''SpannableString'', and "ForeGroundColorSpan" classes using Android Studio IDE and Java language ✓RED  ✓GREEN  ✓BLUE Check For Kotlin VIDEO Step 1:  Create a new project   OR   Open your project Step 2: Code activity_main.xml <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:app= "http://schemas.android.com/apk/res-auto" xmlns:tools= "http://schemas.android.com/tools" android:layout_width= "match_parent" android:layout_height= "match_parent" tools:context= ".MainActivity" > <TextView android:id= "@+id/text_view" android:textSize= "25sp" android:layout_width= "wrap_content" ...