update
parent
fe16668440
commit
2f9c768c0f
@ -1,26 +0,0 @@
|
|||||||
package com.rookiedev.hexapod.view
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.util.AttributeSet
|
|
||||||
import android.view.ViewGroup
|
|
||||||
|
|
||||||
class ControlView : ViewGroup {
|
|
||||||
private val mContext: Context? = null
|
|
||||||
|
|
||||||
constructor(context: Context) : super(context) {
|
|
||||||
// ...
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
|
|
||||||
// ...
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) {
|
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
|
||||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -0,0 +1,41 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="160dp"
|
||||||
|
android:height="160dp"
|
||||||
|
android:viewportWidth="160"
|
||||||
|
android:viewportHeight="160">
|
||||||
|
<path
|
||||||
|
android:pathData="M79.985,80.036m-56.569,56.569a80,80 0,1 1,113.137 -113.137a80,80 0,1 1,-113.137 113.137"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="7.9375"
|
||||||
|
android:fillColor="#000000"
|
||||||
|
android:fillAlpha="0.539162"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M79.985,80.036m-36.534,36.534a51.667,51.667 90,1 1,73.068 -73.068a51.667,51.667 90,1 1,-73.068 73.068"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="7.9375"
|
||||||
|
android:fillColor="#000000"
|
||||||
|
android:fillAlpha="0.539162"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M79.985,80.036m-18.458,18.458a26.104,26.104 90,1 1,36.917 -36.917a26.104,26.104 90,1 1,-36.917 36.917"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="7.9375"
|
||||||
|
android:fillColor="#000000"
|
||||||
|
android:fillAlpha="0.539162"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M136.163,22.974L22.974,136.163"
|
||||||
|
android:strokeLineJoin="miter"
|
||||||
|
android:strokeWidth="0.264583"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#000000"
|
||||||
|
android:strokeLineCap="butt"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M23.91,22.974L137.098,136.163"
|
||||||
|
android:strokeLineJoin="miter"
|
||||||
|
android:strokeWidth="0.264583"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#000000"
|
||||||
|
android:strokeLineCap="butt"/>
|
||||||
|
</vector>
|
@ -1,18 +1,94 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ControlActivity">
|
tools:context=".ControlActivity">
|
||||||
|
|
||||||
<view
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/view"
|
android:layout_width="0dp"
|
||||||
class="com.rookiedev.hexapod.view.ControlView"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Button"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/button3"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/button2"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Button"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/button4"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/button"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Button"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/button5"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/button4"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/button" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Button"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/button6"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/button3"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/button2" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button5"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Button"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/button6"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/button3" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button6"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Button"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/button5"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/button4" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:layout_marginBottom="32dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
app:srcCompat="@drawable/ic_circle_button" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</LinearLayout>
|
Loading…
Reference in New Issue