Skip to main content

Posts

Writing Data Back to Json

Writing Data Back to Json Using AsyncHttpClient(library):     You can download the complete Android Studio Project from  here. Gradle Dependencies: compile 'com.loopj.android:android-async-http:1.4.9' compile 'com.google.code.gson:gson:2.2.4'      You are about to know how to write data back to Json. In order to do that you need to know a little about the following things. we are about to create an Android application to save the user profile data and write/update it to Json. Serialization.   Gson. Android Asynchronous Http Client.    1. Serialization:   Serialization is the concept of converting Java objects to byte streams and converting those byte stream back to Java objects whenever you need. The important question from you right now would be. why we use serialization. And the answer for it is.      you won't be updating data directly to Json. Before doing that you will ...

Android SnackBar Example

Android Snackbar:     you can Download the complete Android Studio Project here . Few Things About Android Snackbar: Snackbar is an Improved Toast message, where you can  make the user respond to an action with the actual message. A snackbar appear over all layout , in the bottom of the mobile screen.  Like a Toast message, you can only display one snackbar at a time. SnackBar can be dismissed by swiping it to the right. You can able to display Snackbar inside Any layout of your choice, So in this example we have two Layout CoOrdinatorLayout which is inside Parent Linear Layout. On clicking the First two  button ,Snackbar will be shown  inside  bottom of the CoOrdinator Layout ,  And Last button Will display snackbar in the bottom of parent Layout. You can Display Snackbar inside Fragment and Activity as well , but in case of Activity, your Activity must extend from AppcompatActivity. You can set a ...