Search in sources :

Example 6 with LecturesSearchRow

use of de.tum.in.tumcampusapp.component.tumui.lectures.model.LecturesSearchRow in project TumCampusApp by TCA-Team.

the class LecturesPersonalActivity method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // bind UI elements
    lvMyLecturesList = findViewById(R.id.lvMyLecturesList);
    // handle on click events by showing its LectureDetails
    lvMyLecturesList.setOnItemClickListener((a, v, position, id) -> {
        Object o = lvMyLecturesList.getItemAtPosition(position);
        LecturesSearchRow item = (LecturesSearchRow) o;
        // set bundle for LectureDetails and show it
        Bundle bundle = new Bundle();
        // we need the stp_sp_nr
        bundle.putString(LecturesSearchRow.Companion.getSTP_SP_NR(), item.getStp_sp_nr());
        Intent intent = new Intent(LecturesPersonalActivity.this, LecturesDetailsActivity.class);
        intent.putExtras(bundle);
        // start LectureDetails for given stp_sp_nr
        startActivity(intent);
    });
    onStartSearch();
}
Also used : LecturesSearchRow(de.tum.in.tumcampusapp.component.tumui.lectures.model.LecturesSearchRow) Bundle(android.os.Bundle) Intent(android.content.Intent)

Aggregations

LecturesSearchRow (de.tum.in.tumcampusapp.component.tumui.lectures.model.LecturesSearchRow)6 TUMOnlineRequest (de.tum.in.tumcampusapp.api.tumonline.TUMOnlineRequest)2 LecturesSearchRowSet (de.tum.in.tumcampusapp.component.tumui.lectures.model.LecturesSearchRowSet)2 Intent (android.content.Intent)1 Bundle (android.os.Bundle)1 View (android.view.View)1 TextView (android.widget.TextView)1 NoPrivateKey (de.tum.in.tumcampusapp.api.app.exception.NoPrivateKey)1 NoResultsAdapter (de.tum.in.tumcampusapp.component.other.generic.adapter.NoResultsAdapter)1 ChatRoomController (de.tum.in.tumcampusapp.component.ui.chat.ChatRoomController)1 ChatMember (de.tum.in.tumcampusapp.component.ui.chat.model.ChatMember)1 ChatRoom (de.tum.in.tumcampusapp.component.ui.chat.model.ChatRoom)1 ChatRoomDbRow (de.tum.in.tumcampusapp.component.ui.chat.model.ChatRoomDbRow)1 IOException (java.io.IOException)1 HashSet (java.util.HashSet)1