FIXME
This commit is contained in:
parent
747fcdc429
commit
706cff79bf
@ -11,5 +11,15 @@
|
||||
</jdbc-additional-properties>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
<data-source source="LOCAL" name="music_database [2]" uuid="6f801a54-4854-4db5-910c-ae63a8207d3e">
|
||||
<driver-ref>sqlite.xerial</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/music_database</jdbc-url>
|
||||
<jdbc-additional-properties>
|
||||
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
|
||||
</jdbc-additional-properties>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
@ -168,9 +168,12 @@ public class MainActivity extends AppCompatActivity implements MetaDataDialog.On
|
||||
|
||||
@Override
|
||||
public void onSongsSelected(List<MusicNote> songs, int concertID) {
|
||||
Log.d("MainActivity", "Inserted Songs: " + songs.size());
|
||||
new Thread(() -> {
|
||||
for(MusicNote musicNote : songs) {
|
||||
ConcertSong concertSong = new ConcertSong(musicNote.getMusicNoteId(), concertID);
|
||||
musicDB.musicNoteDao().insertConcertSong(concertSong);
|
||||
Log.d("MainActivity", "Insert Song: " + musicNote.getTitle());
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
@ -75,6 +75,11 @@ public class ConcertSongSelectorAdapter extends RecyclerView.Adapter<ConcertSong
|
||||
super(itemView);
|
||||
songTitle = itemView.findViewById(R.id.song_title);
|
||||
songCheckbox = itemView.findViewById(R.id.song_checkbox);
|
||||
|
||||
songCheckbox.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
MusicNote musicNote = filteredSongs.get(getAbsoluteAdapterPosition());
|
||||
selectedSongs.add(musicNote);
|
||||
});
|
||||
}
|
||||
|
||||
void bind(MusicNote song) {
|
||||
|
BIN
music_database
BIN
music_database
Binary file not shown.
Loading…
Reference in New Issue
Block a user