Commit c3794c5e authored by Tim Schumacher's avatar Tim Schumacher Committed by luca020400

Hide Sheet Menu after clicking on an entry

Change-Id: Iccf611765de91419c7329b1d980006ecf691bf78
parent 4e7e82e8
...@@ -486,11 +486,23 @@ public class MainActivity extends WebViewExtActivity implements View.OnTouchList ...@@ -486,11 +486,23 @@ public class MainActivity extends WebViewExtActivity implements View.OnTouchList
View favouriteLayout = view.findViewById(R.id.sheet_favourite); View favouriteLayout = view.findViewById(R.id.sheet_favourite);
View downloadLayout = view.findViewById(R.id.sheet_download); View downloadLayout = view.findViewById(R.id.sheet_download);
tabLayout.setOnClickListener(v -> openInNewTab(url, mIncognito)); tabLayout.setOnClickListener(v -> {
shareLayout.setOnClickListener(v -> shareUrl(url)); openInNewTab(url, mIncognito);
favouriteLayout.setOnClickListener(v -> setAsFavorite(url, url)); sheet.dismiss();
});
shareLayout.setOnClickListener(v -> {
shareUrl(url);
sheet.dismiss();
});
favouriteLayout.setOnClickListener(v -> {
setAsFavorite(url, url);
sheet.dismiss();
});
if (shouldAllowDownload) { if (shouldAllowDownload) {
downloadLayout.setOnClickListener(v -> downloadFileAsk(url, null, null)); downloadLayout.setOnClickListener(v -> {
downloadFileAsk(url, null, null);
sheet.dismiss();
});
downloadLayout.setVisibility(View.VISIBLE); downloadLayout.setVisibility(View.VISIBLE);
} }
sheet.setContentView(view); sheet.setContentView(view);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment