Exemplo n.º 1
0
  @Nullable
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_beat_box, container, false);
    RecyclerView recyclerView = (RecyclerView) v.findViewById(R.id.fragment_beat_box_recycler_view);
    recyclerView.setLayoutManager(new GridLayoutManager(getActivity(), 3));

    recyclerView.setAdapter(new SoundAdapter(mBeatBox.getSounds()));
    return v;
  }
Exemplo n.º 2
0
 @Override
 public void onDestroy() {
   super.onDestroy();
   mBeatBox.release();
 }