Skip to main content

Posts

Showing posts with the label Text Field

Text field : Material Design Tips

From google material design documentation.
Text fields allow the user to input text, select text (cut, copy, paste), and lookup data via auto-completion. How to add? I. In your build.gradle add latest appcompat library. dependencies { compile 'com.android.support:appcompat-v7:X.X.X'// where X.X.X version} II. Make your activity extend android.support.v7.app.AppCompatActivity. publicclassMainActivityextendsAppCompatActivity{...} III. Declare your EditText inside any layout.xml file. <EditTextandroid:layout_width="match_parent"android:layout_height="wrap_content"android:hint="Hint text"/> How to style?
I. Declare custom style in your styles.xml file.