如何实现注册/ android系统中注册? [英] How to implement registration/sign up in android?
本文介绍了如何实现注册/ android系统中注册?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
欲设置,其中包括多个步骤的用户注册。各步骤将在条的形式被突出显示。深灰色栏将是完成和浅灰色栏将是必须完成的步骤的步骤。不能似乎想办法做到这一点。请建议。
我们可以在myfitnesspal注册看到这一点。我曾在红色框下面的图片中突出显示的这一点。
解决方案
< RelativeLayout的
机器人:ID =@ + ID /布局
机器人:layout_width =FILL_PARENT
机器人:layout_height =WRAP_CONTENT> <的LinearLayout
机器人:ID =@ + ID / tab_layout
机器人:layout_width =FILL_PARENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignParentTop =真
机器人:方向=横向> <按钮
机器人:ID =@ + ID /第一步
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_marginLeft =5DP
机器人:layout_marginTop = - 5DP
机器人:背景=@绘制/ tab_active/> <按钮
机器人:ID =@ + ID / step2的
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_marginLeft =5DP
机器人:layout_marginTop = - 5DP
机器人:背景=@绘制/ tab_active/> <按钮
机器人:ID =@ + ID /第三步
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_marginLeft =5DP
机器人:layout_marginTop = - 5DP
机器人:背景=@绘制/ tab_active/> <按钮
机器人:ID =@ + ID /步骤4
机器人:layout_width =WRAP_CONTENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_marginLeft =5DP
机器人:layout_marginTop = - 5DP
机器人:背景=@绘制/ tab_active/>
< / LinearLayout中> <的LinearLayout
机器人:ID =@ + ID / steptitle
机器人:layout_width =FILL_PARENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_below =@ + ID / tab_layout> <的TextView
机器人:ID =@ + ID / eventItemTitle
机器人:layout_width =match_parent
机器人:layout_height =WRAP_CONTENT
机器人:layout_gravity =center_vertical
机器人:ellipsize =结束
机器人:paddingLeft =15dp
机器人:单线=真
机器人:文字=@字符串/ symptomstitlebar
机器人:文字颜色=@彩色/ white_color
机器人:TEXTSIZE =14sp
机器人:文字样式=大胆/>
< / LinearLayout中> <的LinearLayout
机器人:ID =@ + ID /内容
机器人:layout_width =FILL_PARENT
机器人:layout_height =WRAP_CONTENT
机器人:layout_below =@ + ID / event_title_layout
机器人:方向=横向
机器人:paddingLeft =10dp
机器人:paddingRight =10dp> <包括
机器人:ID =@ + ID / stepContent
机器人:layout_width =match_parent
机器人:layout_height =match_parent
布局=@布局/ event_tab_layout/>
< / LinearLayout中>
< / RelativeLayout的>
尝试这样的布局,并定义片段动态更改内容
I want to setup a user registration which consists of multiple steps. Each step will be highlighted in the form of bars. Dark grey bar will be the steps that are completed and light grey bar will be steps that needs to be completed. Cant seem to think of a way to do this. Please suggest.
We can see this in myfitnesspal sign up. I have highlighted this in red box in the picture below.
解决方案
<RelativeLayout
android:id="@+id/layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/tab_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:orientation="horizontal" >
<Button
android:id="@+id/step1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="-5dp"
android:background="@drawable/tab_active" />
<Button
android:id="@+id/step2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="-5dp"
android:background="@drawable/tab_active" />
<Button
android:id="@+id/step3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="-5dp"
android:background="@drawable/tab_active" />
<Button
android:id="@+id/step4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="-5dp"
android:background="@drawable/tab_active" />
</LinearLayout>
<LinearLayout
android:id="@+id/steptitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tab_layout" >
<TextView
android:id="@+id/eventItemTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:ellipsize="end"
android:paddingLeft="15dp"
android:singleLine="true"
android:text="@string/symptomstitlebar"
android:textColor="@color/white_color"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/event_title_layout"
android:orientation="horizontal"
android:paddingLeft="10dp"
android:paddingRight="10dp" >
<include
android:id="@+id/stepContent"
android:layout_width="match_parent"
android:layout_height="match_parent"
layout="@layout/event_tab_layout" />
</LinearLayout>
</RelativeLayout>
try a layout like this and define fragments to change the content dynamically
这篇关于如何实现注册/ android系统中注册?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文