Android 在布局顶部浮动编辑文本

Android 在布局顶部浮动编辑文本,android,android-layout,position,android-edittext,xamarin,Android,Android Layout,Position,Android Edittext,Xamarin,在Xamarin中,是否可以在版面顶部“浮动”EditText 我在想一种“带到前线”的代码 当前未显示编辑文本 这是我目前的代码: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fi

在Xamarin中,是否可以在版面顶部“浮动”EditText

我在想一种“带到前线”的代码

当前未显示编辑文本

这是我目前的代码:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:padding="5dip">
<EditText
    android:id="@+id/inputSearch"
    android:layout_width="fill_parent"
    android:layout_height="49.1dp"
    android:hint="Find..."
    android:inputType="textVisiblePassword"
    android:layout_marginBottom="15.2dp" />
<FrameLayout
    android:id="@+id/mapWithOverlay"
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    android:layout_below="@+id/thumbnail" />


提前感谢

将编辑文本放在框架布局下方

<FrameLayout ... /> <Edittext .../>

只需更改您的
框架布局的以下属性

 <FrameLayout
    android:id="@+id/mapWithOverlay"
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    android:layout_below="@id/inputSearch" /> <---- Change it to the id of EditText

您必须使用RelativeLayout,因此必须提供布局属性
让您知道将其放置在何处的视图

因此,对视图使用下面的布局、上面的布局、布局对齐parenttop=“true”等 你的使用

现在您的框架布局覆盖了整个屏幕区域,只需应用 布局\u alignParentTop=“true”到编辑文本视图,并
将edittext视图id添加到FrameLayout的下面的布局。将解决您的问题。

请附上屏幕截图您到底想要什么?您确定这是您的完整布局文件代码吗?