2017-05-30 3 views
-6

Ich bin neu in Android. Ich erstelle ein Layout des Benutzerprofils. In diesem Layout kann der Benutzer sein Profildetail bearbeiten und anzeigen. Klicken Sie auf den Bearbeiten-Button.Benutzerprofil Layout mit Bearbeiten und Speichern Option

Bitte geben Sie mir einen Vorschlag, um diese Art von Layout zu machen.

https://i.stack.imgur.com/rBTUh.jpg

+1

bitte Ihre Mühe Code hier einfügen. –

+0

'Ich erstelle ein Layout 'und zeige uns dann, was du bereits erstellt hast. –

+0

Bitte zeigen Sie uns, was Sie bisher versucht haben, denn so wie es aussieht, bitten Sie uns, den Code für Sie zu schreiben – WhatsThePoint

Antwort

1

versuchen, dies es wird für Sie arbeiten, um meinen Freund

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
xmlns:tools="http://schemas.android.com/tools" 
android:id="@+id/activity_profile" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:orientation="vertical" 
tools:context="com.ncrypted.dempproject.Profile"> 

<View 
    android:id="@+id/view" 
    android:layout_width="match_parent" 
    android:layout_height="200dp" 
    android:layout_alignParentStart="true" 
    android:layout_alignParentTop="true" 
    android:layout_marginBottom="50dp" 
    android:background="@color/colorPrimary" /> 

<ScrollView 
    android:id="@+id/scrolView_account" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 


    <RelativeLayout 
     android:id="@+id/linear_account" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:orientation="vertical"> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:layout_marginTop="100dp" 
      android:orientation="vertical"> 

      <LinearLayout 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:layout_marginLeft="10dp" 
       android:layout_marginRight="10dp" 
       android:layout_marginTop="100dp" 
       android:orientation="vertical"> 

       <TextView 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:layout_marginTop="10dp" 
        android:text="profile Details" 
        android:textStyle="bold" /> 

       <android.support.design.widget.TextInputLayout 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:textColorHint="@color/colorPrimary"> 

        <EditText 
         android:layout_width="match_parent" 
         android:layout_height="wrap_content" 
         android:hint="Please Enter User Name" 
         android:imeOptions="actionNext" 
         android:textColorHint="@color/colorPrimary" /> 

       </android.support.design.widget.TextInputLayout> 

       <android.support.design.widget.TextInputLayout 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:textColorHint="@color/colorPrimary"> 

        <EditText 
         android:layout_width="match_parent" 
         android:layout_height="wrap_content" 
         android:hint="Email Address" 
         android:imeOptions="actionNext" 
         android:inputType="textEmailAddress" 
         android:textColorHint="@color/colorPrimary" /> 

       </android.support.design.widget.TextInputLayout> 


       <android.support.design.widget.TextInputLayout 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:textColorHint="@color/colorPrimary"> 

        <EditText 
         android:layout_width="match_parent" 
         android:layout_height="wrap_content" 
         android:hint="password" 
         android:imeOptions="actionNext" 
         android:inputType="textPassword" 
         android:textColorHint="@color/colorPrimary" /> 

       </android.support.design.widget.TextInputLayout> 


      </LinearLayout> 
     </LinearLayout> 

     <RelativeLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_alignParentTop="true" 
      android:layout_alignParentStart="true"> 

      <de.hdodenhof.circleimageview.CircleImageView 
       android:id="@+id/imageview_account_profile" 
       android:layout_width="150dp" 
       android:layout_height="150dp" 
       android:layout_alignParentTop="true" 
       android:layout_centerHorizontal="true" 
       android:src="@mipmap/ic_launcher" 
       app:civ_border_color="#FFFFFF" 
       app:civ_border_width="2dp" /> 

      <android.support.design.widget.FloatingActionButton 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_alignParentTop="true" 
       android:layout_alignEnd="@+id/imageview_account_profile" 
       android:layout_marginTop="10dp" 
       android:id="@+id/floatingActionButton" /> 

     </RelativeLayout> 


    </RelativeLayout> 
</ScrollView> 

</RelativeLayout> 

für circular image please follow this link

+0

Danke dafür, ich benutze Android: Sichtbarkeit: Sichtbar und weg für diese. 'code' –

+1

Wirklich hilfreich Vielen Dank noch einmal für die Antwort –

+0

@ChinthakaDevinda glücklich, Ihnen zu helfen –

Verwandte Themen