Last active
April 26, 2018 10:00
-
-
Save mataku/ccba34142b10c83cdb888f107e7fe010 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<layout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools"> | |
<android.support.constraint.ConstraintLayout | |
android:id="@+id/main_container" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" > | |
<!-- 基準の ImageView --> | |
<ImageView | |
android:id="@+id/center_droid" | |
android:layout_width="64dp" | |
android:layout_height="64dp" | |
android:background="#8BC34A" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintTop_toTopOf="parent" | |
app:layout_constraintRight_toRightOf="parent" | |
app:layout_constraintBottom_toBottomOf="parent" | |
android:src="@drawable/amazing_image" /> | |
<!-- 基準の View から 0度の位置に 120dp 離れたところに配置している --> | |
<ImageView | |
android:id="@+id/image_1" | |
android:layout_width="48dp" | |
android:layout_height="48dp" | |
android:background="#cddc39" | |
android:visibility="gone" | |
app:layout_constraintCircle="@id/center_droid" | |
app:layout_constraintCircleAngle="0" | |
app:layout_constraintCircleRadius="120dp" | |
android:src="@drawable/amazing_image_1" /> | |
<!-- 基準の View から 45度の位置に 120dp 離れたところに配置している --> | |
<ImageView | |
android:id="@+id/image_2" | |
android:layout_width="48dp" | |
android:layout_height="48dp" | |
android:background="#FFEB3B" | |
android:visibility="gone" | |
app:layout_constraintCircle="@id/center_droid" | |
app:layout_constraintCircleAngle="45" | |
app:layout_constraintCircleRadius="120dp" | |
android:src="@drawable/amazing_image_2 /> | |
<!-- ... --> | |
</android.support.constraint.ConstraintLayout> | |
</layout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment