Networking with Volley in Android

Volley is a networking library for Android that manages network requests. It bundles the most important features you’ll need, such as accessing JSON APIs, loading images and String requests in an easier-to-use package. By using Volley for network operations you avoid the standard way to handle networking, HttpURLConnection. Another reason is asynchronicity. Volley handles asynchronicity by …

Networking with Volley in Android Read More »

Shared Preferences in Android. Save Data

<?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android”    xmlns:app=”http://schemas.android.com/apk/res-auto”    xmlns:tools=”http://schemas.android.com/tools”    android:layout_width=”match_parent”    android:layout_height=”match_parent”    tools:context=”com.arham.csdevbin.downloadimagefrominternet.SharedPreferencesDemo”>    <CheckBox        android:id=”@+id/checkBox”        android:layout_width=”wrap_content”        android:layout_height=”wrap_content”        android:layout_alignParentLeft=”true”        android:layout_alignParentStart=”true”        android:layout_alignParentTop=”true”        android:layout_marginLeft=”103dp”        android:layout_marginStart=”103dp”        android:layout_marginTop=”136dp”        android:text=”CheckBox” /></RelativeLayout> package com.arham.csdevbin.downloadimagefrominternet; import android.content.SharedPreferences; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.Toast; public class SharedPreferencesDemo extends AppCompatActivity implements CompoundButton.OnCheckedChangeListener {    CheckBox checkBox;    @Override    protected void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setContentView(R.layout.activity_shared_preferences);        checkBox …

Shared Preferences in Android. Save Data Read More »

Downloading Image From Internet in Android

activity_main.xml <?xml version=“1.0” encoding=“utf-8”?> <LinearLayout xmlns:android=“http://schemas.android.com/apk/res/android”     xmlns:app=“http://schemas.android.com/apk/res-auto”     xmlns:tools=“http://schemas.android.com/tools”     android:layout_width=“match_parent”     android:layout_height=“match_parent”     android:orientation=“vertical”     tools:context=“com.arham.csdevbin.downloadimagefrominternet.MainActivity”>     <ImageView         android:id=“@+id/imageView”         android:layout_width=“300dp”         android:layout_height=“400dp”         android:layout_gravity=“center_horizontal”         android:layout_marginTop=“30dp”         app:layout_constraintLeft_toLeftOf=“parent”         app:layout_constraintRight_toRightOf=“parent”         app:srcCompat=“@mipmap/ic_launcher”         tools:layout_editor_absoluteY=“45dp” />     <Button         android:id=“@+id/button”         android:layout_width=“wrap_content”         android:layout_height=“wrap_content”         android:layout_gravity=“center_horizontal”         android:layout_marginTop=“20dp”         android:text=“Download Image”         …

Downloading Image From Internet in Android Read More »

AsyncTask in Android Tutorial

AsyncTask enables proper and easy use of the UI thread. This class allows you to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers. AsyncTask is designed to be a helper class around Thread and Handler and does not constitute a generic threading framework. AsyncTasks should ideally be used for short …

AsyncTask in Android Tutorial Read More »

How to add an Android Studio project to GitHub ?

·         Sign up and create a GitHub account in www.github.com. ·         Download git from https://git-scm.com/downloads and install it in your system. ·         Open the project in android studio and go to File -> Settings -> Version Control -> Git. ·         Click on test button to test “path to Git executables”. If successful message is shown …

How to add an Android Studio project to GitHub ? Read More »

JSON parsing and Displaying in ListView

1. manisfests.xml <uses-permission android:name=“android.permission.INTERNET”/> 2.mainActivity.xml <RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android”     xmlns:tools=“http://schemas.android.com/tools”     android:layout_width=“match_parent”     android:layout_height=“match_parent”     tools:context=“.MainActivity“>     <ProgressBar         android:id=“@+id/progressBar”         style=“?android:attr/progressBarStyleLarge”         android:layout_width=“wrap_content”         android:layout_height=“wrap_content”         android:layout_centerHorizontal=“true”         android:layout_centerVertical=“true”         android:visibility=“invisible” />     <ListView         android:id=“@+id/listView”         android:layout_width=“wrap_content”         android:layout_height=“wrap_content”         android:layout_alignParentLeft=“true”         android:layout_alignParentStart=“true”         android:layout_alignParentTop=“true” /> </RelativeLayout> 3.activity_detail <RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android”     xmlns:tools=“http://schemas.android.com/tools”     android:layout_width=“match_parent”     android:layout_height=“match_parent” …

JSON parsing and Displaying in ListView Read More »