mirror of
https://github.com/gsantner/dandelion
synced 2025-09-09 18:29:47 +02:00
click toolbar to load stream
This commit is contained in:
parent
f196a60919
commit
05bc47c32c
3 changed files with 15 additions and 3 deletions
|
@ -109,6 +109,18 @@ public class MainActivity extends AppCompatActivity
|
|||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
toolbar.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (Helpers.isOnline(MainActivity.this)) {
|
||||
webView.loadUrl("https://" + podDomain + "/stream");
|
||||
setTitle(R.string.jb_stream);
|
||||
} else {
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
|
||||
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue