手机上的时间选择器已切断

时间:2019-01-22 00:07:27

标签: android android-layout

我正在Android中创建一个非常基本的闹钟。在构建和加载手机时,由于某种原因,时间选择器会在中间中断。

我尝试更改xml中的高度,将高度设置为值以及wrap_content。

<?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:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context=".MainActivity"
    tools:showIn="@layout/activity_main">

    <TimePicker
        android:id="@+id/timePicker"
        android:layout_width="wrap_content"
        android:layout_height="700dp"
        android:layout_marginBottom="294dp" />


    <EditText
        android:id="@+id/artist_input"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:ems="10"
        android:layout_marginTop="350dp"
        android:inputType="textPersonName"
        android:hint="Enter Artist" />

    <EditText
        android:id="@+id/song_input"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="400dp"
        android:ems="10"
        android:hint="Enter Song or Album"
        android:inputType="textPersonName" />


</RelativeLayout>

https://docs.microsoft.com/en-us/iis/configuration/system.webserver/httperrors/

1 个答案:

答案 0 :(得分:0)

似乎您使用了错误的边距。 删除所有边距,然后查看RelativeLayout Guide