Skip to content

Commit

Permalink
Use sliding animation for Snackbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Florianisme committed Apr 15, 2024
1 parent 6e8e0b2 commit 620fc3c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import androidx.navigation.Navigation;
import androidx.recyclerview.widget.RecyclerView;

import com.google.android.material.snackbar.BaseTransientBottomBar;
import com.google.android.material.snackbar.Snackbar;

import java.util.List;
Expand Down Expand Up @@ -94,7 +95,9 @@ private DeviceClickedCallback buildDeviceClickedCallback() {
String snackbarText = getContext().getString(R.string.wol_toast_sending_packet, deviceName);
View coordinatorView = getActivity().findViewById(R.id.device_list_coordinator_layout);

Snackbar.make(coordinatorView, snackbarText, Snackbar.LENGTH_SHORT).show();
Snackbar.make(coordinatorView, snackbarText, Snackbar.LENGTH_SHORT)
.setAnimationMode(BaseTransientBottomBar.ANIMATION_MODE_SLIDE)
.show();
};
}

Expand Down

0 comments on commit 620fc3c

Please sign in to comment.