Answer the question
In order to leave comments, you need to log in
How to use a class that, for example, is an EditText inheritor?
Good
Chet stumbled, where he thought exactly, but how can I use the class that is the inheritor of editText (... MyEditText extends EditText and added a couple of my methods)? Here in the fragment private EditText text = (EditText) findViewById... and I need my MyEditText to be used.
Answer the question
In order to leave comments, you need to log in
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res/com.example.customviews">
<com.example.customviews.MyEditText
android:id="@+id/my_input"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:inputType="My text"
/>
</LinearLayout>
MyEditText text = (MyEditText) findViewById(R.id.my_input)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question