desc:单位使用PX
@ -0,0 +1,19 @@
|
|||||||
|
package com.yinuo.safetywatcher.watcher
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import com.yinuo.safetywatcher.databinding.ActivitySettingBinding
|
||||||
|
import com.yinuo.safetywatcher.watcher.base.BaseActivity
|
||||||
|
|
||||||
|
class SettingActivity: BaseActivity() {
|
||||||
|
|
||||||
|
private val mBinding: ActivitySettingBinding by lazy {
|
||||||
|
ActivitySettingBinding.inflate(layoutInflater)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun generateContentView(): View {
|
||||||
|
return mBinding.root
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initView() {
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +1,21 @@
|
|||||||
package com.yinuo.safetywatcher.watcher.view
|
package com.yinuo.safetywatcher.watcher.view
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.util.AttributeSet
|
||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
|
|
||||||
class CommonTopBar(context: Context) : LinearLayout(context) {
|
class CommonTopBar : LinearLayout {
|
||||||
|
constructor(context: Context?) : this(context, null)
|
||||||
|
constructor(context: Context?, attrs: AttributeSet?) : this(context, attrs, 0)
|
||||||
|
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(
|
||||||
|
context,
|
||||||
|
attrs,
|
||||||
|
defStyleAttr
|
||||||
|
)
|
||||||
|
|
||||||
|
init {
|
||||||
|
//初始化方法
|
||||||
|
setBackgroundColor(Color.RED)
|
||||||
|
}
|
||||||
}
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:ignore="MissingDefaultResource">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/item_query"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/_88dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="@dimen/_66dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/_29dp"
|
||||||
|
android:layout_height="@dimen/_29dp"
|
||||||
|
android:src="@mipmap/ic_query" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/_13dp"
|
||||||
|
android:text="@string/query"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/_30dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
After Width: | Height: | Size: 557 B |
After Width: | Height: | Size: 619 B |
After Width: | Height: | Size: 838 B |
After Width: | Height: | Size: 615 B |
After Width: | Height: | Size: 342 B |
After Width: | Height: | Size: 383 B |
After Width: | Height: | Size: 521 B |
After Width: | Height: | Size: 389 B |
After Width: | Height: | Size: 656 B |
After Width: | Height: | Size: 884 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 709 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.2 KiB |
@ -1,4 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="_87dp">87dp</dimen>
|
<dimen name="_87dp">87px</dimen>
|
||||||
|
<dimen name="_288dp">288px</dimen>
|
||||||
|
<dimen name="_536dp">536px</dimen>
|
||||||
|
<dimen name="_21dp">21px</dimen>
|
||||||
|
<dimen name="_272dp">272px</dimen>
|
||||||
|
<dimen name="_88dp">88px</dimen>
|
||||||
|
<dimen name="_29dp">29px</dimen>
|
||||||
|
<dimen name="_68dp">68px</dimen>
|
||||||
|
<dimen name="_66dp">66px</dimen>
|
||||||
|
<dimen name="_30dp">30px</dimen>
|
||||||
|
<dimen name="_13dp">13px</dimen>
|
||||||
|
<dimen name="_34dp">34px</dimen>
|
||||||
|
<dimen name="_185dp">185px</dimen>
|
||||||
</resources>
|
</resources>
|