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

  • Home
  • SEARCH
  • 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 5934871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:10:30+00:00 2026-05-22T15:10:30+00:00

I’m trying to create a SlidingDrawer with LinearLayout content over a FrameLayout. At first

  • 0

I’m trying to create a SlidingDrawer with LinearLayout content over a FrameLayout.

At first it all seems fine, I get my SlidingDrawer’s handle at the bottom of the screen.
But then, if I start dragging the handle up and the content starts showing, it gets clipped by the border rectangle of the handle. If I drag the handle all the way up the entire content eventually gets shown, however if I now drag the handle down, it will be clipped by the border rectangle of the content. Also, if the handle is all the way up, as soon as I start dragging it the whole content disappears.
I can still click on where the handle should be on the screen, drag it and the content would show, but I need to guess where the handle is.

What seems to be causing this is the fact that I have a SurfaceView in the xml file just before SlidingDrawer.
Removing the view from the xml solves this problem, however I need this view.

Here’s the xml:

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

    <!--  Removing this DrawView from here solves the problem -->
    <com.package.DrawView 
        android:id="@+id/main"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
    />

    <SlidingDrawer  
        android:id="@+id/SlidingDrawer"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:allowSingleTap="true"
        android:animateOnClick="true"
        android:handle="@+id/slideHandleButton"
        android:content="@+id/contentLayout" 
        android:padding="10dip">

        <Button
            android:id="@+id/slideHandleButton"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/sliding_button">
        </Button>

        <LinearLayout
            android:id="@+id/contentLayout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <Button 
                android:id="@+id/clearButton" 
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Test">
            </Button>

        </LinearLayout>

    </SlidingDrawer>

</FrameLayout>   

Java:

package com.package;

import android.app.Activity;
import android.os.Bundle;

public class SlideTest extends Activity 
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.main);
    }
}

package com.package;

import android.content.Context;
import android.util.AttributeSet;
import android.view.SurfaceView;

public class DrawView extends SurfaceView
{
    public DrawView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }
}

Edit: I just noticed that if DrawView extends View and not SurfaceView this problem goes away.
However, I’m using a dedicated drawing thread and according to the documentation (and LunarLander example) when using a dedicated drawing thread, it should draw to a SurfaceView.

Any help would be greatly appreciated!

  • 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-22T15:10:30+00:00Added an answer on May 22, 2026 at 3:10 pm

    android:background=”#00000000″

    Background color was the problem.

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

Sidebar

Related Questions

No related questions found

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.