How to create customized text input layout like at

2020-06-06 07:38发布

问题:

I tried many custom drawing and I don't have idea about this design.Anyone help me out to do this design on drawable or any other way.

<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<stroke
    android:color="@color/black"
    android:width="2dp"/>
<solid android:color="#FFFFFF"/>
<corners
    android:bottomRightRadius="5dp"
    android:bottomLeftRadius="5dp"
    android:topLeftRadius="0dp"
    android:topRightRadius="0dp"/>

回答1:

You can setVisibility(View.VISIBLE) when you checks the credentials on the exception of your try catch, assuming that you're doing the check that way. And if isn't an error you just let the objecet as (View.GONE) or (View.INVISIBLE)