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 8474885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:44:44+00:00 2026-06-10T17:44:44+00:00

On one fragment I have layout like question.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <TextView

  • 0

On one fragment I have layout like

question.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<TextView
    android:id="@+id/question"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:layout_marginLeft="44dp"
    android:layout_marginTop="47dp"
    android:text="TextView" />

<CheckBox
    android:id="@+id/checkBox1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignBottom="@+id/question"
    android:layout_marginLeft="85dp"
    android:layout_toRightOf="@+id/question"
    android:text="CheckBox" />

<EditText
    android:id="@+id/editText1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/question"
    android:layout_marginTop="23dp"
    android:ems="10"
    android:inputType="text" />

</RelativeLayout>

I have an interface like this

enter image description here

But the problem is when I focus on EditText and try to write something in it, then nothing is happening. No text , no keyboard is showing. If I click and hold on the EditText then it shows message that nothing to paste. Why the text is not entering in Edit Text?

Here is my code

public class ListFrag extends ListFragment {

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {  
        super.onActivityCreated(savedInstanceState);       
        setListAdapter(new ListFragAdapter(
            new MyListData("Software Engineer", "Basit", "4 years"),
            new MyListData("Lt. Commander", "Kashif", "12 years"),
            new MyListData("Beautiful", "Hafsa", "23 years"),
            new MyListData("Electrical Engineer", "Wajahat", "7 years"),
            new MyListData("Doctor", "Mehreen", "12 years")));  
    } //end of onActivityCreated()

    @Override
    public void onListItemClick(ListView l, View v, int position, long id) {        
        MyListData listData = (MyListData)getListAdapter().getItem(position);       
        DetailFrag frag = (DetailFrag) getFragmentManager().findFragmentById(R.id.frag_capt);
        if (frag != null && frag.isInLayout()) {            
            getData(position, listData, frag);  
        }

    } //end of onListItemClick()

    private void getData(int position, MyListData listData, DetailFrag frag) {      
        String artist = listData.artist;
        String title = listData.title;      
        frag.setText(artist, title);        
    } //end of getData()

} //end of class ListFrag

Here is my Detail Fragment

public class DetailFrag extends Fragment {

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        
        View view = inflater.inflate(R.layout.question , container, false);
        return view;

    } //end of onCreateView()

    public void setText(String artist, String title) {

        TextView leftSide_artist = (TextView) getView().findViewById(R.id.question);
        leftSide_artist.setText(artist);
        
    } //end of setText()

} //end of class DetailFrag

Thanks

  • 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-10T17:44:46+00:00Added an answer on June 10, 2026 at 5:44 pm

    yup there is a difference , usually it happens in Landscap mode keyboard not pops up in AVD but will work fine on device, how i managed this

    • Go to your emulator Setting >> Languages & Keyboard, turn off all dictionaries and Auto suggestions
    • Go to AVD Manger and Edit you AVD, in ‘Hardware’ section click ‘New’ and add “keyboard support”
    • Restart AVD

    Try if it works for you

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

Sidebar

Related Questions

I have a question about Android. Assume we have our main xml layout file,
I need to center grid view horizontally in my android layout.xml. I have searched
I know figure 2 of http://developer.android.com/guide/components/fragments.html I wonder what happens from Fragment Active when
In a fragment's view, I'd like to adjust the layout params of one of
I have a ViewPager with multiple fragments. In one Fragment I play audio. When
In my android app I have fragments, and one of them is very heavy
I create one example in Android 3.0 and I use the fragment in it.
I have some XML which I am testing, which has set as one of
I have a main Activity and one fragment . The main Activity has the
I've got a problem concerning android layouts. In my xml file I have two

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.