Posts

Photo Editor | Android Studio | Kotlin

Image
Image Editor | Android Studio | Kotlin Android allows us to apply many kinds of effects on images. In this tutorial, we will apply some effects to an Image in the ImageView. We will apply the following effects to the image. Gray Bright Dark Red/Gama Green Blue >>Watch For Java Step 1:  Create a new project  OR  Open your existing project Step 2: Place image in the drawable folder Place any image (to apply the effects to it) in the drawable folder. Step 3: Code activity_main.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:tools= "http://schemas.android.com/tools" android:layout_width= "match_parent" android:layout_height= "match_parent" android:padding= "10dp" tools:context= ".MainActivity" > <TextView android:id= "@+id/label1Tv" android:layout_w...

Photo Editor | Android Studio | Java

Image
Image Editor | Android Studio | Java Android allows us to apply many kinds of effects on images. In this tutorial, we will apply some effects to an Image in the ImageView.  We will apply the following effects to the image. Gray Bright Dark Red/Gama Green Blue >>Watch For Kotlin Step 1:  Create a new project   OR   Open your existing project Step 2:  Place image in the drawable folder Place any image (to apply the effects to it) in the drawable folder. Step 3:  Code activity_main.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:tools= "http://schemas.android.com/tools" android:layout_width= "match_parent" android:layout_height= "match_parent" android:padding= "10dp" tools:context= ".MainActivity" > <TextView android:id= "@+id/label1Tv" android:layout...

Vibrate Phone | Android Studio | Java

Image
How to vibrate phone programmatically for a specific time? You can easily implement the phone vibrate programmatically using Android Vibrator API . In this example, we will vibrate the phone for 1000 microseconds i.e. 1 second by clicking a button you can change the duration according to your requirements. >>Watch For Kotlin Step 1:  Create a new project   OR   Open your existing project Step 2:  Code Open AndroidManifest and add  VIBRATE permission. AndroidManifest <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android= "http://schemas.android.com/apk/res/android" package= "com.blogspot.atifsoftwares.vibratephone" > <!--VIBRATE permission--> <uses-permission android:name= "android.permission.VIBRATE" /> <application android:allowBackup= "true" android:icon= "@mipmap/ic_launcher" android:label=...