forked from EventFahrplan/EventFahrplan
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request EventFahrplan#681 from EventFahrplan/search-functi…
…onality Add search functionality.
- Loading branch information
Showing
34 changed files
with
1,682 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
app/src/main/java/nerd/tuxmobil/fahrplan/congress/search/SearchActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package nerd.tuxmobil.fahrplan.congress.search | ||
|
||
import android.content.Context | ||
import android.content.Intent | ||
import android.os.Bundle | ||
import nerd.tuxmobil.fahrplan.congress.R | ||
import nerd.tuxmobil.fahrplan.congress.base.AbstractListFragment.OnSessionListClick | ||
import nerd.tuxmobil.fahrplan.congress.base.BaseActivity | ||
import nerd.tuxmobil.fahrplan.congress.details.SessionDetailsActivity | ||
import nerd.tuxmobil.fahrplan.congress.repositories.AppRepository | ||
|
||
class SearchActivity : | ||
BaseActivity(), | ||
OnSessionListClick { | ||
|
||
companion object { | ||
fun start(context: Context) { | ||
val intent = Intent(context, SearchActivity::class.java) | ||
context.startActivity(intent) | ||
} | ||
} | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_search) | ||
if (savedInstanceState == null) { | ||
addFragment(R.id.container, SearchFragment(), SearchFragment.FRAGMENT_TAG) | ||
} | ||
} | ||
|
||
override fun onSessionListClick(sessionId: String) { | ||
if (AppRepository.updateSelectedSessionId(sessionId)) { | ||
SessionDetailsActivity.start(this) | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.