Skip to content

Commit

Permalink
update add setText
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiependa committed Jan 8, 2020
1 parent fb424bc commit 1df52ea
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import android.util.AttributeSet
import android.util.SparseArray
import android.view.LayoutInflater
import android.widget.LinearLayout
import androidx.annotation.IdRes
import androidx.annotation.IntegerRes
import androidx.annotation.StringRes
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.BindingAdapter
import androidx.databinding.InverseBindingAdapter
Expand Down Expand Up @@ -119,6 +122,14 @@ class MaterialEditText : LinearLayout {
})
}

fun setText(text: String){
edit?.setText(text)
}

fun setText(@StringRes resId: Int){
edit?.setText(resId)
}

override fun onSaveInstanceState(): Parcelable? {
val bundle = Bundle()

Expand Down

0 comments on commit 1df52ea

Please sign in to comment.