1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2025-12-08 21:31:10 +01:00

removed swipeviewfunction from share activities, removed snackbar on menu - exit

This commit is contained in:
scoute-dich 2016-03-23 21:07:53 +01:00
parent 07bb60ee97
commit 1fcafa088f
7 changed files with 13 additions and 61 deletions

View file

@ -496,15 +496,7 @@ public class MainActivity extends AppCompatActivity
}
case R.id.action_exit: {
Snackbar snackbar = Snackbar
.make(swipeView, R.string.confirm_exit, Snackbar.LENGTH_LONG)
.setAction(R.string.yes, new View.OnClickListener() {
@Override
public void onClick(View view) {
moveTaskToBack(true);
}
});
snackbar.show();
moveTaskToBack(true);
}
break;

View file

@ -74,8 +74,7 @@ public class ShareActivity extends MainActivity {
progressBar = (ProgressBar)findViewById(R.id.progressBar);
swipeView = (SwipeRefreshLayout) findViewById(R.id.swipe);
swipeView.setColorSchemeResources(R.color.colorPrimary,
R.color.fab_big);
swipeView.setEnabled(false);
toolbar.setOnClickListener(new View.OnClickListener() {
@Override
@ -137,18 +136,6 @@ public class ShareActivity extends MainActivity {
}
});
swipeView.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
if (Helpers.isOnline(ShareActivity.this)) {
webView.reload();
} else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
swipeView.setRefreshing(false);
}
}
});
/*
* WebChromeClient
@ -332,14 +319,8 @@ public class ShareActivity extends MainActivity {
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_reload) {
if (Helpers.isOnline(ShareActivity.this)) {
webView.reload();
return true;
} else {
Snackbar.make(getWindow().findViewById(R.id.drawer_layout), R.string.no_internet, Snackbar.LENGTH_LONG).show();
return false;
}
if (id == R.id.action_exit) {
moveTaskToBack(true);
}
return super.onOptionsItemSelected(item);

View file

@ -74,8 +74,7 @@ public class ShareActivity2 extends MainActivity {
progressBar = (ProgressBar)findViewById(R.id.progressBar);
swipeView = (SwipeRefreshLayout) findViewById(R.id.swipe);
swipeView.setColorSchemeResources(R.color.colorPrimary,
R.color.fab_big);
swipeView.setEnabled(false);
toolbar.setOnClickListener(new View.OnClickListener() {
@Override
@ -137,18 +136,6 @@ public class ShareActivity2 extends MainActivity {
}
});
swipeView.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
if (Helpers.isOnline(ShareActivity2.this)) {
webView.reload();
} else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
swipeView.setRefreshing(false);
}
}
});
/*
* WebChromeClient
@ -333,14 +320,8 @@ public class ShareActivity2 extends MainActivity {
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_reload) {
if (Helpers.isOnline(ShareActivity2.this)) {
webView.reload();
return true;
} else {
Snackbar.make(getWindow().findViewById(R.id.drawer_layout), R.string.no_internet, Snackbar.LENGTH_SHORT).show();
return false;
}
if (id == R.id.action_exit) {
moveTaskToBack(true);
}
return super.onOptionsItemSelected(item);