Wie kann ich mit (Hinweis-) Beschriftung in TextInputLayout nach links ziehen?

Ich benutze TextInputLayout und setze ein drawableLeft und wenn ich auf edittext klicke, schwebt das Etikett bereits nach oben, aber ich möchte das linke Zeichen auch mit dem Etikett schweben lassen. Wie kann ich erreichen, siehe das beigefügte Bild ...

Right jetzt, wenn ich auf "Titel" klicke, schwimmt nur leble auf, aber ich möchte, dass beide "leftdrawable" und "label" schweben, wenn sie fokussiert sind. Und bevor Sie darauf klicken, wird eine normale Zeile wie "Servicedatum" angezeigt.

Mein Code ist unten ..

<FrameLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_below="@+id/input_layout_cardnum"
    >
    <ImageView
        android:id="@+id/imgLeft"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:layout_gravity="bottom"
        android:src="@mipmap/ic_launcher"
        android:layout_marginBottom="10dp"
        />
    <android.support.design.widget.TextInputLayout
        android:id="@+id/input_layout_cardnums"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        >
        <EditText
            android:id="@+id/cardnumEditTexst"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:maxLength="255"
            android:singleLine="true"
            android:hint="hello"
            android:drawableLeft="@null"
            android:paddingLeft="35dp"
            />
    </android.support.design.widget.TextInputLayout>
</FrameLayout>

Und in meinem Code stelle ich eine Animation auf onFocus ein, damit sie mit label @ oben drauf steh

  final Animation animation = AnimationUtils.loadAnimation(this,R.anim.anims);
  final ImageView imgLeft = (ImageView) findViewById(R.id.imgLeft);

  final EditText et = (EditText) findViewById(R.id.cardnumEditTexst);
    et.setOnFocusChangeListener(new View.OnFocusChangeListener()
    {
        @Override
        public void onFocusChange(View v, boolean hasFocus)
        {
            if (hasFocus)
            {
                if (et.getText().length() == 0)
                {
                    imgLeft.startAnimation(animation);
                }
            } else
            {
                if (et.getText().length() == 0)
                    imgLeft.clearAnimation();
            }
        }
    });

Und meine Animation wirft die Bildansicht nach oben

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
     android:fillAfter="true"
     android:duration="200"
     android:interpolator="@android:interpolator/linear"
    >
    <scale
        android:fromXScale="0%"
        android:fromYScale="0%"
        android:toXScale="60%"
        android:toYScale="60%"
        android:pivotX="50%"
        android:pivotY="50%"
        />
    <translate
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:startOffset="100"
        android:fromYDelta="0%"
        android:toYDelta="-80%"/>

</set>

Und wenn ich dies einstelle, ist Floating in Ordnung, aber siehe paddingLeft = "35dp", ich möchte es von der 0. Position aus starten, siehe im ersten Bild, wo "Titel" angezeigt wird, ich meine, es sollte keine Auffüllung geben, aber wenn ich willentferne the paddingLässt den Verlust der Floating-Funktionalität nach.

Antworten auf die Frage(2)

Ihre Antwort auf die Frage