Vysh

How to create a favorite button in Android. (Using toggle button)

You might have come across a favorite button in any dictionary app or android’s own contacts app. Today we will be learning how to create a favorite button with identical functionality to those apps. I did this using a toggle button. I used a toggle button as i wanted to use the setChecked() method of toggle button. …

How to create a favorite button in Android. (Using toggle button) Read More »

Chaning Android Button Background style using Selectors Example

Android provides selectors that help you change the button styles depending on various states like, pressed, normal, disabled.You can easily customize button in android using selectors. Here I will demonstrate how you can do that. 1. First make a layout with a button. <?xml version=”1.0″ encoding=”utf-8″?><LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”    android:layout_width=”fill_parent”    android:layout_height=”fill_parent”    android:orientation=”vertical” >     <Button        android:id=”@+id/imgBtnSelector”        android:layout_width=”wrap_content”        …

Chaning Android Button Background style using Selectors Example Read More »

Exit mobile version