简体   繁体   English

我该怎么做才能使我的android活动设计更像此应用程序屏幕截图图像?

[英]What could I do to make my android activity design more like this app screenshot image?

What could I do to make my android activity design more like this app screenshot image? 我该怎么做才能使我的android活动设计更像此应用程序屏幕截图图像?

Basically I've seen this login screen I liked the look of, and I've attempted to make my design match it as closely as possible. 基本上,我已经看到了喜欢的外观的登录屏幕,并且尝试使我的设计与之尽可能匹配。 But although my design does look similar, it doesn't look anywhere near as good. 但是,尽管我的设计看起来确实很相似,但看起来却不尽如人意。

What other changes do you think I should make, to make my design look as good as the screenshot below. 您认为我还应该进行哪些其他更改,以使我的设计与下面的屏幕截图一样好。 My code and a screenshot of my design so far are also below 到目前为止,我的代码和我的设计的屏幕截图也位于下面

A screenshot of the app, I'm trying to match design of 该应用程序的屏幕截图,我正在尝试将其设计与

http://i.stack.imgur.com/PeMzd.jpg

A screenshot of my app design so far: 到目前为止,我的应用程序设计的屏幕截图:

在此处输入图片说明

The code for my app design so far: 到目前为止,我的应用程序设计代码:

Activity_main.xml activity_main.xml中

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
    android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context="com.how2evolve.conceptdesign.MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:text="Company"
        android:id="@+id/textView"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="122dp"
        android:textSize="110px"
        android:focusableInTouchMode="false"
        android:fontFamily="sans-serif"
        android:textStyle="bold|italic"
        />

    <Button
        android:layout_width="100dp"
        android:layout_height="40dp"
        android:text="Log in"
        android:textColor="#ffff"
        android:id="@+id/loginButton"
        android:background="@drawable/loginbutton"
        android:textStyle="bold"
        android:translationZ="-10dp"
        android:layout_below="@+id/linearLayout1"
        android:layout_alignRight="@+id/linearLayout1"
        android:layout_alignEnd="@+id/linearLayout1"
        android:layout_marginTop="33dp" />

    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="320.5dp"
        android:layout_height="162dp"
        android:background="@drawable/loginbox"
        android:orientation="vertical"
        android:padding="5dp"
        android:layout_marginTop="220dp"
        android:layout_centerHorizontal="true"
        android:elevation="100dp"
        android:clickable="false">

        <EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textColor="#393A35"
            android:textSize="14.4dp"
            android:id="@+id/username"
            android:layout_marginLeft="10dp"
            android:layout_marginTop="26dp"
            android:singleLine="true"
            android:editable="true"
            android:autoText="false"
            android:clickable="false"
            android:hint="Username"
            android:textColorHint="#393A35"
            android:enabled="true" />

        <EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textColor="#393A35"
            android:textSize="14.4dp"
            android:id="@+id/password"
            android:layout_marginLeft="10dp"
            android:layout_marginTop="40dp"
            android:singleLine="true"
            android:password="true"
            android:editable="true"
            android:hint="Password"
            android:enabled="true"
            android:textColorHint="#393A35"
            android:clickable="false" />

    </LinearLayout>




</RelativeLayout>

Styles.xml Styles.xml

<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="android:background">#282925</item>
    </style>

</resources>

Loginbox.xml Loginbox.xml

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >

    <item >
        <shape
            android:shape="rectangle" android:bottom="3px">

            <solid android:color="#ffffff" />
            <corners
                android:bottomLeftRadius="4dp"
                android:bottomRightRadius="4dp"
                android:topLeftRadius="4dp"
                android:topRightRadius="4dp" /></shape>
    </item>

    <item android:left="20dp" android:right="20dp">
        <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line">
            <stroke android:width="1.7dp"  android:color="#BDBDBB" />
        </shape>
    </item>



</layer-list>

Loginbutton.xml Loginbutton.xml

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle" android:elevation="2dp">

    <solid android:color="#0259C8" />
    <corners
        android:bottomLeftRadius="8dp"
        android:bottomRightRadius="8dp"
        android:topLeftRadius="8dp"
        android:topRightRadius="8dp" /></shape>

