Issue
How do I make a Button so that when I put part of it out of bounds the program doesn't just cut the parts of it that aren't inbound. What I mean is this.This is a rotating view, the rectangles are rotating around the circle, but since I put 2 of the buttons partially out of bound their parts get cut off. Is there a quick fix for this?
(If programmatical fix is necessary I am writing in Kotlin)
Solution
The reason this is happening is because the RelativeLayout
in which you're adding these four View
s (buttons), has the width of screen's width. You need to increase its width to contain both the left and right buttons completely. Then, when you rotate the RelativeLayout
, the buttons will be visible.
For testing purpose, try giving this width to RelativeLayout
<RelativeLayout
android:layout_width = "1000dp"
android:layout_height = "1000dp">
<!--Your buttons here-->
</RelativeLayout>
See if this works out. If it does, then you'll have to calculate the width of RelativeLayout
programmatically.
Answered By - Bugs Happen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.