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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:23:50+00:00 2026-05-30T23:23:50+00:00

I am using android support package v4 and the following layout to show up

  • 0

I am using android support package v4 and the following layout to show up a scrollable tabbar + corresponding slideable contentviews:

<?xml version="1.0" encoding="utf-8"?>
<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">

<LinearLayout
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
    <LinearLayout
                android:orientation="horizontal"
                android:layout_width="fill_parent"
                android:gravity="center_vertical"
                android:layout_height="wrap_content">
        <HorizontalScrollView
                            android:layout_width="wrap_content"
                            android:id="@+id/horizontalScrollView"
                            android:orientation="horizontal"
                            android:layout_height="wrap_content"
                            android:fillViewport="true"
                            android:scrollbars="none">
            <TabWidget
                    android:id="@android:id/tabs"
                    android:orientation="horizontal"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"/>

        </HorizontalScrollView>
    </LinearLayout>
    <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_weight="0"/>
    <android.support.v4.view.ViewPager
            android:id="@+id/viewPager"
            android:layout_width="fill_parent"
            android:layout_height="0dp"
            android:layout_weight="1"/>
</LinearLayout>
</TabHost>

It works well lets say 90% but 10% it just don’t redraw the ui. Even the invalidate of the elements doesn’t solve the problem.
Now the strangest part: After locking and relocking the phone, everything shows up like expected and works like a charm.

For example:
I add a new tab + fragment.
– Tab + Fragment are added, all methods on them are called, but the UI is just black. lock+unlock = everything is okay again.

Handling userinput on fragment. (See pic)
Userinput on Fragment

Notice:
I already tested the invalidation of all elements, it doesn’t work.

What else can I do to solve this problems?

Thanks in advance

  • 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-05-30T23:23:51+00:00Added an answer on May 30, 2026 at 11:23 pm

    There was a memoryleak on the tabhost.

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

Sidebar

Related Questions

I am using the ViewPager from the Android Support package (android.support.v4.view.ViewPager). My ViewPager layout
Me used Fragment of Android Compatibility Package, using the android-support-v4.jar . But I can't
My app is currently using the Fragments/v4 compatibility package to support Android versions all
I've been using the Android compatibility Package but i encountered the following issue, it
When I take pictures using android.hardware.camera and I save them to the following location
Building an app using android.support.v4.app , targeting API level 8. Everything's working as planned
Seems the Google-recommended way (using the android support library) for a fragment or activity
I am using a method to detect pdf support on an Android device that
I'm using fragments in my Android application using the compatibility package. I have tested
I've been developing an Android application using version 2.3.3 (API 10). The application simply

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.