[statusbar 电池处理]
This commit is contained in:
yangyakun
2024-04-17 16:34:50 +08:00
parent aa3bc00cec
commit 1f6d788600
3 changed files with 11 additions and 7 deletions

View File

@@ -19,12 +19,14 @@ import java.lang.ref.WeakReference
class BatteryGroupView : LinearLayout, IMoGoSkinModeChangeListener {
constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : super(context, attrs, defStyleAttr) {
}
constructor(context: Context?) : super(context)
constructor(context: Context?, attributeSet: AttributeSet) : super(context, attributeSet)
constructor(context: Context?, attributeSet: AttributeSet, defStyleAttr: Int) : super(context, attributeSet, defStyleAttr)
constructor(context: Context?, attributeSet: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attributeSet, defStyleAttr, defStyleRes)
private var batteryHandler: BatteryHandler = BatteryHandler(this)
private var view: View =

View File

@@ -46,7 +46,6 @@ class StatusBarView @JvmOverloads constructor(
params.height = BarUtils.getStatusBarHeight()
layoutParams = params
}
viewStatusBarRight.addView(BatteryGroupView(this.context))
//添加view控制
CallerHmiViewControlListenerManager.addListener(TAG,this)

View File

@@ -77,5 +77,8 @@
android:layout_marginEnd="@dimen/dp_44"
android:gravity="end|center"
android:orientation="horizontal">
<com.mogo.eagle.core.function.hmi.ui.widget.BatteryGroupView
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</merge>