这就是它在模拟器中的样子:
这应该是这样的:
我的代码:
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="200dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
android:fitsSystemWindows="true"
app:expandedTitleMarginStart="48dp"
app:expandedTitleMarginEnd="64dp"
app:contentScrim="@color/accent"
android:background="@color/oil">
<RelativeLayout
android:id="@+id/back_drop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:fitsSystemWindows="true"
app:layout_collapseMode="parallax" >
<EditText
android:layout_width="150dp"
android:layout_height="wrap_content"
android:id="@+id/adminHomeInputOrigin"
android:hint="Origin"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true" />
<EditText
android:layout_width="150dp"
android:layout_height="wrap_content"
android:id="@+id/adminHomeInputDestination"
android:text="Destination"
android:layout_below="@+id/adminHomeInputOrigin"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<EditText
android:layout_width="150dp"
android:layout_height="wrap_content"
android:id="@+id/clientHomeSearchDate"
android:text="Depture Date"
android:layout_below="@+id/adminHomeInputDestination"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="My Itinerary"
android:id="@+id/clientHomeMyIt"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:onClick="ClientHomeViewClientItinerary"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="My Profile"
android:id="@+id/clientHomeViewProfile"
android:layout_alignTop="@+id/clientHomeSearchDate"
android:layout_alignParentEnd="true"
android:onClick="ClientHomeViewClientProfile"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/clientHomeDepDateError"
android:hint="error here"
android:layout_below="@+id/clientHomeViewProfile"
android:layout_alignParentStart="true" />
</RelativeLayout>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ListView
android:layout_width="wrap_content"
android:layout_height="314dp"
android:id="@+id/clientHomeListView"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:background="@color/accent"/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<android.support.design.widget.FloatingActionButton
android:layout_height="wrap_content"
android:layout_width="wrap_content"
app:layout_anchor="@id/app_bar"
app:layout_anchorGravity="bottom|right|end"
android:layout_margin="15dp"
android:clickable="true"
android:id="@+id/clientHomeSearch"
android:src="@drawable/ic_search_white_24dp"
android:onClick="ClientHomeSearch"
app:rippleColor="@color/primary"/>
</android.support.design.widget.CoordinatorLayout>
看起来颜色没有出现,浮动操作栏也没有显示我想要的图像。有人能告诉我出了什么问题吗?
答案 0 :(得分:0)
这是我的build.gradle
//create a connection
$conn = mysqli_connect("host","user","password","db_name");
//list of databases
$databases = "Your Array of database";
foreach ($databases as $database){
// Change database to $database
mysqli_select_db($conn,$database);
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect :" . mysqli_connect_error();
}
// code for $database eg. - your insert query...
}