
Android Application Development Cookbook
By :

Since JavaScript Object Notation (JSON) is probably the most common data-interchange format, you'll likely find yourself needing to call a JSON web service. (If you are unfamiliar with JSON, review the link at the end of this recipe.) This recipe will demonstrate how to make a JSON Request using Volley.
Create a new project in Android Studio and call it JSONRequest
. Use the default Phone & Tablet option and select Empty Activity when prompted for Activity Type.
This recipe will be using the Volley setup as described in Getting started with Volley for Internet requests. Follow steps 1-5 to add Volley to your new project.
With Volley added to your project as described previously, follow these steps:
activity_main.xml
and replace the existing TextView
with the following XML:<TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content...
Change the font size
Change margin width
Change background colour