Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Layout Design [closed]

Tags:

android

shape

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 .

Sample image

i need a layout like this. Hoping for better response. Thanks in Advance.

like image 239
Dinash Avatar asked Mar 10 '12 06:03

Dinash


People also ask

Are the layouts available in Android?

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.

How can I change my Android layout?

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.

Why do we use constraint layout in Android?

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.

Which type of file are Android layouts read from?

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.


1 Answers

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.

like image 76
kabuko Avatar answered Oct 13 '22 23:10

kabuko