Wyświetlenie toolbaru
This commit is contained in:
parent
fa2eec91b2
commit
5f1af4f52a
@ -26,10 +26,9 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
/*
|
|
||||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
*/
|
|
||||||
FloatingActionButton fab = findViewById(R.id.fab);
|
FloatingActionButton fab = findViewById(R.id.fab);
|
||||||
fab.setOnClickListener(new View.OnClickListener() {
|
fab.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -52,9 +51,9 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
//wczytaj listę z klasy Note oraz dodaj obiekt jej klasy
|
//wczytaj listę z klasy Note oraz dodaj obiekt jej klasy
|
||||||
ArrayList<Note> notes = new ArrayList<Note>();
|
ArrayList<Note> notes = new ArrayList<Note>();
|
||||||
notes.add(new Note());
|
for (int i = 0; i < 20; i++) {
|
||||||
notes.add(new Note());
|
notes.add(new Note());
|
||||||
notes.add(new Note());
|
}
|
||||||
|
|
||||||
//połącz Adapter z RecycleView
|
//połącz Adapter z RecycleView
|
||||||
recyclerView.setAdapter(new NoteAdapter(notes, recyclerView));
|
recyclerView.setAdapter(new NoteAdapter(notes, recyclerView));
|
||||||
|
Loading…
Reference in New Issue
Block a user