Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8898889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:43:32+00:00 2026-06-15T00:43:32+00:00

public class ListDetails extends ListActivity { ImageButton imagebutton; LoanDetails details; ArrayList<String> CreateReqID1, OpenTime1, RequestSummary1,

  • 0
public class ListDetails extends ListActivity 
{
    ImageButton imagebutton;
    LoanDetails details;
    ArrayList<String> CreateReqID1, OpenTime1, RequestSummary1, RequestStatus1;
    TextView CreateReqID, OpenTime, RequestSummary, RequestStatus;
    ListView list;
     public void onCreate(Bundle savedInstanceState) 
        {       
            super.onCreate(savedInstanceState);
            setContentView(R.layout.listdetails);           



            CreateReqID1 =  (ArrayList<String>) getIntent().getExtras().get("details1");
            OpenTime1 = (ArrayList<String>) getIntent().getExtras().get("details2");
            RequestSummary1 = (ArrayList<String>) getIntent().getExtras().get("details3");
            RequestStatus1 = (ArrayList<String>) getIntent().getExtras().get("details4");

            setListAdapter(new MyAdapter(this, R.layout.requestlistview));        
            }

     private class MyAdapter extends ArrayAdapter<String> {

            public MyAdapter(Context context, int resource) {
                super(context, resource);           

            }
                @Override
                public View getView(final int position, View convertView, ViewGroup parent) {

                    LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                    final View row = inflater.inflate(R.layout.requestlistview, parent, false);


                    Log.i("values set", "success");
                    CreateReqID = (TextView) row.findViewById(R.id.createReq);
                    OpenTime = (TextView) row.findViewById(R.id.openTime);
                    RequestSummary = (TextView) row.findViewById(R.id.requestSumary);
                    RequestStatus = (TextView) row.findViewById(R.id.status);


                    CreateReqID.setText(CreateReqID1.get(position));
                    OpenTime.setText(OpenTime1.get(position));  
                    RequestSummary.setText(RequestSummary1.get(position));
                    RequestStatus.setText(RequestStatus1.get(position));        

                    return row;
                }           
            }
}

I have the above code to add data’s into listview but my getview method is not getting called please tell me why.

my listview xml is shown below

<ListView
        android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/imageView2"
        android:layout_alignRight="@+id/imageButton5"
        android:layout_below="@+id/textView1" >

and my list layout format is shown below

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/RelativeLayout1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#FFFFFFFF" >


    <TextView
        android:id="@+id/textView4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/textView1"
        android:layout_below="@+id/textView2"
        android:layout_marginTop="12dp"
        android:layout_x="10dp"
        android:layout_y="60dp"
        android:text="RequestSummary"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="#000000"
        android:textColorLink="#000000" />

    <TextView
        android:id="@+id/textView3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/textView1"
        android:layout_below="@+id/textView4"
        android:layout_marginTop="11dp"
        android:layout_x="10dp"
        android:layout_y="85dp"
        android:text="RequestStatus"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="#000000"
        android:textColorHint="#000000" />

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/textView1"
        android:layout_below="@+id/textView1"
        android:layout_marginTop="11dp"
        android:layout_x="10dp"
        android:layout_y="35dp"
        android:text="OpenTime"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="#000000" />

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:layout_marginLeft="15dp"
        android:layout_marginTop="15dp"
        android:layout_x="10dp"
        android:layout_y="10dp"
        android:text="CreateReqID"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="#000000" />

    <TextView
        android:id="@+id/createReq"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_above="@+id/textView2"
        android:layout_marginLeft="29dp"
        android:layout_toRightOf="@+id/textView4"
        android:text="Small Text"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="#000000"
        android:textColorHint="#000000" />

    <TextView
        android:id="@+id/requestSumary"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBaseline="@+id/textView4"
        android:layout_alignBottom="@+id/textView4"
        android:layout_alignLeft="@+id/createReq"
        android:text="Small Text"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="#000000" />

    <TextView
        android:id="@+id/status"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBaseline="@+id/textView3"
        android:layout_alignBottom="@+id/textView3"
        android:layout_alignLeft="@+id/requestSumary"
        android:text="Small Text"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="#000000" />

    <TextView
        android:id="@+id/openTime"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBaseline="@+id/textView2"
        android:layout_alignBottom="@+id/textView2"
        android:layout_alignLeft="@+id/createReq"
        android:text="Small Text"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="#000000" />

</RelativeLayout>

I want to populate the textviews dynamically i got everything in the arraylist but my getView method is not getting called.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T00:43:33+00:00Added an answer on June 15, 2026 at 12:43 am

    you are not passing the array of string to the ArrayAdapter.. ArrayAdapter use the passed list to calculate the number of item to display in the view..

    Check out the javadoc for ArrayAdapter. You either need to send the array of object to its constructor or call one of the add() method to add the object to the Adapter..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

public class HttpPostTask extends AsyncTask<Void, Integer, Void> { TextView txtStatus = (TextView)findViewById(R.id.txtStatus); @Override protected
public class IdAsync extends AsyncTask<String, Void, Void> { AlertDialog alertDialog = new AlertDialog.Builder(MainClass.this).create(); protected
public class HomeActivity extends Activity{ // public ArrayList<User> users1 = new ArrayList<User>(); @Override public
public class abc<X extends Z> implements Iterable<X> { protected ArrayList<X> list; public Iterator<X> iterator()
public class BobDatabase extends SQLiteOpenHelper{ private static final String DATABASE_NAME = bob.db; private static
public class welcomepage extends javax.swing.JFrame { backendcode bec; String username; public welcomepage() { initComponents();
public class MYApplication extends Application { String property; setter getter } does above code
public class FBPost extends Service{ private Bundle params = new Bundle(); private String userID=;
public class tryAnimActivity extends Activity { /** * The thread to process splash screen
public class MyClass { public string MyProperty{ get; set; } Now, I would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.