View image on another image

I have a listlayout with elements in it that look like this:

alt text

First there is an ImageView (light), and then two text elements. All this inside a TableLayout. (source here: http://code.google.com/p/switchctrl/source/browse/trunk/android/res/layout/device_switch.xml )

I want to have a rotating animation of the Ontop loading indicator of this light when this particular device (light) performs an action or the action is performed on it.

How to place animation in this world?

+3
source share
1 answer

Try the following:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">

    <FrameLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/Frame">

        <ImageView
            android:layout_height="wrap_content"
            android:id="@+id/Image1" />
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/Image2" />
    </FrameLayout>
    <LinearLayout
        android:layout_height="wrap_content"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:orientation="vertical"
        android:id="@+id/TextLayout">

        <TextView
            android:text="@+id/Line1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/Line1" />
        <TextView
            android:text="@+id/Line2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/Line2" />
    </LinearLayout>
</LinearLayout>
+1
source

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


All Articles