I am using SnackBar
for single line message for related operation.
Snackbar snackBar;
public void showSnackBar(View view){
snackBar = Snackbar.make(view, "Searching for GPS", Snackbar.LENGTH_INDEFINITE);
snackBar.show();
}
In the method isGPSEnabled
, i use the method showSnackBar
if(Helper.isGPSEnabled(this)){
showSnackBar(findViewById(android.R.id.content));
}
But I got this,
Why SnackBar
allow some space from bottom bar ?
Edit
The layout file :
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/content"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/edit_text"
android:divider="@android:drawable/divider_horizontal_textfield"
android:addStatesFromChildren="true">
<LinearLayout android:id="@+id/container"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingEnd="0dip"
/>
<AutoCompleteTextView android:id="@+id/edit"
android:completionThreshold="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:layout_gravity="center_vertical"
/>
</LinearLayout>