Javaで作成したボタンの上に常にXMLボタンを表示できるXMLコードはありますか?現在は、Javaボタンが無効になっているときにのみXMLボタンが表示されるためです。Javaボタンの上にXMLボタンを配置しますか?
XMLボタン:
<?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:id="@+id/activity_student_menu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="blah.Blah">
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
app:fabSize="normal"
app:srcCompat="@android:drawable/ic_input_add"
android:id="@+id/floatingActionButton"
app:backgroundTint="?attr/colorBackgroundFloating"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>
</RelativeLayout>
view.bringToFront() –
@EliasFazelでそれを宣言FloatingActionButtonのIDですXMLは前面にあり、XMLコードはありますか?私はbringToBack()関数が私のJavaボタンを背中に置くために使うのを見ていません。 –
in findViewById()後 –