我是android初学者。我想创建登录页面设计(使用用户名密码)从sqlite数据库中检索数据。你可以帮我吗?例如,如Gmail等Android登录页面设计
0
A
回答
0
您可以使用下面的布局:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_gravity="fill_horizontal"
android:fillViewport="true"
android:scrollbarStyle="insideInset"
android:scrollbars="horizontal|vertical" >
<FrameLayout
android:id="@+id/frameLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white" >
<TableLayout
android:id="@+id/tablelayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TableRow
android:id="@+id/tablerow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" >
<TableLayout
android:id="@+id/tablerow1_tablelayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TableRow
android:id="@+id/frameLayout1_tblLayout1_tableRow1_tbllayout1_tableRow2"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/frameLayout1_tblLayout1_tableRow1_tbllayout1_tableRow2_txtviewspace"
android:layout_width="30px"
android:layout_height="100px" />
</TableRow>
</TableLayout>
</TableRow>
<TableRow
android:id="@+id/tablerow2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" >
<TableLayout
android:id="@+id/tablerow2_tablelayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TableRow
android:id="@+id/tablerow1_tablelayout1_tablerow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/tablerow1_tablelayout1_tablerow1_viewspace1"
android:layout_width="30px"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tablerow1_tablelayout1_tablerow1_u_id"
android:layout_width="150px"
android:layout_height="wrap_content"
android:text="User Name: "
android:textColor="@color/black"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tablerow1_tablelayout1_tablerow1_viewspace2"
android:layout_width="30px"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/loginedituid"
android:layout_width="200px"
android:layout_height="wrap_content"
android:inputType="text"
android:maxLength="10"
android:singleLine="true" />
</TableRow>
<TableRow
android:id="@+id/tablerow2_tablelayout1_tablerow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/tablerow2_tablelayout1_tablerow1_viewspace1"
android:layout_width="30px"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tablerow2_tablelayout1_tablerow1_pasword"
android:layout_width="150px"
android:layout_height="wrap_content"
android:text="Password: "
android:textColor="@color/black"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tablerow2_tablelayout1_tablerow1_viewspace2"
android:layout_width="30px"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/editpswrd"
android:layout_width="200px"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:maxLength="10"
android:singleLine="true" />
<TextView
android:id="@+id/tablerow2_tablelayout1_tablerow1_viewspace3"
android:layout_width="30px"
android:layout_height="wrap_content" />
</TableRow>
</TableLayout>
</TableRow>
<TableRow
android:id="@+id/tablerow3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" >
<TableLayout
android:id="@+id/tablerow3_tablelayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TableRow
android:id="@+id/frameLayout1_tblLayout1_tableRow1_tbllayout1_tableRow2"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/frameLayout1_tblLayout1_tableRow1_tbllayout1_tableRow2_txtviewspace"
android:layout_width="10px"
android:layout_height="30px" />
</TableRow>
<TableRow
android:id="@+id/frameLayout1_tblLayout1_tableRow1_tbllayout1_tableRow2"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/frameLayout1_tblLayout1_tableRow1_tbllayout1_tableRow2_txtviewspace"
android:layout_width="30px"
android:layout_height="30px" />
</TableRow>
<TableRow android:id="@+id/frameLayout1_tblLayout1_tableRow1_tbllayout1_tableRow2" >
<TableRow
android:id="@+id/tablerow3_tablelayout1_tablerow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/tablerow3_tablelayout1_tablerow1_viewspace1"
android:layout_width="130px"
android:layout_height="30px" />
<Button
android:id="@+id/btnlogin"
android:layout_width="150px"
android:layout_height="60px"
android:text="LOGIN"
android:textStyle="bold" />
<TextView
android:id="@+id/tablerow3_tablelayout1_tablerow1_viewspace1"
android:layout_width="130px"
android:layout_height="30px" />
<Button
android:id="@+id/btnexit"
android:layout_width="150px"
android:layout_height="60px"
android:text="EXIT"
android:textStyle="bold" />
</TableRow>
</TableRow>
</TableLayout>
</TableRow>
</TableLayout>
</FrameLayout>
这将是您登录的设计。
相关问题
- 1. 设计的登录页面不显示
- 2. 登录页面设计与授权
- 3. 使用android选项卡设计登录和注册页面
- 4. Android与MySQL登录页面
- 5. 设置设计登录是根页
- 6. android studio 2.2.3设计页面
- 7. 设计添加验证码登录页面后* * X失败的登录
- 8. PHP登录页面安全审计
- 9. Rails登陆页面路由和设计
- 10. 设计注册登陆页面
- 11. Ruby on Rails /宝石设计/登录页面模式
- 12. 设计宝石 - 如何在登录后留在当前页面?
- 13. Rails:获取设计,直接登录到不同的页面
- 14. 具有多个登录页面的多个设计模型
- 15. 重定向到设计上的其他登录页面
- 16. 设计 - 覆盖自定义登录页面的重定向
- 17. 设计登录页面始终显示即使它没有根。
- 18. 如何删除设计中的单独登录页面
- 19. 城市登录页面的URL设计:/芝加哥或/?_ city = chicago
- 20. 关于我的登录页面的设计建议
- 21. 登录页面没有Index.html设计 - ngRoute(AngularJS)
- 22. 登录框设计
- 23. 设计:在登录
- 24. Rails设计登录
- 25. 设计未登录
- 26. 在Android设计登录细节
- 27. 设置消息“/登录”页面
- 28. 的Drupal 8设置登录页面
- 29. 添加登录活动页面Android Studio
- 30. 在android中创建登录页面
你是指哪种数据库?它已经在设备上了吗? – rekire 2012-02-08 12:37:28
请参考http://developer.android.com/了解android中的数据库功能。 – Dhruvisha 2012-02-08 12:42:20
你应该先学习android自己的数据库编程后,你就可以做到这一点你自己... – himanshu 2012-02-08 12:43:06