Created
March 18, 2025 06:49
-
-
Save mnirfan/805e2fcc5b30b2adebd94564d9b7dadc to your computer and use it in GitHub Desktop.
create plain view for proof of concept
This file contains hidden or 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
| package com.nurulirfan.lynx.accessibilityelements | |
| import android.content.Context | |
| import com.lynx.tasm.behavior.LynxContext | |
| import com.lynx.tasm.behavior.ui.view.AndroidView | |
| import com.lynx.tasm.behavior.ui.view.UISimpleView | |
| class PlainView(context: LynxContext) : UISimpleView<AndroidView>(context) { | |
| override fun createView(context: Context?): AndroidView { | |
| return AndroidView(context).apply { | |
| } | |
| } | |
| override fun onLayoutUpdated() { | |
| super.onLayoutUpdated() | |
| val paddingTop = mPaddingTop + mBorderTopWidth | |
| val paddingBottom = mPaddingBottom + mBorderBottomWidth | |
| val paddingLeft = mPaddingLeft + mBorderLeftWidth | |
| val paddingRight = mPaddingRight + mBorderRightWidth | |
| mView.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment