1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-11-22 12:22:08 +01:00
This commit is contained in:
scoute-dich 2016-03-22 21:42:21 +01:00
parent 773cd41dd7
commit 137c473c2f
7 changed files with 45 additions and 51 deletions

View file

@ -10,7 +10,8 @@
android:allowBackup="true" android:allowBackup="true"
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme" > android:theme="@style/AppTheme"
android:windowSoftInputMode="adjustResize" >
<activity <activity
android:name=".SplashActivity" android:name=".SplashActivity"
android:launchMode="singleInstance" android:launchMode="singleInstance"
@ -47,7 +48,7 @@
android:label="@string/new_post" android:label="@string/new_post"
android:theme="@style/AppTheme.NoActionBar" android:theme="@style/AppTheme.NoActionBar"
android:screenOrientation="portrait" > android:screenOrientation="portrait" >
<intent-filter android:label="@string/diaspora" <intent-filter android:label="@string/new_post1"
android:icon="@drawable/ic_launcher"> android:icon="@drawable/ic_launcher">
<action android:name="android.intent.action.SEND" /> <action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@ -59,10 +60,10 @@
android:name=".ShareActivity2" android:name=".ShareActivity2"
android:launchMode="singleInstance" android:launchMode="singleInstance"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/new_post2" android:label="@string/new_post"
android:theme="@style/AppTheme.NoActionBar" android:theme="@style/AppTheme.NoActionBar"
android:screenOrientation="portrait" > android:screenOrientation="portrait" >
<intent-filter android:label="@string/diaspora" <intent-filter android:label="@string/new_post2"
android:icon="@drawable/ic_launcher"> android:icon="@drawable/ic_launcher">
<action android:name="android.intent.action.SEND" /> <action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />

View file

@ -121,7 +121,7 @@ public class MainActivity extends AppCompatActivity
webView.loadUrl("https://" + podDomain + "/stream"); webView.loadUrl("https://" + podDomain + "/stream");
setTitle(R.string.jb_stream); setTitle(R.string.jb_stream);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
}); });
@ -195,7 +195,7 @@ public class MainActivity extends AppCompatActivity
if (Helpers.isOnline(MainActivity.this)) { if (Helpers.isOnline(MainActivity.this)) {
webView.reload(); webView.reload();
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
swipeView.setRefreshing(false); swipeView.setRefreshing(false);
} }
} }
@ -284,7 +284,7 @@ public class MainActivity extends AppCompatActivity
webView.loadData("", "text/html", null); webView.loadData("", "text/html", null);
webView.loadUrl("https://" + podDomain); webView.loadUrl("https://" + podDomain);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
@ -300,7 +300,7 @@ public class MainActivity extends AppCompatActivity
webView.loadUrl("https://" + podDomain + "/status_messages/new"); webView.loadUrl("https://" + podDomain + "/status_messages/new");
setTitle(R.string.fab1_title); setTitle(R.string.fab1_title);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
@ -343,7 +343,7 @@ public class MainActivity extends AppCompatActivity
}); });
dialog.show(); dialog.show();
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
@ -414,15 +414,6 @@ public class MainActivity extends AppCompatActivity
if (webView.canGoBack()) { if (webView.canGoBack()) {
webView.goBack(); webView.goBack();
setTitle(R.string.app_name); setTitle(R.string.app_name);
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();
} else { } else {
Snackbar snackbar = Snackbar Snackbar snackbar = Snackbar
.make(swipeView, R.string.confirm_exit, Snackbar.LENGTH_LONG) .make(swipeView, R.string.confirm_exit, Snackbar.LENGTH_LONG)
@ -488,7 +479,7 @@ public class MainActivity extends AppCompatActivity
setTitle(R.string.jb_notifications); setTitle(R.string.jb_notifications);
return true; return true;
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
return false; return false;
} }
} }
@ -499,7 +490,7 @@ public class MainActivity extends AppCompatActivity
setTitle(R.string.jb_conversations); setTitle(R.string.jb_conversations);
return true; return true;
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
return false; return false;
} }
} }
@ -697,7 +688,7 @@ public class MainActivity extends AppCompatActivity
if (Helpers.isOnline(MainActivity.this)) { if (Helpers.isOnline(MainActivity.this)) {
webView.loadUrl(webView.getUrl()); webView.loadUrl(webView.getUrl());
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
dialog.cancel(); dialog.cancel();
} }
@ -718,7 +709,7 @@ public class MainActivity extends AppCompatActivity
if (notificationCount > 0) { if (notificationCount > 0) {
item.setIcon(R.drawable.ic_bell_ring_white_24dp); item.setIcon(R.drawable.ic_bell_ring_white_24dp);
Snackbar snackbar = Snackbar Snackbar snackbar = Snackbar
.make(swipeView, R.string.new_notifications, Snackbar.LENGTH_INDEFINITE) .make(swipeView, R.string.new_notifications, Snackbar.LENGTH_LONG)
.setAction(R.string.yes, new View.OnClickListener() { .setAction(R.string.yes, new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@ -726,7 +717,7 @@ public class MainActivity extends AppCompatActivity
webView.loadUrl("https://" + podDomain + "/notifications"); webView.loadUrl("https://" + podDomain + "/notifications");
setTitle(R.string.jb_notifications); setTitle(R.string.jb_notifications);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
}); });
@ -764,7 +755,7 @@ public class MainActivity extends AppCompatActivity
if (conversationCount > 0) { if (conversationCount > 0) {
item.setIcon(R.drawable.ic_message_text_white_24dp); item.setIcon(R.drawable.ic_message_text_white_24dp);
Snackbar snackbar = Snackbar Snackbar snackbar = Snackbar
.make(swipeView, R.string.new_conversations, Snackbar.LENGTH_INDEFINITE) .make(swipeView, R.string.new_conversations, Snackbar.LENGTH_LONG)
.setAction(R.string.yes, new View.OnClickListener() { .setAction(R.string.yes, new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@ -772,7 +763,7 @@ public class MainActivity extends AppCompatActivity
webView.loadUrl("https://" + podDomain + "/conversations"); webView.loadUrl("https://" + podDomain + "/conversations");
setTitle(R.string.jb_notifications); setTitle(R.string.jb_notifications);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
}); });
@ -798,7 +789,7 @@ public class MainActivity extends AppCompatActivity
webView.loadUrl("https://" + podDomain + "/stream"); webView.loadUrl("https://" + podDomain + "/stream");
setTitle(R.string.jb_stream); setTitle(R.string.jb_stream);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
break; break;
@ -808,7 +799,7 @@ public class MainActivity extends AppCompatActivity
webView.loadUrl("https://" + podDomain + "/people/" + profileId); webView.loadUrl("https://" + podDomain + "/people/" + profileId);
setTitle(R.string.jb_profile); setTitle(R.string.jb_profile);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
break; break;
@ -819,7 +810,7 @@ public class MainActivity extends AppCompatActivity
webView.loadUrl("https://" + podDomain + "/followed_tags"); webView.loadUrl("https://" + podDomain + "/followed_tags");
setTitle(R.string.jb_followed_tags); setTitle(R.string.jb_followed_tags);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
break; break;
@ -829,7 +820,7 @@ public class MainActivity extends AppCompatActivity
webView.loadUrl("https://" + podDomain + "/aspects"); webView.loadUrl("https://" + podDomain + "/aspects");
setTitle(R.string.jb_aspects); setTitle(R.string.jb_aspects);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
break; break;
@ -839,7 +830,7 @@ public class MainActivity extends AppCompatActivity
webView.loadUrl("https://" + podDomain + "/activity"); webView.loadUrl("https://" + podDomain + "/activity");
setTitle(R.string.jb_activities); setTitle(R.string.jb_activities);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
break; break;
@ -849,7 +840,7 @@ public class MainActivity extends AppCompatActivity
webView.loadUrl("https://" + podDomain + "/liked"); webView.loadUrl("https://" + podDomain + "/liked");
setTitle(R.string.jb_liked); setTitle(R.string.jb_liked);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
break; break;
@ -859,7 +850,7 @@ public class MainActivity extends AppCompatActivity
webView.loadUrl("https://" + podDomain + "/commented"); webView.loadUrl("https://" + podDomain + "/commented");
setTitle(R.string.jb_commented); setTitle(R.string.jb_commented);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
break; break;
@ -869,7 +860,7 @@ public class MainActivity extends AppCompatActivity
webView.loadUrl("https://" + podDomain + "/mentions"); webView.loadUrl("https://" + podDomain + "/mentions");
setTitle(R.string.jb_mentions); setTitle(R.string.jb_mentions);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
break; break;
@ -879,7 +870,7 @@ public class MainActivity extends AppCompatActivity
webView.loadUrl("https://" + podDomain + "/public"); webView.loadUrl("https://" + podDomain + "/public");
setTitle(R.string.jb_public); setTitle(R.string.jb_public);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
break; break;
@ -902,7 +893,7 @@ public class MainActivity extends AppCompatActivity
} }
}).show(); }).show();
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
break; break;
@ -945,7 +936,7 @@ public class MainActivity extends AppCompatActivity
} }
}).show(); }).show();
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
break; break;

View file

