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

  • Home
  • SEARCH
  • 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 7715023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:16:55+00:00 2026-06-01T02:16:55+00:00

enter code here I have a ListView that have a different Layout XML for

  • 0

enter code hereI have a ListView that have a different Layout XML for each cell,this is how i set it up:

    this.setContentView(R.layout.item_view);

    ListView m_ListView = this.getListView();
    m_ListView.setTextFilterEnabled(true);
    m_ListView.setItemsCanFocus(false);
    m_ListView.setCacheColorHint(0x00000000);

    mInflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);

    ArrayList<View> views=new ArrayList<View>();
    e = mInflater.inflate(R.layout.item_first, null);

    views.add(e);

    r = mInflater.inflate(R.layout.item_second, null);

    views.add(r);

    t = mInflater.inflate(R.layout.item_third, null);

    views.add(t);

    mAdapter = new SillyAdapter(views);
    setListAdapter(mAdapter);

Now in one of the Layout i have 3 EditText ,the first is selected and when i press him the keyboard in the device is not opened, and when i pressed the two others the first one is still selected,this is how the xml look like:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout
    android:id="@+id/linearLayout3"
    android:layout_width="match_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" android:layout_marginTop="5dp">

    <TextView
        android:id="@+id/textView3"
        android:layout_width="250dp"
        android:layout_height="wrap_content"
        android:text="@string/str_item"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:gravity="center_horizontal"
        android:layout_gravity="center_horizontal" android:lines="2" 
        android:textColor="@color/Red" android:layout_marginTop="5dp"/>

    <EditText
        android:id="@+id/editText1"
        android:layout_width="250dp"
        android:gravity="center"
        android:layout_height="wrap_content" android:layout_gravity="center_horizontal" 
        android:hint="Name" android:layout_marginTop="4dp"/> <requestFocus />

    <LinearLayout
        android:id="@+id/linearLayout6"
        android:layout_width="275dp"
        android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="4dp">

        <EditText
            android:id="@+id/editText2"
            android:layout_width="250dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="2dp"
            android:layout_weight="1"
            android:gravity="center"
            android:hint="Telephone" android:layout_gravity="center_horizontal" android:layout_marginLeft="12dp">


        </EditText>

        <TextView
            android:id="@+id/textView5"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="*"
            android:textAppearance="?android:attr/textAppearanceMedium" android:layout_gravity="center_vertical" android:textColor="@color/Red" android:layout_marginBottom="6dp"/>

    </LinearLayout>

    <EditText
        android:id="@+id/editText3"
        android:layout_width="250dp"
        android:layout_height="wrap_content" android:layout_gravity="center_horizontal" 
        android:gravity="center" android:hint="E-Mail" android:layout_marginTop="4dp"/>

    <TextView
        android:id="@+id/textView6"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/str_req"
        android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/Red" android:layout_marginLeft="30dp" android:layout_marginTop="4dp"/>

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal" 
        android:paddingTop="10dp" android:background="@drawable/hazmana" android:layout_marginTop="5dp" android:layout_marginBottom="5dp"/>
</LinearLayout>

Any idea why the keyboard in the device is not popup?

Edit

Theis is SillyAdapter :

class SillyAdapter extends SackOfViewsAdapter {
    public SillyAdapter(List<View> views) {
      super(views);
    }

    protected View newView(int position, ViewGroup parent) {
      TextView txt=new TextView(Catalog.this);
      return(txt);
    }
}

and Catalog is the main Class

  • 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-01T02:16:56+00:00Added an answer on June 1, 2026 at 2:16 am

    Hi. My assumption is that the problem lay in the following code:

    m_ListView.setItemsCanFocus(false);
    

    Try to remove that line or change false to true

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

Sidebar

Related Questions

I have <.ImageView> enter code here s(icons) in my android layout xml file, which
enter code here Hi All, I have a simple windows service application that connects
enter code here I have a method that logs errors when an exception is
enter code here I have a table on SQL server 2005 with bigint primary
i have two dropdown list. first drop down:1 enter code here <form:select path=custName id=custName>
enter code here My problem is this: in this database the junction table contains
I check like this: enter code here var point = new g.LatLng(parseFloat(lat),parseFloat(lng)); var bounds
I have one html structure: enter code here <ul> <li><span>aaa</span> <div> <ul> <li><span>bbb</span> </li>
enter code here I have the following code to build select menus dynamically: $j(#id).load('create_menu.cgi',
enter code here I have a TabControl on a Form and in the TabPages

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.