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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:43:08+00:00 2026-06-04T09:43:08+00:00

so im having problems with android clipping the button click area on my view.

  • 0

so im having problems with android clipping the button click area on my view. I have a very simple view for the moment and before any animations, the width of the view is being limited to the size of the buttons contained within it, even though i am telling to to be fill_parent in both width and height.

I have the drawing for the animation working correctly with setClipChildren(false), but this is still stopping the buttons from being clicked. I am also correctly moving the actual button’s view because when one of the buttons (i have 5 in this animation all moving independently) moves directly above the initial starting position it is able to be clicked and i receive the even correctly.

here is the code im using for the outer-most view (i have 2 to simulate how this view will be added into a larger project later):

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

        <com.tests.FancyBottomTab
            android:id="@+id/fancyBottomTab1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="5dp"
            android:gravity="center_horizontal" 
            android:clipChildren="false">

        </com.tests.FancyBottomTab>

    </RelativeLayout>

then here is what the FancyBottomTab is using as its layout xml:

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center_horizontal"
        android:orientation="vertical" >

        <Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="5dp"
            android:background="@drawable/b1"
            android:paddingBottom="5dp" />

        <Button
            android:id="@+id/button2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="5dp"
            android:background="@drawable/b2"
            android:paddingBottom="5dp"  />

       <Button
            android:id="@+id/button3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="5dp"
            android:background="@drawable/b3"
            android:paddingBottom="5dp"  />

        <Button
            android:id="@+id/button4"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="5dp"
            android:background="@drawable/b4"
            android:paddingBottom="5dp"  />

        <Button
            android:id="@+id/button5"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="5dp"
            android:background="@drawable/b5"
            android:paddingBottom="5dp"  />

        <Button
            android:id="@+id/fancyRedButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:background="@drawable/fancy_red_button"
            android:visibility="visible" />

    </RelativeLayout>

UPDATE: just assume that the animations are in a semicricle pattern of width 100dp and the buttons are evenly spaced and the views correctly moved. Hopefully this clears up a few things and helps find a solution.

UPDATE AGAIN: ok, this time someone should be able to help me figure out what is wrong, ive edited the background so that the on in the RelativeLayout containing the buttons is half-transparent (the grey in the image below), and then the background on the outer RelativeLayout is white. Now the outer RelativeLayout must remain a relative layout for layout purposes later, but here is the XML being used for it:

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


        <com.dobango.tests.FancyBottomTab
            android:id="@+id/fancyBottomTab1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="5dp"
            android:clipChildren="false"
            android:gravity="center_horizontal" >

        </com.dobango.tests.FancyBottomTab>

    </RelativeLayout>

Here is a screen shot of with the added colors that should make it abundantly clear that something is wrong, but i just cant see it at all.

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-04T09:43:09+00:00Added an answer on June 4, 2026 at 9:43 am

    OK, so i have no idea WHY this was absolutely necessary to get the view to show up correctly, especially since i already said the same exact thing in the XML files, but this line completely solved the issues:

       view.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    

    If anyone knows why i had to put this line in my custom Relative Layout class, please comment and explain. Thanks.

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

Sidebar

Related Questions

I have just begun working with the Android SDK and I am having problems
this Android code worked fine before, but i'm having problems for some reason. here
I'm having problems with SQLite in Android. Eclipse does not report any error in
I am very new to Android and I am having problems figuring out how
I was having problems earlier implementing in-app billing for android. I have fixed that
I am still having problems with my TextToSpeech android, I entered the button twice
I'm having problems properly displaying an alert in my Android app. The goal is
I'm trying build an App Engine connected Android application and am having some problems
I've been having problems on compiling Fluidsynth (1.0.9) for Android JNI. After reading into
I'm still very new to Object Oriented programming and am having problems with the

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.