@ -77,7 +77,7 @@ public class PodsActivity extends ActionBarActivity {
if (filter.getText().length() > 4 && filter.getText().toString().contains(".")) if (filter.getText().length() > 4 && filter.getText().toString().contains("."))
askConfirmation(filter.getText().toString()); askConfirmation(filter.getText().toString());
else else
Snackbar.make(lv, R.string.valid_pod, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(lv, R.string.valid_pod, Snackbar.LENGTH_LONG).show();
} }
}); });
@ -112,7 +112,7 @@ public class PodsActivity extends ActionBarActivity {
if (Helpers.isOnline(PodsActivity.this)) { if (Helpers.isOnline(PodsActivity.this)) {
progressDialog.show(); progressDialog.show();
} else { } else {
Snackbar.make(lv, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(lv, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
@ -207,7 +207,7 @@ public class PodsActivity extends ActionBarActivity {
}).show(); }).show();
} else { } else {
Snackbar.make(lv, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(lv, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
@ -248,7 +248,7 @@ public class PodsActivity extends ActionBarActivity {
startService(i); startService(i);
return true; return true;
} else { } else {
Snackbar.make(lv, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(lv, R.string.no_internet, Snackbar.LENGTH_LONG).show();
return false; return false;
} }
} }

View file

@ -85,7 +85,7 @@ public class ShareActivity extends MainActivity {
startActivityForResult(intent, 100); startActivityForResult(intent, 100);
overridePendingTransition(0, 0); overridePendingTransition(0, 0);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
}); });
@ -143,7 +143,7 @@ public class ShareActivity extends MainActivity {
if (Helpers.isOnline(ShareActivity.this)) { if (Helpers.isOnline(ShareActivity.this)) {
webView.reload(); webView.reload();
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
swipeView.setRefreshing(false); swipeView.setRefreshing(false);
} }
} }
@ -188,7 +188,7 @@ public class ShareActivity extends MainActivity {
takePictureIntent.putExtra("PhotoPath", mCameraPhotoPath); takePictureIntent.putExtra("PhotoPath", mCameraPhotoPath);
} catch (IOException ex) { } catch (IOException ex) {
// Error occurred while creating the File // Error occurred while creating the File
Snackbar.make(getWindow().findViewById(R.id.drawer_layout), "Unable to get image", Snackbar.LENGTH_SHORT).show(); Snackbar.make(getWindow().findViewById(R.id.drawer_layout), "Unable to get image", Snackbar.LENGTH_LONG).show();
} }
// Continue only if the File was successfully created // Continue only if the File was successfully created
@ -278,7 +278,7 @@ public class ShareActivity extends MainActivity {
if (Helpers.isOnline(ShareActivity.this)) { if (Helpers.isOnline(ShareActivity.this)) {
webView.loadUrl("https://"+podDomain+"/status_messages/new"); webView.loadUrl("https://"+podDomain+"/status_messages/new");
} else { } else {
Snackbar.make(getWindow().findViewById(R.id.drawer_layout), R.string.no_internet, Snackbar.LENGTH_SHORT).show(); Snackbar.make(getWindow().findViewById(R.id.drawer_layout), R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
@ -337,7 +337,7 @@ public class ShareActivity extends MainActivity {
webView.reload(); webView.reload();
return true; return true;
} else { } else {
Snackbar.make(getWindow().findViewById(R.id.drawer_layout), R.string.no_internet, Snackbar.LENGTH_SHORT).show(); Snackbar.make(getWindow().findViewById(R.id.drawer_layout), R.string.no_internet, Snackbar.LENGTH_LONG).show();
return false; return false;
} }
} }

View file

@ -85,7 +85,7 @@ public class ShareActivity2 extends MainActivity {
startActivityForResult(intent, 100); startActivityForResult(intent, 100);
overridePendingTransition(0, 0); overridePendingTransition(0, 0);
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
} }
} }
}); });
@ -143,7 +143,7 @@ public class ShareActivity2 extends MainActivity {
if (Helpers.isOnline(ShareActivity2.this)) { if (Helpers.isOnline(ShareActivity2.this)) {
webView.reload(); webView.reload();
} else { } else {
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
swipeView.setRefreshing(false); swipeView.setRefreshing(false);
} }
} }

View file

@ -58,7 +58,7 @@
//Dialog //Dialog
<string name="messages">Unterhaltungen</string> <string name="messages">Unterhaltungen</string>
<string name="new_post">Nur Text</string> <string name="new_post">Neuer Beitrag</string>
<string name="notifications">Benachrichtigungen</string> <string name="notifications">Benachrichtigungen</string>
<string name="settings_font">Schriftgröße ändern</string> <string name="settings_font">Schriftgröße ändern</string>
<string name="settings_image">Bilder laden umschalten</string> <string name="settings_image">Bilder laden umschalten</string>
@ -154,7 +154,8 @@ along with this program. If not, see http://www.gnu.org/licenses.&lt;br> &lt;br
<string name="new_conversations">Ungelesene Unterhaltung. Öffnen?</string> <string name="new_conversations">Ungelesene Unterhaltung. Öffnen?</string>
<string name="new_notifications">Ungelesene Benachrichtigung. Lesen?</string> <string name="new_notifications">Ungelesene Benachrichtigung. Lesen?</string>
<string name="help_about">Changelog</string> <string name="help_about">Changelog</string>
<string name="new_post2">Titel und Text</string> <string name="new_post2">D* Titel und Text</string>
<string name="jb_profile">Profil</string> <string name="jb_profile">Profil</string>
<string name="new_post1">D* nur Text</string>
</resources> </resources>

View file

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