0

I am using Edit Text inside Tab Host. But when I have clicked on edit text keyboard doesn't appear. I appears some times but takes time to appear. EditText might be loosing focus. I have searched many codes like requestFocus, onTouchModeChanged() such kind of functions but nothing worked for me. Still I am facing same problem. Please help me for solving this issue. Thank you in advance.

This is the code I am using for Tabhost. `

    // Tab for Videos
    TabHost.TabSpec videospec = tabHost.newTabSpec("Beware");
    videospec.setIndicator("", getResources().getDrawable(R.drawable.icon_beware_tab));
    Intent videosIntent = new Intent(this, beware.class);
    videospec.setContent(videosIntent);

    // Tab for Videos
    TabHost.TabSpec videospec1 = tabHost.newTabSpec("Need Help");
    videospec1.setIndicator("", getResources().getDrawable(R.drawable.icon_needhelp_tab));
    Intent videosIntent1 = new Intent(this, Need_help.class);
    videospec1.setContent(videosIntent1);

    // Tab for Videos
    TabHost.TabSpec videospec2 = tabHost.newTabSpec("Alert");
    videospec2.setIndicator("", getResources().getDrawable(R.drawable.icon_alert_tab));
    Intent videosIntent2 = new Intent(this, alert.class);
    videospec2.setContent(videosIntent2);

    // Tab for Videos
    TabHost.TabSpec videospec3 = tabHost.newTabSpec("Report");
    videospec3.setIndicator("", getResources().getDrawable(R.drawable.icon_report_tab));
    Intent videosIntent3 = new Intent(this, report.class);
    videospec3.setContent(videosIntent3);

    // Tab for Songs
    TabHost.TabSpec songspec = tabHost.newTabSpec("Contacts");
    songspec.setIndicator("", getResources().getDrawable(R.drawable.icon_contacts_tab));
    Intent songsIntent = new Intent(this, Contacts.class);
    songspec.setContent(songsIntent);



    // Adding all TabSpec to TabHost
    tabHost.addTab(videospec);
    tabHost.addTab(videospec1);
    tabHost.addTab(videospec2);
    tabHost.addTab(videospec3);
    tabHost.addTab(songspec)`

Another Activities having simple EditText. Please help for this. Thank you.

kiran
  • 1
  • 1
  • You can open keyboard dynamically on EditText focus,Follow this [link](http://stackoverflow.com/questions/5105354/how-to-show-soft-keyboard-when-edittext-is-focused) – hrskrs Jan 13 '16 at 06:43
  • Thank you for reply. But this also not worked for me.Please provide another way. Thank you. – kiran Jan 14 '16 at 03:10
  • Check if you have put `android:windowSoftInputMode="stateHidden"` at `AndroidManifest` on that `activity`.OTherwise extend your question by showing `xml` and `Manifest` code – hrskrs Jan 14 '16 at 07:33

0 Answers0