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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:55:55+00:00 2026-06-07T02:55:55+00:00

Following layout is used to show views on tabcontent. However, when admob appears, framelayout

  • 0

Following layout is used to show views on tabcontent. However, when admob appears, framelayout goes down getting tabwidget on front. How could I set frameLayout always above tabwidget?? or the same, tabwidget below framelayout. Thank you

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
              android:orientation="vertical"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              >


      <com.google.ads.AdView android:id="@+id/adView"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         ads:adUnitId="xxx"
                         ads:adSize="SMART_BANNER"
                         ads:testDevices="TEST_EMULATOR, xxx"
                         ads:loadAdOnCreate="true"/>   

<TabHost 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost" 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

      <RelativeLayout       
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:id="@+id/mainLayout">


        <LinearLayout  
            android:id="@+id/mainLayout"
            android:orientation="vertical"
            android:layout_width="fill_parent" 
            android:layout_height="fill_parent"
            >

                    <FrameLayout 
                        android:id="@android:id/tabcontent"
                        android:layout_width="fill_parent" 
                        android:layout_height="0dip"
                        android:layout_weight="1" 
                        android:scrollbars="none">
                    </FrameLayout>

            <TabWidget 
                android:id="@android:id/tabs"
                android:layout_width="fill_parent" 
                android:layout_height="wrap_content"
                android:layout_weight="0"/>

        </LinearLayout>         
    </RelativeLayout>
</TabHost> 

</LinearLayout>

enter image description here

  • 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-07T02:55:57+00:00Added an answer on June 7, 2026 at 2:55 am

    It should be like so…

    <TabHost>start
    
        <LinearLayout>start
    
            <com.google.ads.AdView
                start
                end />
    
            <FrameLayout>start
    
                <LinearLayout>start
                <LinearLayout>end
    
            </FrameLayout>end
    
            <TabWidget>start
            </TabWidget>end
    
        </LinearLayout>end
    
    </TabHost>end
    

    If you want to have the google adds change with the different tabs then the above way is best, but if you do not then just make it like this….

    <LinearLayout>start
    
        <com.google.ads.AdView
            start
            end />
    
        <TabHost>start
    
            <LinearLayout>start
    
                <FrameLayout>start
    
                    <LinearLayout>start
                    <LinearLayout>end
    
                </FrameLayout>end
    
                <TabWidget>start
                </TabWidget>end
    
            </LinearLayout>end
    
        </TabHost>end
    
    </LinearLayout>end
    

    Also set the tab widget to android:layout_marginBottom=”-4dp” just in case.

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

Sidebar

Related Questions

I'm having trouble getting the following three-column layout to work: A B C +-------+-------------------+------------+
I used the following code to add a view in a layout LinearLayout linearLayout_row1_recent_released
I've got some problems with a table layout I used to show communication data
I have the following layout in my page (simplified) <h:form> <h:commandButton action=#{bean.save} value=Save/> <rich:tabPanel
I want following layout in my app. A button at top, second botton at
I have the following layout for my mvc project: /Controllers /Demo /Demo/DemoArea1Controller /Demo/DemoArea2Controller etc...
I have the following layout defined for one of my Activities: <?xml version=1.0 encoding=utf-8?>
I have the following layout : And following code : public class MailSenderActivity extends
I have the following layout: <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/aussie_bg_big > <ImageView android:id=@+id/titleImage android:layout_width=wrap_content
I've got the following layout with one ImageView and 2 TextView, 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.