Code example for JSONArray

Methods: get

0
    } 
 
    @Override 
    public Object getItem(int position) {
        try { 
            return mArray.get(position);
        } catch (JSONException e) {
            throw new IllegalStateException(e);
        } 
//        throw new IllegalArgumentException("position " + position + " in a list of size " + mArray.length()); 
    } 
 
    @Override 
    public long getItemId(int position) {
        return position;
    } 
 
    @Override 
    public View getView(int position, View view, ViewGroup parent) {
        JSONObject item = (JSONObject) getItem(position);