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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:42:00+00:00 2026-06-14T15:42:00+00:00

I develop an app like below,In the mainActivity,when I try to add an image

  • 0

I develop an app like below,In the mainActivity,when I try to add an image the TAB1,the picuture can’t fill full of the tab,it has a border lost.

activity picutre

The yellow part is the TAB1,I need yellow color fill with the TAB1.any help will be appreciated :),thanks

EDIT:

I update my key code

public class MainActivity extends TabActivity implements OnTabChangeListener{

    private TabSpec ts1,ts2,ts3;//declare three page
    private TabHost tableHost;

    @override
    public void onCreate(Bundle savedInstanceState){
    super.onCreat(savedInstanceState);
    tableHost=this.getTabHost();
    LayoutInflater.from(this).inflate(R.layou.activity_main,tableHost.getTabContentView());
    ts1=tableHost.newTabSpec("Tabone");
    ts1.setIndicator("TAB1",getResources().getDrawable(R.drawable.read2));
    ts1.setContent(R.id.btn);
    ts2=tableHost.newTabSpec("Tabtwo");
    ts2.setIndicator("TAB2");
    ts2.setContent(R.id.et);
    ts3=tableHost.newTabSpec("Tabthree");
    ts3.setIndicator("TAB3");
    ts3.setContent(R.id.mylayout);
    tableHost.addTab(ts1);
    tableHost.addTab(ts2);
    tableHost.addTab(ts3);
    tableHost.setOntabChangedListener(this);
}
}
  • 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-14T15:42:02+00:00Added an answer on June 14, 2026 at 3:42 pm

    Did you try Your app on emulator or on a real device? If you had set “match_parent” to your Layout, it should work. But I got a similar problem with my Samsung Galaxy S3, it could be that is a hardware error, not your fail.

    EDIT

    Ok, so if You just use Java-Code without xml definition, maybe you should set the layout-params for the tabhost. I don´t realy know, just an assumption.

        tableHost = new TabHost(this);
        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
                LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
        tableHost.setLayoutParams(params);
    

    But there are many LayoutParams, don´t know if LinearLayout.LayoutParams are the right one for you. If it doesn´t work, you have to try some other LayoutParams.

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

Sidebar

Related Questions

How to develop an iPhone app using its webviewer? Like in Andriod we can
I want to develop a Facebook app like a dictionary tool available in browser
I want to develop app which will recognize object(like monument or something) present in
I would like to develop a MS paint like app for the iPhone. Could
I wanted to develop a Django app and one of the functionalities I'd like
I'd like to develop an iOS app that fixes tags in the user's music
I'd like to develop an app to visualize galleries and I really like the
I am trying to develop a simple android app. It has two text boxes
I am looking to develop a web-app that displays an image to the user
I need to develop an app in C# that is like the Restore Database

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.