1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-11-22 04:12:08 +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

@ -10,8 +10,7 @@
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:windowSoftInputMode="adjustResize" >
android:theme="@style/AppTheme" >
<activity
android:name=".SplashActivity"
android:launchMode="singleInstance"

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);

View file

@ -3,11 +3,10 @@
xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
<item
android:id="@+id/action_reload"
android:id="@+id/action_exit"
android:icon="@drawable/ic_sync_white_24dp"
android:title="@string/reload"
android:orderInCategory="109"
app:showAsAction="ifRoom" />
android:title="@string/exit_app"
app:showAsAction="never" />
<!--<item-->
<!--android:id="@+id/exit_app"-->

View file

@ -58,7 +58,7 @@
//Dialog
<string name="messages">Unterhaltungen</string>
<string name="new_post">Neuer Beitrag</string>
<string name="new_post">D* Neuer Beitrag</string>
<string name="notifications">Benachrichtigungen</string>
<string name="settings_font">Schriftgröße ändern</string>
<string name="settings_image">Bilder laden umschalten</string>

View file

@ -31,7 +31,7 @@
<string name="yes">YES</string>
<string name="no">NO</string>
<string name="change_pod_warning">This will erase all cookies and session data. Do you really want to change pods?</string>
<string name="new_post">New message</string>
<string name="new_post">D* New message</string>
<string name="new_post1">D* Text only</string>
<string name="new_post2">D* Title and text</string>
<string name="notifications">Notifications</string>