androindian's Profile

28
Points

Questions
6

Answers
8

  • Asked 5 days ago in android.

    Array:

    Java array is an object the contains elements of the similar data type. It is a data structure where we store similar elements. 

    In android this we use show multiple items in a single position we use arrays like listview, grid view etc. , but its predefined.

     

    When we want to show some list/grid we use array Adapter that is predefined like below using this we can create the only single item in listview

    ArrayAdapter adapter = new ArrayAdapter<String>(this, 
    R.layout.activity_listview, mobileArray);
    listView.setAdapter(adapter);
    

     

    Custom :

    When we use Custom we can list with multiple items, so on Custom Adapter, we extend as base adapter because it has 4 implemented methods so easily we can write the using Base Adapter.

    for example, code click here

     

     

    • 11 views
    • 1 answers
    • 0 votes
  • Asked on December 26, 2017 in android.

    Attachment is missing, please  send attachment so that we can give answer

    • 182 views
    • 2 answers
    • 0 votes
  • Asked on November 23, 2017 in android.

    Go to File->setting->editor->file and code templates, select Class in the files tab and paste this:

    #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end #parse("File Header.java") public class ${NAME} { }
    

    RE: Error while creating a class/interface

    • 172 views
    • 1 answers
    • 0 votes
  • Asked on May 23, 2017 in No Category.
    JsonObjectRequest objectRequest=new JsonObjectRequest(Request.Method.POST, url, obj,
     new Response.Listener<JSONObject>() {
     @Override
     public void onResponse(JSONObject response) {
     try {
     JsonArray array1=response.getJsonArray("basic");
     for(int i=0;i<array1.length();i++){
     JsonObject o=array1.getJSONObject(i);
     }
     JsonArray array2=response.getJsonArray("pkgs");
     for(int j=0;j<array2.length();j++){
     JsonObject o=array2.getJSONObject(i);
     }
     } catch (JSONException e) {
     e.printStackTrace();
     }
     }
     },
     new Response.ErrorListener() {
     @Override
     public void onErrorResponse(VolleyError error) {
     Log.e("Error",""+error);
     }
     });
     mRequestQueue.add(objectRequest);
     }
    }
    
    • 0 views
    • 154 answers
    • 0 votes
  • Asked on January 7, 2017 in android.

    Please share your code here will provide solution per that

    • 301 views
    • 1 answers
    • 0 votes
  • Asked on January 7, 2017 in android.

    Please find your answer here

    • 176 views
    • 1 answers
    • 0 votes
  • Asked on July 6, 2016 in android.

    The Process of executing multiple threads at the same time is called as multi threading or thread based multitasking. If the application contains multiple threads then the application is said to be multi threading.

    • 105 views
    • 1 answers
    • 0 votes
  • Asked on July 6, 2016 in android.

    A Package is a collection of classes and interfaces which are related. The purpose of a package is to improve the performance and increase accessibility.

    Packages are 2 types

    • Predefined
    • Userdefinded
    • 101 views
    • 1 answers
    • 0 votes