я в настоящее время с помощью XML:Android XML Layout - лучшее решение?
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4"
android:orientation="horizontal" >
</LinearLayout>
<ImageView
android:id="@+id/iv_dot_loading1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/shape_dot_loading"
android:layout_gravity="center_vertical" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="horizontal" >
</LinearLayout>
<ImageView
android:id="@+id/iv_dot_loading2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/shape_dot_loading"
android:layout_gravity="center_vertical" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="horizontal" >
</LinearLayout>
<ImageView
android:id="@+id/iv_dot_loading3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/shape_dot_loading"
android:layout_gravity="center_vertical" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4"
android:orientation="horizontal" >
</LinearLayout>
shape_dot_loading.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" >
<gradient android:startColor="#E8E8E8" android:endColor="#E8E8E8"
android:angle="270"/>
</shape>
Это делает работу, однако я чувствую, что должен быть более простой решение для решения этого?
Я вижу, как выглядит макет, но трудно ответить, как сделать это лучше, не зная, чего вы пытаетесь достичь. Основываясь на вашем наименовании, я бы предположил, что это для какого-то загрузчика? –
Вы нашли решение? – JJ86
@JaAd По-прежнему изучая его! выглядит наиболее перспективным на данный момент, будет обновляться, когда я доберусь до конца! –