Ich möchte Textansicht unter der Suchleiste platzieren. Ich habe layout_below verwendet, aber der Text wird nicht angezeigt.Android XML layout_below funktioniert nicht
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.arlib.floatingsearchview.FloatingSearchView
android:layout_margin="@dimen/cardview_margin"
android:id="@+id/map_floating_search_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:floatingSearch_close_search_on_keyboard_dismiss="true"
app:floatingSearch_leftActionMode="showHamburger"
app:floatingSearch_searchBarMarginLeft="@dimen/search_view_inset"
app:floatingSearch_searchBarMarginRight="@dimen/search_view_inset"
app:floatingSearch_searchBarMarginTop="@dimen/search_view_inset"
app:floatingSearch_searchHint="Search for a room..."
app:floatingSearch_showSearchKey="false"
app:floatingSearch_suggestionsListAnimDuration="250" />
<EditText
android:layout_margin="@dimen/cardview_margin"
android:id="@+id/edit_text_destination"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/map_floating_search_view"
android:hint="To" />
<Button
android:id="@+id/directions_go_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_margin="@dimen/cardview_margin"
android:text="GO!" />
<CheckBox
android:id="@+id/checkbox_routing_criteria"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:onClick="onCheckboxClicked"
android:text="@string/avoid_indoor_pathways"
android:layout_margin="@dimen/cardview_margin"
android:textColor="@color/colorPrimary" />
</RelativeLayout>
Ich möchte edit_text_destination unter FloatingSearchView sein. Ich bin mir nicht sicher, warum es nicht funktioniert. Wenn ich FloatingSearchView durch eine andere Textansicht ersetze, funktioniert es. Ich kämpfe eine Weile damit. Könnte mir jemand helfen?
Dank
Haben Sie überprüft, wie es im Beispiel der Bibliothek implementiert wurde? Nimm dir eine Idee von dort. Vielleicht wird dir das helfen. –
'FloatingSearchView' bläht [' floating_search_layout.xml'] auf (https://github.com/arimorty/floatingsearchview/blob/a0f8fbc90d98eb1b629c6295dd2d3577412e7b1e/library/src/main/res/layout/floating_search_layout.xml), das 'match_parent/match_parent hat 'Höhe. – azizbekian