mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
done with map view for now
This commit is contained in:
parent
4a0331c62e
commit
4bc94da224
3 changed files with 56 additions and 11 deletions
|
|
@ -18,6 +18,7 @@ package androidx.ui.fakeandroidview
|
|||
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.ViewGroup.LayoutParams.MATCH_PARENT
|
||||
|
|
@ -62,6 +63,10 @@ private class AndroidViewHolder(context: Context) : ViewGroup(context) {
|
|||
}
|
||||
}
|
||||
|
||||
init {
|
||||
isClickable = true
|
||||
}
|
||||
|
||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||
view?.measure(widthMeasureSpec, heightMeasureSpec)
|
||||
setMeasuredDimension(view?.measuredWidth ?: 0, view?.measuredHeight ?: 0)
|
||||
|
|
@ -74,4 +79,26 @@ private class AndroidViewHolder(context: Context) : ViewGroup(context) {
|
|||
override fun getLayoutParams(): LayoutParams? {
|
||||
return view?.layoutParams ?: LayoutParams(MATCH_PARENT, MATCH_PARENT)
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement this method to handle touch screen motion events.
|
||||
*
|
||||
*
|
||||
* If this method is used to detect click actions, it is recommended that
|
||||
* the actions be performed by implementing and calling
|
||||
* [.performClick]. This will ensure consistent system behavior,
|
||||
* including:
|
||||
*
|
||||
* * obeying click sound preferences
|
||||
* * dispatching OnClickListener calls
|
||||
* * handling [ACTION_CLICK][AccessibilityNodeInfo.ACTION_CLICK] when
|
||||
* accessibility features are enabled
|
||||
*
|
||||
*
|
||||
* @param event The motion event.
|
||||
* @return True if the event was handled, false otherwise.
|
||||
*/
|
||||
override fun onTouchEvent(event: MotionEvent?): Boolean {
|
||||
return super.onTouchEvent(event)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue