I want to design the xml page In Circle Shape (Like Google Chrome Logo). It should contains the Buttons in outside circle as well in the inside cirlce. Please give me Suggestions to overcome this Problem. i have tried with Absolute Layout but i'm unable to do it .
i need a layout like this. Hoping for better response. Thanks in Advance.
Android provides the following ViewGroups or layouts: LinearLayout : is a ViewGroup that aligns all children in a single direction, vertically or horizontally. RelativeLayout : is a ViewGroup that displays child views in relative positions.
Convert a view or layout Click the Design button in the top-right corner of the editor window. In the Component Tree, right-click the view or layout, and then click Convert view.... In the dialog that appears, choose the new type of view or layout, and then click Apply.
A ConstraintLayout is a ViewGroup which allows you to position and size widgets in a flexible way. Note: ConstraintLayout is available as a support library that you can use on Android systems starting with API level 9 (Gingerbread). As such, we are planning on enriching its API and capabilities over time.
In Android, an XML-based layout is a file that defines the different widgets to be used in the UI and the relations between those widgets and their containers. Android treats the layout files as resources. Hence the layouts are kept in the folder reslayout.
In this specific case, I would actually just use one image and then get the color of the pixel at the coordinates where the user clicked and act based on that. Other than that, maybe you can do something by tracing each "button" with a Path
. You'll have to build it up with lineTo
and maybe arcTo
and then use Region.setPath
to get a Region
and then test using Region.contains
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With