I've made a few changes to your layout, I think this would be closer to what you're looking for: 我对您的布局进行了一些更改,我认为这将更接近您要查找的内容:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.how2evolve.conceptdesign.MainActivity">

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:text="Company"
    android:id="@+id/textView"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="122dp"
    android:textSize="110px"
    android:focusableInTouchMode="false"
    android:fontFamily="sans-serif"
    android:textStyle="bold|italic"
    />

<Button
    android:layout_width="100dp"
    android:layout_height="40dp"
    android:text="Log in"
    android:textColor="#ffff"
    android:id="@+id/loginButton"
    android:textStyle="bold"
    android:translationZ="-10dp"
    android:layout_below="@+id/linearLayout1"
    android:layout_alignRight="@+id/linearLayout1"
    android:layout_alignEnd="@+id/linearLayout1"
    android:layout_marginRight="10dp"
    android:background="@drawable/rounded_button"
    />

<LinearLayout
    android:id="@+id/linearLayout1"
    android:layout_width="320.5dp"
    android:layout_height="162dp"
    android:orientation="vertical"
    android:padding="5dp"
    android:layout_marginTop="220dp"
    android:layout_centerHorizontal="true"
    android:background="@drawable/rounded_shape"
    android:elevation="10dp"
    android:clickable="false">

    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="#393A35"
        android:textSize="14.4dp"
        android:id="@+id/username"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="26dp"
        android:singleLine="true"
        android:editable="true"
        android:autoText="false"
        android:clickable="false"
        android:hint="Username"
        android:textColorHint="#393A35"
        android:enabled="true" />

    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="#393A35"
        android:textSize="14.4dp"
        android:id="@+id/password"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="40dp"
        android:singleLine="true"
        android:password="true"
        android:editable="true"
        android:hint="Password"
        android:enabled="true"
        android:textColorHint="#393A35"
        android:clickable="false" />
</LinearLayout>

Here is the rounded_shape : 这是rounded_shape

<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"   >

<solid
    android:color="@color/background_floating_material_light" >
</solid>

<stroke
    android:width="2dp"
    android:color="#C4CDE0" >
</stroke>

<padding
    android:left="5dp"
    android:top="5dp"
    android:right="5dp"
    android:bottom="5dp"    >
</padding>

<corners
    android:radius="10dp"   >
</corners>

And the rounded button whit the gradient: 圆形按钮则带有渐变:

<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"   >

<solid
    android:color="#1E3DD3" >
</solid>

<gradient
    android:angle="90"
    android:endColor="#1E6BD3"
    android:startColor="#1E3DD3"
    android:type="linear" />

<padding
    android:left="5dp"
    android:top="5dp"
    android:right="5dp"
    android:bottom="5dp"    >
</padding>

<corners
    android:bottomLeftRadius="10dp"
    android:bottomRightRadius="10dp"/>

这就是我的设备上的样子。

Hope this could be helpful. 希望这会有所帮助。

Regards Jose 问候何塞

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使我的Android SwipeableCardViews更像IOS 7邮件应用程序(滑动以显示按钮) - How can I make my Android SwipeableCardViews more like the IOS 7 mail app (swipe to show buttons) 如何使ListView行看起来像Twitter应用程序的[截屏]? - How can I make my ListView row look like the Twitter app [Screenshot]? 如何让我的应用看起来像一个标准的Android应用程序? - How do I make my app look like a standard Android app? 如何让我的Android应用生成随机数? - How do I make my Android app generate a random number? 如何在我的Android cardviews顶部添加图标(如搜索,心脏,选项),如图片所示? - How do I add a icons (like search, heart, options) to the top of my android cardviews, like in image? 我需要在服务器上做什么才能与Android应用程序通信? - What to I need to do to on my server to communicate with an Android app? 想要在我的Android应用中实现“屏幕截图”功能和“共享”选项,但会引发错误 - Would like to implement 'screenshot' function and 'share' option in my Android app, but throwing error Android - 点击通知打开我的主要活动,如何让它打开其他东西 - Android - Click on notification opens up my main activity, how do I make it open up something else 如何在我的Android应用程序中截取屏幕截图 - How to take a screenshot inside my android app 如何从Android应用程序中的另一个Activity访问主Webview实例? - How do I access the main webview instance from another Activity in my Android app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM