Change Floating Action Button color
No XML:
app:backgroundTint="@color/colorAccent"
No código:
setBackgroundTintList(ColorStateList.valueOf(
getResources().getColor(R.color.colorAccent))
)
app:backgroundTint="@color/colorAccent"
setBackgroundTintList(ColorStateList.valueOf(
getResources().getColor(R.color.colorAccent))
)
// Adicionando mensagem lista vazia
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
<TextView
android:id="@+id/messege_empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:visibility="gone"
android:text="@string/no_itens" />
private RecyclerView recyclerView;
private TextView emptyMessege;
// ...
recyclerView = findViewById(R.id.recycler_view);
emptyMessege = findViewById(R.id.messege_empty);
// ...
if (adapterList.isEmpty()) {
recyclerView.setVisibility(View.GONE);
emptyMessege.setVisibility(View.VISIBLE);}
else {
recyclerView.setVisibility(View.VISIBLE);
emptyMessege.setVisibility(View.GONE);}