Android

Properly using searchView widget with AppCompat | Android Beginners

In this article we will learn using the searchView widget using V7 support library and resolving the most common errors while using the searchView widget.Most common and confusing error that I think people face is- 1.NullPointer Error in searchView We will get into it later but first let us look at the things we need …

Properly using searchView widget with AppCompat | Android Beginners Read More »

Fix BaseGameUtils cannot be Resolved Error, Android Studio

BaseGameUtils cannot be Resolved Error occurs due to mismatch in your app’s Build tools version and BaseGameUtils project’s build tools version. It can be easily fixed. There are other ways to do this I am going with this one here-First of all copy the whole BaseGameUtils folder from the original location to the libs folder …

Fix BaseGameUtils cannot be Resolved Error, Android Studio Read More »

Difference between Bundle and putExtra of Intent

Using bundle will create negligible difference in your application. Using a bundle is slightly more manageable and clear. When you are using a putExtra, you are using a bundle anyway, you can see here that Intent store data passed through putExtra internally as Bundle- public Intent putExtra(String name, String value) { if (mExtras == null) { mExtras …

Difference between Bundle and putExtra of Intent Read More »

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 »