Android toggle button example

Android – ToggleButton example

Problem: ToggleBar Example

Description:
This is just the simple example for implementing ToggleButton in android application.

Below are some methods which we have used in this example:

setOnClickListener – Used to register a callback whenever view is clicked
setChecked() – used to mark toggle button as checked/unchecked
setTextOn() – used to display text on toggle button whenever it is CHECKED
setTextOff() – used to display text on toggle button whenever it is UnCHECKED.

android setError

Android – Show error in EditText

Problem: How to show error/alert for some cases in EditText? Description: Consider a case that we are supposed to collect information from users by filling EditText box and user leaves…
Android dev logo

Android JSON Parsing tutorial

Android JSON Parsing Example

I have found many newbie android programmers are facing issues in implementing JSON Parsing, this article is for them with step by step demo.

Now a days, almost all the web APIs are REST based and it returns JSON response. We have to parse the JSON string either into array, objects or values, to display into the particular views like ListView, TextView, etc.

We can use JSONObject and JSONArray for parsing the response string.

Android – Secret codes

Hi, Today Let me discuss about some secret codes that we developer and android users are not knowing mostly but it can be helpful to us in some way. Around…

Android – parseSdkContent failed

Problem: 'Android SDK Content Loader' has encountered a problem. parseSdkContent failed Solution: Today i just have started development under the Eclipse Indigo environment and while setting Android SDK preferences, i…