Arranging buttons dynamically in the STAR Android model

I want to implement the following layout: enter image description here

This works great for a fixed margin between the icon (circle) and the label (rectangle), but LinearLayout is not very convenient for height maintenance because the icon overlaps over the icon label area

Is there a way to dynamically set this layout dynamically for different screens?

NOTE. The icons and shortcuts are the same as the drawabletop button, so if there is a simple idea for organizing a simple button, it will do .....

+4
source share
2 answers

Here's an example: Android 3D Carousel , as well as a layout with buttons in a circle?

Also check out the existing SO question: creating a circular view in android

Possible exact solution (hopefully):

From this article, I’m sure that you will get an accurate idea of ​​the layout design: Android SDK: Creating a Rotating Dialer p>

enter image description here

+3
source

This is what you need to do, no code, at least a short layout.

 <LinearLayout orientation=vertical for whole screen> <LinearLayout weight=1 gravity=center> <!-- Top --> </LinearLayout> <LinearLayout weight=1 orientation=horizontal> <!-- Middle --> <LinearLayout weight=1 gravity=left/> <LinearLayout weight=1 gravity=right/> </LinearLayout> <LinearLayout weight=1> <!-- Botton --> <LinearLayout weight=1 gravity=center/> <LinearLayout weight=1 gravity=center/> </LinearLayout> </LinearLayout> 

Hope this helps, let me know if you need more clarification.

0
source

Source: https://habr.com/ru/post/1387679/


All Articles