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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:51:35+00:00 2026-05-23T16:51:35+00:00

Probably simple but i cannot figure this out. I have a subclass of SlidingDrawer

  • 0

Probably simple but i cannot figure this out.

I have a subclass of SlidingDrawer only to handle the hight correctly.
(thanks to @seydhe for the solution)

The problem is that when i open the drawer the hight is not set correctly,
It get set as soon as i lift my finger from the handle-butten.
How can i make the SlidingDrawer set the hight before i start pulling the drawer?

I have tries in various combinations to slidingDrawerRight.requestLayout();
and it works. The problem is where can i call it?
I have tried in various places like
OnClickListener
OnTouchListener
OnDrawerCloseListener
but i cannot get it to work.
Maybe there’s a way to fix the xml to do this?

adding tree images and the xml.

As shown in down belove picture nr:1,
I start to open the drawer
and the size is irregular:

NR1: Image when being opened..

 nr1 Image when being opened

NR2: Image when fully opened as soon as i let go of finger.

enter image description here

nr3 Image when SD background is set to #eeffae and RelativLayout background is @null

enter image description here

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/RelativeLayout1"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical">

    <Gallery xmlns:android="http://schemas.android.com/apk/res/android"
             android:id="@+id/examplegallery" 
             android:layout_width="fill_parent"
             android:layout_height="wrap_content" />
   <RelativeLayout 
        android:id="@+id/InnerRelativeLayout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true" >
    <Button 
        android:id="@+id/btn_newpen_drawtext" 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Pen"
    />      
    <EditText 
        android:id="@+id/etx_addtext_drawtext"
        android:layout_width="fill_parent"
        android:layout_toLeftOf="@+id/btn_delete_pen"
        android:layout_toRightOf="@+id/btn_newpen_drawtext"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:text="Enter text here"
    />
        <Button 
            android:id="@+id/btn_delete_pen" 
            android:layout_toLeftOf="@+id/btn_save_drawtext"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Del"
        />
        <Button 
            android:id="@+id/btn_save_drawtext" 
            android:layout_alignParentRight="true" 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="save"
        />

    </RelativeLayout>

<LinearLayout android:id="@+id/linearLayoutSlidingDrawerRight"
              android:layout_width="150dip"
              android:layout_height="wrap_content"
              xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_alignParentRight="true"
              android:layout_centerVertical="true"
              >

    <com.bollen.sppik.editimage.WrappingSlidingDrawer android:id="@+id/slidingDrawerRight" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:handle="@+id/slideHandleButtonRight" 
        android:content="@+id/contentLayout2" 
        android:orientation="horizontal">

        <ImageButton android:id="@+id/slideHandleButtonRight"
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:background="@drawable/icon"
            android:onClick="btnSlidingDrawerHandler">
        </ImageButton>

        <RelativeLayout 
            android:layout_width="wrap_content" 
            android:layout_height="fill_parent"
            android:id="@+id/contentLayout2" 
            android:orientation="vertical" 
            android:background="#C0C0C0" 
            >

            <ImageButton android:id="@+id/btn_A" 
                android:layout_height="wrap_content" 
                android:layout_width="wrap_content" 
                android:text="Button_A" 
                android:background="@android:color/transparent" 
                android:src="@drawable/right_drawer"
                android:onClick="btnAListener">
            </ImageButton>

            <ImageButton android:id="@+id/btn_B" 
                android:layout_height="wrap_content" 
                android:layout_width="wrap_content" 
                android:layout_below="@+id/btn_A"
                android:text="Button_B" 
                android:background="@android:color/transparent" 
                android:src="@drawable/right_drawer"

                android:onClick="btnBListener">
            </ImageButton>          

        </RelativeLayout>
    </com.bollen.sppik.editimage.WrappingSlidingDrawer>
</LinearLayout>
</RelativeLayout>
  • 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-23T16:51:36+00:00Added an answer on May 23, 2026 at 4:51 pm

    answering my own question.
    I set the background to transparent like this

    android:background="@null" 
    

    Looks ok and the odd resizing behavior still happens but it’s not visible.

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

Sidebar

Related Questions

It is probably pretty simple but I cannot figure it out: Say I have
Probably a simple question, but I cannot figure this out. In this plugin: https://github.com/brianmario/jquery-infinite-scroll
This is probably very simple but I cannot figure it out and my searches
Probably a simple noob error but I cannot figure it out. I have a
This is probably a simple question but I can't seem to figure out how
This is probably a simple one but I can't seem to figure it out.
probably it is a simple mistake but I cannot figure out what is wrong.
I am new so this is probably simple but I have looked everywhere and
Probably really simple but I just cannot work out how to use any API's
Im sure this is probably a simple answer, but I cannot see anything wrong

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.