🙂 İNSANLARIN EN HAYIRLISI INSANLARA FAYDALI OLANDIR 🙂

Ramazan HABER / Android Yeni / EditText metarial

1-) Android Yeni -

EditText metarial

 

implementation 'com.google.android.material:material:1.2.0-alpha01'

 

 

 

 

<android.support.design.widget.TextInputLayout
    
android:id="@+id/txtLayoutKullaniciAdi"
    
android:layout_width="match_parent"
    
android:layout_height="wrap_content">
    <
EditText
        
android:id="@+id/txtKullaniciAdi"
        
android:layout_width="match_parent"
        
android:layout_height="wrap_content"
        
android:hint="Kullanıcının Adı"
        
android:inputType="text" />
</
android.support.design.widget.TextInputLayout>


<
android.support.design.widget.TextInputLayout
    
android:id="@+id/txtLayoutCihazToken"
    
android:layout_width="match_parent"
    
android:layout_height="wrap_content">

    <
EditText
        
android:id="@+id/txtCihazToken"
        
android:layout_width="match_parent"
        
android:layout_height="106dp"
        
android:hint="Cihazın Tokeni"
        
android:inputType="textMultiLine"
        
android:textSize="11sp" />
</
android.support.design.widget.TextInputLayout>

 

 

KARALAMA

<LinearLayout
    
android:layout_width="match_parent"
    
android:layout_height="match_parent"
    
android:orientation="horizontal">

    <
android.support.design.widget.TextInputLayout
        
android:layout_width="match_parent"
        
android:layout_height="wrap_content"
        
android:layout_weight="1">

        <
EditText
            
android:id="@+id/txtYetiskin"
            
android:layout_width="match_parent"
            
android:layout_height="wrap_content"
            
android:hint="Yetişkin"
            
android:inputType="number"
            
android:text="0" />
    </
android.support.design.widget.TextInputLayout>

    <
android.support.design.widget.TextInputLayout
        
android:layout_width="match_parent"
        
android:layout_height="wrap_content"
        
android:layout_weight="1">

        <
EditText
            
android:id="@+id/txtCocuk"
            
android:layout_width="match_parent"
            
android:layout_height="wrap_content"
            
android:hint="Çocuk"
            
android:inputType="number"
            
android:text="0" />
    </
android.support.design.widget.TextInputLayout>

    <
android.support.design.widget.TextInputLayout
        
android:layout_width="match_parent"
        
android:layout_height="wrap_content"
        
android:layout_weight="1">

        <
EditText
            
android:id="@+id/txtFree"
            
android:layout_width="match_parent"
            
android:layout_height="wrap_content"
            
android:hint="Free"
            
android:inputType="number"
            
android:text="0" />
    </
android.support.design.widget.TextInputLayout>
</
LinearLayout>

 

 

 

HİNT SİZE AYARLAMA

 

In your styles.xml

<style name="TextLabel" parent="TextAppearance.Design.Hint">

    <item name="android:textSize">16sp</item>

</style>

And then in your layout file:

<android.support.design.widget.TextInputLayout

         android:layout_width="match_parent"

         android:layout_height="wrap_content"

         android:layout_marginLeft="@dimen/activity_horizontal_margin"

         android:layout_marginRight="@dimen/activity_horizontal_margin"

         android:layout_marginTop="12dp"

         app:hintTextAppearance="@style/TextLabel"

         android:minHeight="30dp">

 2021 Ocak 18 Pazartesi
 424