Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/228.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android登录屏幕_Android_Login_Screen - Fatal编程技术网

Android登录屏幕

Android登录屏幕,android,login,screen,Android,Login,Screen,我是新开发的Android应用程序 所以我的应用程序是关于我的公司的。我的应用程序具有登录屏幕的布局。我公司的表兄弟 有用户名和密码 所以我想登录_screen.xml,和我的公司网站登录屏幕一样 在login_screen.xml中 1-用户名称和密码的编辑文本 2-用于登录的按钮 有人能帮我怎么做吗 或者给我一个辅导 非常感谢>这里有一个示例代码,可以帮助您开始。根据您的需要进行更改: <?xml version="1.0" encoding="utf-8"?> <Scro

我是新开发的Android应用程序

所以我的应用程序是关于我的公司的。我的应用程序具有登录屏幕的布局。我公司的表兄弟 有用户名和密码

所以我想登录_screen.xml,和我的公司网站登录屏幕一样

在login_screen.xml中 1-用户名称和密码的编辑文本 2-用于登录的按钮

有人能帮我怎么做吗

或者给我一个辅导


非常感谢>

这里有一个示例代码,可以帮助您开始。根据您的需要进行更改:

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:fillViewport="true" >

<RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" >

<!-- Logo Start -->
<ImageView
    android:id="@+id/logo"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:src="@drawable/ic_launcher" />
<!-- Place your company logo in the src attribute -->
<!-- Logo Ends -->


<!-- Login Form -->

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_below="@id/logo"
    android:orientation="vertical"
    android:padding="10dip" >

    <!-- Username Label -->
 <TextView
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:text="Username" />

 <EditText
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:layout_marginBottom="20dip"
     android:layout_marginTop="5dip"
     android:singleLine="true" />

 <!-- Password Label -->
 <TextView
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:text="Password" />

 <EditText
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:layout_marginTop="5dip"
     android:password="true"
     android:singleLine="true" />


 <!-- Login button -->
<Button
        android:id="@+id/btnLogin"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dip"
        android:text="Login" />
</LinearLayout>
<!-- Login Form Ends -->

    </RelativeLayout>

</ScrollView>
希望这有帮助


干杯

这不是为登录屏幕我需要相同的facebook或twitter登录屏幕无论你是做一个登录屏幕或一个简单的活动并不重要。你只需要改变它的风格。当然,默认的Android样式看起来不像登录屏幕,首先你必须应用你的颜色、徽标等等。请注意,我们希望问题显示出对解决问题的理解和研究最少。请说明您已经做了什么,以及您遇到了什么问题。@user3020391我相信您在阅读了一些教程并尝试了一些东西之后,可以很容易地自己想出这个问题。@user3020391有数百个教程和示例代码。如果你花点力气在谷歌上搜索,你会很容易找到的。无论如何,这里有一个关于如何实现登录功能的教程:我不敢相信你竟敢要求更多的代码。去拿一本Android的书来学习。