Styling edit text input fields in Android app layout

Activity Forums Android mobile app Styling edit text input fields in Android app layout

  • This topic is empty.
  • Creator
    Topic
  • #128
    adcocitclass
    Keymaster

    Android code layout to style edit text input similar to web input fields with different colors around edit text input

    create rec_text_edit.xml file in res/drawable folder




    android:padding="10dp"
    android:shape="rectangle" >

    android:bottomLeftRadius="5dp"
    android:bottomRightRadius="5dp"
    android:topLeftRadius="5dp"
    android:topRightRadius="5dp" />

    In your activity xml file add below line in edittext field,


    android:background="@drawable/rect_text_edit"

    Below code makes cursor more clearly visible


    android:textColor=”@android:color/black”
    android:textCursorDrawable=”@null”

  • You must be logged in to reply to this topic.