Skip to content

Instantly share code, notes, and snippets.

@pfn
Last active July 12, 2016 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfn/ac3afcd1b1675e79423375f41692c105 to your computer and use it in GitHub Desktop.
Save pfn/ac3afcd1b1675e79423375f41692c105 to your computer and use it in GitHub Desktop.
generated viewholders for android layouts
package com.hanhuy.android.keepshare
import android.app.Activity
import android.view.{LayoutInflater, View, ViewGroup}
trait TypedViewHolder[T <: View] {
val rootViewId: Int
val rootView: T
}
trait TypedViewHolderFactory[T <: TypedLayout[_]] {
type V <: View
type VH <: TypedViewHolder[V]
def create(view: V): VH
}
object TypedViewHolderFactory {
implicit val entry_edit_ViewHolderFactory: TypedViewHolderFactory[TR.layout.entry_edit.type] { type VH = TypedViewHolder.entry_edit } = new TypedViewHolderFactory[TR.layout.entry_edit.type] {
type V = android.widget.RelativeLayout
type VH = TypedViewHolder.entry_edit
def create(v: V): TypedViewHolder.entry_edit = new TypedViewHolder.entry_edit(v)
}
implicit val searchable_activity_ViewHolderFactory: TypedViewHolderFactory[TR.layout.searchable_activity.type] { type VH = TypedViewHolder.searchable_activity } = new TypedViewHolderFactory[TR.layout.searchable_activity.type] {
type V = android.widget.LinearLayout
type VH = TypedViewHolder.searchable_activity
def create(v: V): TypedViewHolder.searchable_activity = new TypedViewHolder.searchable_activity(v)
}
implicit val setup_ViewHolderFactory: TypedViewHolderFactory[TR.layout.setup.type] { type VH = TypedViewHolder.setup } = new TypedViewHolderFactory[TR.layout.setup.type] {
type V = android.widget.ViewFlipper
type VH = TypedViewHolder.setup
def create(v: V): TypedViewHolder.setup = new TypedViewHolder.setup(v)
}
implicit val group_edit_ViewHolderFactory: TypedViewHolderFactory[TR.layout.group_edit.type] { type VH = TypedViewHolder.group_edit } = new TypedViewHolderFactory[TR.layout.group_edit.type] {
type V = android.widget.RelativeLayout
type VH = TypedViewHolder.group_edit
def create(v: V): TypedViewHolder.group_edit = new TypedViewHolder.group_edit(v)
}
implicit val edit_field_options_ViewHolderFactory: TypedViewHolderFactory[TR.layout.edit_field_options.type] { type VH = TypedViewHolder.edit_field_options } = new TypedViewHolderFactory[TR.layout.edit_field_options.type] {
type V = android.widget.LinearLayout
type VH = TypedViewHolder.edit_field_options
def create(v: V): TypedViewHolder.edit_field_options = new TypedViewHolder.edit_field_options(v)
}
implicit val custom_field_ViewHolderFactory: TypedViewHolderFactory[TR.layout.custom_field.type] { type VH = TypedViewHolder.custom_field } = new TypedViewHolderFactory[TR.layout.custom_field.type] {
type V = android.view.View
type VH = TypedViewHolder.custom_field
def create(v: V): TypedViewHolder.custom_field = new TypedViewHolder.custom_field(v)
}
implicit val password_ime_ViewHolderFactory: TypedViewHolderFactory[TR.layout.password_ime.type] { type VH = TypedViewHolder.password_ime } = new TypedViewHolderFactory[TR.layout.password_ime.type] {
type V = android.inputmethodservice.KeyboardView
type VH = TypedViewHolder.password_ime
def create(v: V): TypedViewHolder.password_ime = new TypedViewHolder.password_ime(v)
}
implicit val toggle_button_ViewHolderFactory: TypedViewHolderFactory[TR.layout.toggle_button.type] { type VH = TypedViewHolder.toggle_button } = new TypedViewHolderFactory[TR.layout.toggle_button.type] {
type V = android.widget.Switch
type VH = TypedViewHolder.toggle_button
def create(v: V): TypedViewHolder.toggle_button = new TypedViewHolder.toggle_button(v)
}
implicit val browse_pwgroup_item_ViewHolderFactory: TypedViewHolderFactory[TR.layout.browse_pwgroup_item.type] { type VH = TypedViewHolder.browse_pwgroup_item } = new TypedViewHolderFactory[TR.layout.browse_pwgroup_item.type] {
type V = android.widget.FrameLayout
type VH = TypedViewHolder.browse_pwgroup_item
def create(v: V): TypedViewHolder.browse_pwgroup_item = new TypedViewHolder.browse_pwgroup_item(v)
}
implicit val edit_field_ViewHolderFactory: TypedViewHolderFactory[TR.layout.edit_field.type] { type VH = TypedViewHolder.edit_field } = new TypedViewHolderFactory[TR.layout.edit_field.type] {
type V = android.view.View
type VH = TypedViewHolder.edit_field
def create(v: V): TypedViewHolder.edit_field = new TypedViewHolder.edit_field(v)
}
implicit val ime_search_activity_ViewHolderFactory: TypedViewHolderFactory[TR.layout.ime_search_activity.type] { type VH = TypedViewHolder.ime_search_activity } = new TypedViewHolderFactory[TR.layout.ime_search_activity.type] {
type V = android.widget.RelativeLayout
type VH = TypedViewHolder.ime_search_activity
def create(v: V): TypedViewHolder.ime_search_activity = new TypedViewHolder.ime_search_activity(v)
}
implicit val share_ViewHolderFactory: TypedViewHolderFactory[TR.layout.share.type] { type VH = TypedViewHolder.share } = new TypedViewHolderFactory[TR.layout.share.type] {
type V = android.widget.RelativeLayout
type VH = TypedViewHolder.share
def create(v: V): TypedViewHolder.share = new TypedViewHolder.share(v)
}
implicit val barcode_scanner_ViewHolderFactory: TypedViewHolderFactory[TR.layout.barcode_scanner.type] { type VH = TypedViewHolder.barcode_scanner } = new TypedViewHolderFactory[TR.layout.barcode_scanner.type] {
type V = android.widget.FrameLayout
type VH = TypedViewHolder.barcode_scanner
def create(v: V): TypedViewHolder.barcode_scanner = new TypedViewHolder.barcode_scanner(v)
}
implicit val entry_view_ViewHolderFactory: TypedViewHolderFactory[TR.layout.entry_view.type] { type VH = TypedViewHolder.entry_view } = new TypedViewHolderFactory[TR.layout.entry_view.type] {
type V = android.support.design.widget.CoordinatorLayout
type VH = TypedViewHolder.entry_view
def create(v: V): TypedViewHolder.entry_view = new TypedViewHolder.entry_view(v)
}
implicit val pwitem_ViewHolderFactory: TypedViewHolderFactory[TR.layout.pwitem.type] { type VH = TypedViewHolder.pwitem } = new TypedViewHolderFactory[TR.layout.pwitem.type] {
type V = android.widget.RelativeLayout
type VH = TypedViewHolder.pwitem
def create(v: V): TypedViewHolder.pwitem = new TypedViewHolder.pwitem(v)
}
implicit val group_field_ViewHolderFactory: TypedViewHolderFactory[TR.layout.group_field.type] { type VH = TypedViewHolder.group_field } = new TypedViewHolderFactory[TR.layout.group_field.type] {
type V = android.view.View
type VH = TypedViewHolder.group_field
def create(v: V): TypedViewHolder.group_field = new TypedViewHolder.group_field(v)
}
implicit val browse_ViewHolderFactory: TypedViewHolderFactory[TR.layout.browse.type] { type VH = TypedViewHolder.browse } = new TypedViewHolderFactory[TR.layout.browse.type] {
type V = android.support.design.widget.CoordinatorLayout
type VH = TypedViewHolder.browse
def create(v: V): TypedViewHolder.browse = new TypedViewHolder.browse(v)
}
implicit val standard_field_ViewHolderFactory: TypedViewHolderFactory[TR.layout.standard_field.type] { type VH = TypedViewHolder.standard_field } = new TypedViewHolderFactory[TR.layout.standard_field.type] {
type V = android.view.View
type VH = TypedViewHolder.standard_field
def create(v: V): TypedViewHolder.standard_field = new TypedViewHolder.standard_field(v)
}
implicit val notification_ViewHolderFactory: TypedViewHolderFactory[TR.layout.notification.type] { type VH = TypedViewHolder.notification } = new TypedViewHolderFactory[TR.layout.notification.type] {
type V = android.widget.FrameLayout
type VH = TypedViewHolder.notification
def create(v: V): TypedViewHolder.notification = new TypedViewHolder.notification(v)
}
implicit val entry_edit_action_bar_ViewHolderFactory: TypedViewHolderFactory[TR.layout.entry_edit_action_bar.type] { type VH = TypedViewHolder.entry_edit_action_bar } = new TypedViewHolderFactory[TR.layout.entry_edit_action_bar.type] {
type V = android.widget.LinearLayout
type VH = TypedViewHolder.entry_edit_action_bar
def create(v: V): TypedViewHolder.entry_edit_action_bar = new TypedViewHolder.entry_edit_action_bar(v)
}
implicit val pin_setup_ViewHolderFactory: TypedViewHolderFactory[TR.layout.pin_setup.type] { type VH = TypedViewHolder.pin_setup } = new TypedViewHolderFactory[TR.layout.pin_setup.type] {
type V = android.widget.LinearLayout
type VH = TypedViewHolder.pin_setup
def create(v: V): TypedViewHolder.pin_setup = new TypedViewHolder.pin_setup(v)
}
implicit val accessibility_search_activity_ViewHolderFactory: TypedViewHolderFactory[TR.layout.accessibility_search_activity.type] { type VH = TypedViewHolder.accessibility_search_activity } = new TypedViewHolderFactory[TR.layout.accessibility_search_activity.type] {
type V = android.widget.RelativeLayout
type VH = TypedViewHolder.accessibility_search_activity
def create(v: V): TypedViewHolder.accessibility_search_activity = new TypedViewHolder.accessibility_search_activity(v)
}
implicit val entry_icon_picker_item_ViewHolderFactory: TypedViewHolderFactory[TR.layout.entry_icon_picker_item.type] { type VH = TypedViewHolder.entry_icon_picker_item } = new TypedViewHolderFactory[TR.layout.entry_icon_picker_item.type] {
type V = android.widget.ImageButton
type VH = TypedViewHolder.entry_icon_picker_item
def create(v: V): TypedViewHolder.entry_icon_picker_item = new TypedViewHolder.entry_icon_picker_item(v)
}
}
object TypedViewHolder {
def setContentView(activity: Activity, layout: TypedLayout[_])
(implicit ev: TypedViewHolderFactory[layout.type]): ev.VH = {
val contentView = activity.getWindow.getDecorView.findViewById(
android.R.id.content).asInstanceOf[ViewGroup]
val holder = inflate(activity.getLayoutInflater, layout, contentView, false)
activity.setContentView(holder.rootView, holder.rootView.getLayoutParams)
holder.asInstanceOf[ev.VH] // harmless cast, appease intellij
}
def inflate(inflater: LayoutInflater, layout: TypedLayout[_], parent: ViewGroup, attach: Boolean)
(implicit ev: TypedViewHolderFactory[layout.type]): ev.VH = {
ev.create(inflater.inflate(layout.id, parent, attach).asInstanceOf[ev.V])
}
def from(view: View, layout: TypedLayout[_])
(implicit ev: TypedViewHolderFactory[layout.type]): ev.VH = {
val vh = view.getTag(layout.id)
if (vh == null) throw new IllegalStateException("ViewHolder not set for " + layout)
vh.asInstanceOf[ev.VH]
}
final case class entry_edit(rootView: android.widget.RelativeLayout) extends TypedViewHolder[android.widget.RelativeLayout] {
val rootViewId = -1
rootView.setTag(R.layout.entry_edit, this)
lazy val scroll = rootView.findViewById(R.id.scroll).asInstanceOf[android.widget.ScrollView]
lazy val field_list = rootView.findViewById(R.id.field_list).asInstanceOf[android.widget.LinearLayout]
lazy val edit_group = rootView.findViewById(R.id.edit_group).asInstanceOf[com.hanhuy.android.keepshare.GroupEditView]
lazy val edit_title = rootView.findViewById(R.id.edit_title).asInstanceOf[com.hanhuy.android.keepshare.StandardEditView]
lazy val edit_username = rootView.findViewById(R.id.edit_username).asInstanceOf[com.hanhuy.android.keepshare.StandardEditView]
lazy val edit_password = rootView.findViewById(R.id.edit_password).asInstanceOf[com.hanhuy.android.keepshare.StandardEditView]
lazy val edit_url = rootView.findViewById(R.id.edit_url).asInstanceOf[com.hanhuy.android.keepshare.StandardEditView]
lazy val edit_notes = rootView.findViewById(R.id.edit_notes).asInstanceOf[com.hanhuy.android.keepshare.StandardEditView]
lazy val new_field_button = rootView.findViewById(R.id.new_field_button).asInstanceOf[android.widget.ImageButton]
lazy val delete = rootView.findViewById(R.id.delete).asInstanceOf[android.widget.Button]
}
final case class searchable_activity(rootView: android.widget.LinearLayout) extends TypedViewHolder[android.widget.LinearLayout] {
val rootViewId = -1
rootView.setTag(R.layout.searchable_activity, this)
lazy val list = rootView.findViewById(android.R.id.list).asInstanceOf[android.widget.ListView]
lazy val empty = rootView.findViewById(android.R.id.empty).asInstanceOf[android.widget.TextView]
}
final case class setup(rootView: android.widget.ViewFlipper) extends TypedViewHolder[android.widget.ViewFlipper] {
val rootViewId = R.id.flipper
rootView.setTag(R.layout.setup, this)
val flipper = rootView
lazy val progress2 = rootView.findViewById(R.id.progress2).asInstanceOf[android.widget.ProgressBar]
lazy val progress = rootView.findViewById(R.id.progress).asInstanceOf[android.widget.ProgressBar]
lazy val connect = rootView.findViewById(R.id.connect).asInstanceOf[android.widget.Button]
}
final case class group_edit(rootView: android.widget.RelativeLayout) extends TypedViewHolder[android.widget.RelativeLayout] {
val rootViewId = -1
rootView.setTag(R.layout.group_edit, this)
lazy val field_list = rootView.findViewById(R.id.field_list).asInstanceOf[android.widget.LinearLayout]
lazy val edit_group = rootView.findViewById(R.id.edit_group).asInstanceOf[com.hanhuy.android.keepshare.GroupEditView]
lazy val edit_title = rootView.findViewById(R.id.edit_title).asInstanceOf[com.hanhuy.android.keepshare.StandardEditView]
lazy val edit_notes = rootView.findViewById(R.id.edit_notes).asInstanceOf[com.hanhuy.android.keepshare.StandardEditView]
lazy val delete = rootView.findViewById(R.id.delete).asInstanceOf[android.widget.Button]
}
final case class edit_field_options(rootView: android.widget.LinearLayout) extends TypedViewHolder[android.widget.LinearLayout] {
val rootViewId = -1
rootView.setTag(R.layout.edit_field_options, this)
lazy val field_name = rootView.findViewById(R.id.field_name).asInstanceOf[android.widget.EditText]
lazy val is_password = rootView.findViewById(R.id.is_password).asInstanceOf[android.widget.CheckBox]
}
final case class custom_field(rootView: android.view.View) extends TypedViewHolder[android.view.View] {
val rootViewId = -1
rootView.setTag(R.layout.custom_field, this)
lazy val field_divider = rootView.findViewById(R.id.field_divider)
lazy val field_icon = rootView.findViewById(R.id.field_icon).asInstanceOf[android.widget.ImageView]
lazy val input_layout = rootView.findViewById(R.id.input_layout).asInstanceOf[android.support.design.widget.TextInputLayout]
lazy val custom_field = rootView.findViewById(R.id.custom_field).asInstanceOf[android.widget.EditText]
lazy val field_visibility = rootView.findViewById(R.id.field_visibility).asInstanceOf[android.widget.CheckBox]
}
final case class password_ime(rootView: android.inputmethodservice.KeyboardView) extends TypedViewHolder[android.inputmethodservice.KeyboardView] {
val rootViewId = -1
rootView.setTag(R.layout.password_ime, this)
}
final case class toggle_button(rootView: android.widget.Switch) extends TypedViewHolder[android.widget.Switch] {
val rootViewId = -1
rootView.setTag(R.layout.toggle_button, this)
}
final case class browse_pwgroup_item(rootView: android.widget.FrameLayout) extends TypedViewHolder[android.widget.FrameLayout] {
val rootViewId = -1
rootView.setTag(R.layout.browse_pwgroup_item, this)
lazy val folder_image = rootView.findViewById(R.id.folder_image).asInstanceOf[android.widget.ImageView]
lazy val entry_image = rootView.findViewById(R.id.entry_image).asInstanceOf[android.widget.ImageView]
lazy val name = rootView.findViewById(R.id.name).asInstanceOf[android.widget.TextView]
}
final case class edit_field(rootView: android.view.View) extends TypedViewHolder[android.view.View] {
val rootViewId = -1
rootView.setTag(R.layout.edit_field, this)
lazy val field_divider = rootView.findViewById(R.id.field_divider)
lazy val field_icon = rootView.findViewById(R.id.field_icon).asInstanceOf[android.widget.ImageView]
lazy val input_layout = rootView.findViewById(R.id.input_layout).asInstanceOf[android.support.design.widget.TextInputLayout]
lazy val custom_field = rootView.findViewById(R.id.custom_field).asInstanceOf[android.widget.EditText]
lazy val field_visibility = rootView.findViewById(R.id.field_visibility).asInstanceOf[android.widget.CheckBox]
}
final case class ime_search_activity(rootView: android.widget.RelativeLayout) extends TypedViewHolder[android.widget.RelativeLayout] {
val rootViewId = -1
rootView.setTag(R.layout.ime_search_activity, this)
lazy val text = rootView.findViewById(R.id.text).asInstanceOf[android.widget.TextView]
lazy val centerline = rootView.findViewById(R.id.centerline)
lazy val cancel = rootView.findViewById(R.id.cancel).asInstanceOf[android.widget.Button]
lazy val confirm = rootView.findViewById(R.id.confirm).asInstanceOf[android.widget.Button]
}
final case class share(rootView: android.widget.RelativeLayout) extends TypedViewHolder[android.widget.RelativeLayout] {
val rootViewId = -1
rootView.setTag(R.layout.share, this)
lazy val share_screenshot = rootView.findViewById(R.id.share_screenshot).asInstanceOf[android.widget.ImageView]
lazy val subject = rootView.findViewById(R.id.subject).asInstanceOf[android.widget.TextView]
lazy val flipper = rootView.findViewById(R.id.flipper).asInstanceOf[android.widget.ViewFlipper]
lazy val progress = rootView.findViewById(R.id.progress).asInstanceOf[android.widget.ProgressBar]
lazy val loading = rootView.findViewById(R.id.loading).asInstanceOf[android.widget.TextView]
lazy val select_prompt = rootView.findViewById(R.id.select_prompt).asInstanceOf[android.widget.TextView]
lazy val list = rootView.findViewById(R.id.list).asInstanceOf[android.widget.ListView]
lazy val cancel = rootView.findViewById(R.id.cancel).asInstanceOf[android.widget.Button]
lazy val continu = rootView.findViewById(R.id.continu).asInstanceOf[android.widget.Button]
lazy val empty = rootView.findViewById(R.id.empty).asInstanceOf[android.widget.TextView]
}
final case class barcode_scanner(rootView: android.widget.FrameLayout) extends TypedViewHolder[android.widget.FrameLayout] {
val rootViewId = R.id.topLayout
rootView.setTag(R.layout.barcode_scanner, this)
val topLayout = rootView
lazy val preview = rootView.findViewById(R.id.preview).asInstanceOf[com.hanhuy.android.keepshare.camera.CameraSourcePreview]
lazy val graphicOverlay = rootView.findViewById(R.id.graphicOverlay)
lazy val text = rootView.findViewById(R.id.text).asInstanceOf[android.widget.TextView]
}
final case class entry_view(rootView: android.support.design.widget.CoordinatorLayout) extends TypedViewHolder[android.support.design.widget.CoordinatorLayout] {
val rootViewId = R.id.content
rootView.setTag(R.layout.entry_view, this)
val content = rootView
lazy val scroll_view = rootView.findViewById(R.id.scroll_view).asInstanceOf[android.support.v4.widget.NestedScrollView]
lazy val field_list = rootView.findViewById(R.id.field_list).asInstanceOf[android.widget.LinearLayout]
lazy val fab = rootView.findViewById(R.id.fab).asInstanceOf[android.support.design.widget.FloatingActionButton]
}
final case class pwitem(rootView: android.widget.RelativeLayout) extends TypedViewHolder[android.widget.RelativeLayout] {
val rootViewId = -1
rootView.setTag(R.layout.pwitem, this)
lazy val entry_image = rootView.findViewById(R.id.entry_image).asInstanceOf[android.widget.ImageView]
lazy val name = rootView.findViewById(R.id.name).asInstanceOf[android.widget.TextView]
lazy val username = rootView.findViewById(R.id.username).asInstanceOf[android.widget.TextView]
}
final case class group_field(rootView: android.view.View) extends TypedViewHolder[android.view.View] {
val rootViewId = -1
rootView.setTag(R.layout.group_field, this)
lazy val field_divider = rootView.findViewById(R.id.field_divider)
lazy val field_icon = rootView.findViewById(R.id.field_icon).asInstanceOf[android.widget.ImageView]
lazy val field_image = rootView.findViewById(R.id.field_image).asInstanceOf[android.widget.ImageView]
lazy val field = rootView.findViewById(R.id.field).asInstanceOf[android.widget.TextView]
lazy val field_visibility = rootView.findViewById(R.id.field_visibility).asInstanceOf[android.widget.CheckBox]
}
final case class browse(rootView: android.support.design.widget.CoordinatorLayout) extends TypedViewHolder[android.support.design.widget.CoordinatorLayout] {
val rootViewId = R.id.content
rootView.setTag(R.layout.browse, this)
val content = rootView
lazy val refresher = rootView.findViewById(R.id.refresher).asInstanceOf[android.support.v4.widget.SwipeRefreshLayout]
lazy val recycler = rootView.findViewById(R.id.recycler).asInstanceOf[com.hanhuy.android.keepshare.LayoutAnimationRecyclerView]
lazy val fab2 = rootView.findViewById(R.id.fab2).asInstanceOf[com.hanhuy.android.keepshare.ObservableFab]
lazy val fab_toolbar = rootView.findViewById(R.id.fab_toolbar).asInstanceOf[com.hanhuy.android.keepshare.FabToolbar]
lazy val container = rootView.findViewById(R.id.container).asInstanceOf[android.widget.LinearLayout]
lazy val create_group = rootView.findViewById(R.id.create_group).asInstanceOf[android.widget.ImageButton]
lazy val create_entry = rootView.findViewById(R.id.create_entry).asInstanceOf[android.widget.ImageButton]
lazy val group_edit = rootView.findViewById(R.id.group_edit).asInstanceOf[android.widget.ImageButton]
lazy val fab_close = rootView.findViewById(R.id.fab_close).asInstanceOf[android.widget.ImageButton]
}
final case class standard_field(rootView: android.view.View) extends TypedViewHolder[android.view.View] {
val rootViewId = -1
rootView.setTag(R.layout.standard_field, this)
lazy val field_divider = rootView.findViewById(R.id.field_divider)
lazy val field_icon = rootView.findViewById(R.id.field_icon).asInstanceOf[android.widget.ImageView]
lazy val field = rootView.findViewById(R.id.field).asInstanceOf[android.widget.TextView]
lazy val field_visibility = rootView.findViewById(R.id.field_visibility).asInstanceOf[android.widget.CheckBox]
}
final case class notification(rootView: android.widget.FrameLayout) extends TypedViewHolder[android.widget.FrameLayout] {
val rootViewId = R.id.status_bar_latest_event_content
rootView.setTag(R.layout.notification, this)
val status_bar_latest_event_content = rootView
lazy val icon_group = rootView.findViewById(R.id.icon_group).asInstanceOf[android.widget.FrameLayout]
lazy val icon = rootView.findViewById(R.id.icon).asInstanceOf[android.widget.ImageView]
lazy val right_icon = rootView.findViewById(R.id.right_icon).asInstanceOf[android.widget.ImageView]
lazy val notification_main_column = rootView.findViewById(R.id.notification_main_column).asInstanceOf[android.widget.LinearLayout]
lazy val line1 = rootView.findViewById(R.id.line1).asInstanceOf[android.widget.LinearLayout]
lazy val title = rootView.findViewById(R.id.title).asInstanceOf[android.widget.TextView]
lazy val line3 = rootView.findViewById(R.id.line3).asInstanceOf[android.widget.LinearLayout]
lazy val text = rootView.findViewById(R.id.text).asInstanceOf[android.widget.TextView]
lazy val action1 = rootView.findViewById(R.id.action1).asInstanceOf[android.widget.ImageView]
lazy val action2 = rootView.findViewById(R.id.action2).asInstanceOf[android.widget.ImageView]
}
final case class entry_edit_action_bar(rootView: android.widget.LinearLayout) extends TypedViewHolder[android.widget.LinearLayout] {
val rootViewId = -1
rootView.setTag(R.layout.entry_edit_action_bar, this)
lazy val cancel = rootView.findViewById(R.id.cancel).asInstanceOf[android.widget.ImageButton]
lazy val title = rootView.findViewById(R.id.title).asInstanceOf[android.widget.TextView]
lazy val save = rootView.findViewById(R.id.save).asInstanceOf[android.widget.Button]
}
final case class pin_setup(rootView: android.widget.LinearLayout) extends TypedViewHolder[android.widget.LinearLayout] {
val rootViewId = -1
rootView.setTag(R.layout.pin_setup, this)
lazy val fingerprint_icon = rootView.findViewById(R.id.fingerprint_icon).asInstanceOf[android.widget.ImageView]
lazy val pin_prompt = rootView.findViewById(R.id.pin_prompt).asInstanceOf[android.widget.TextView]
lazy val pin = rootView.findViewById(R.id.pin).asInstanceOf[android.widget.TextView]
lazy val pin_error = rootView.findViewById(R.id.pin_error).asInstanceOf[android.widget.TextView]
lazy val pin_1 = rootView.findViewById(R.id.pin_1).asInstanceOf[android.widget.Button]
lazy val pin_2 = rootView.findViewById(R.id.pin_2).asInstanceOf[android.widget.Button]
lazy val pin_3 = rootView.findViewById(R.id.pin_3).asInstanceOf[android.widget.Button]
lazy val pin_4 = rootView.findViewById(R.id.pin_4).asInstanceOf[android.widget.Button]
lazy val pin_5 = rootView.findViewById(R.id.pin_5).asInstanceOf[android.widget.Button]
lazy val pin_6 = rootView.findViewById(R.id.pin_6).asInstanceOf[android.widget.Button]
lazy val pin_7 = rootView.findViewById(R.id.pin_7).asInstanceOf[android.widget.Button]
lazy val pin_8 = rootView.findViewById(R.id.pin_8).asInstanceOf[android.widget.Button]
lazy val pin_9 = rootView.findViewById(R.id.pin_9).asInstanceOf[android.widget.Button]
lazy val pin_back = rootView.findViewById(R.id.pin_back).asInstanceOf[android.widget.ImageButton]
lazy val pin_0 = rootView.findViewById(R.id.pin_0).asInstanceOf[android.widget.Button]
lazy val pin_ok = rootView.findViewById(R.id.pin_ok).asInstanceOf[android.widget.Button]
object Land {
lazy val fingerprint_icon = rootView.findViewById(R.id.fingerprint_icon).asInstanceOf[android.widget.ImageView]
lazy val pin_prompt = rootView.findViewById(R.id.pin_prompt).asInstanceOf[android.widget.TextView]
lazy val pin = rootView.findViewById(R.id.pin).asInstanceOf[android.widget.TextView]
lazy val pin_error = rootView.findViewById(R.id.pin_error).asInstanceOf[android.widget.TextView]
lazy val pin_1 = rootView.findViewById(R.id.pin_1).asInstanceOf[android.widget.Button]
lazy val pin_2 = rootView.findViewById(R.id.pin_2).asInstanceOf[android.widget.Button]
lazy val pin_3 = rootView.findViewById(R.id.pin_3).asInstanceOf[android.widget.Button]
lazy val pin_4 = rootView.findViewById(R.id.pin_4).asInstanceOf[android.widget.Button]
lazy val pin_5 = rootView.findViewById(R.id.pin_5).asInstanceOf[android.widget.Button]
lazy val pin_6 = rootView.findViewById(R.id.pin_6).asInstanceOf[android.widget.Button]
lazy val pin_7 = rootView.findViewById(R.id.pin_7).asInstanceOf[android.widget.Button]
lazy val pin_8 = rootView.findViewById(R.id.pin_8).asInstanceOf[android.widget.Button]
lazy val pin_9 = rootView.findViewById(R.id.pin_9).asInstanceOf[android.widget.Button]
lazy val pin_back = rootView.findViewById(R.id.pin_back).asInstanceOf[android.widget.ImageButton]
lazy val pin_0 = rootView.findViewById(R.id.pin_0).asInstanceOf[android.widget.Button]
lazy val pin_ok = rootView.findViewById(R.id.pin_ok).asInstanceOf[android.widget.Button]
}
}
final case class accessibility_search_activity(rootView: android.widget.RelativeLayout) extends TypedViewHolder[android.widget.RelativeLayout] {
val rootViewId = -1
rootView.setTag(R.layout.accessibility_search_activity, this)
lazy val subject = rootView.findViewById(R.id.subject).asInstanceOf[android.widget.TextView]
lazy val search = rootView.findViewById(R.id.search).asInstanceOf[android.widget.SearchView]
lazy val flipper = rootView.findViewById(R.id.flipper).asInstanceOf[android.widget.ViewFlipper]
lazy val progress = rootView.findViewById(R.id.progress).asInstanceOf[android.widget.ProgressBar]
lazy val loading = rootView.findViewById(R.id.loading).asInstanceOf[android.widget.TextView]
lazy val select_prompt = rootView.findViewById(R.id.select_prompt).asInstanceOf[android.widget.TextView]
lazy val list = rootView.findViewById(R.id.list).asInstanceOf[android.widget.ListView]
lazy val cancel = rootView.findViewById(R.id.cancel).asInstanceOf[android.widget.Button]
lazy val continu = rootView.findViewById(R.id.continu).asInstanceOf[android.widget.Button]
lazy val empty = rootView.findViewById(R.id.empty).asInstanceOf[android.widget.TextView]
}
final case class entry_icon_picker_item(rootView: android.widget.ImageButton) extends TypedViewHolder[android.widget.ImageButton] {
val rootViewId = R.id.cancel
rootView.setTag(R.layout.entry_icon_picker_item, this)
val cancel = rootView
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment