mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 04:12:08 +01:00
snackbar
This commit is contained in:
parent
773cd41dd7
commit
137c473c2f
7 changed files with 45 additions and 51 deletions
|
@ -10,7 +10,8 @@
|
|||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme" >
|
||||
android:theme="@style/AppTheme"
|
||||
android:windowSoftInputMode="adjustResize" >
|
||||
<activity
|
||||
android:name=".SplashActivity"
|
||||
android:launchMode="singleInstance"
|
||||
|
@ -47,7 +48,7 @@
|
|||
android:label="@string/new_post"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:screenOrientation="portrait" >
|
||||
<intent-filter android:label="@string/diaspora"
|
||||
<intent-filter android:label="@string/new_post1"
|
||||
android:icon="@drawable/ic_launcher">
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
@ -59,10 +60,10 @@
|
|||
android:name=".ShareActivity2"
|
||||
android:launchMode="singleInstance"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:label="@string/new_post2"
|
||||
android:label="@string/new_post"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:screenOrientation="portrait" >
|
||||
<intent-filter android:label="@string/diaspora"
|
||||
<intent-filter android:label="@string/new_post2"
|
||||
android:icon="@drawable/ic_launcher">
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
|
|
@ -121,7 +121,7 @@ public class MainActivity extends AppCompatActivity
|
|||
webView.loadUrl("https://" + podDomain + "/stream");
|
||||
setTitle(R.string.jb_stream);
|
||||
} 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)) {
|
||||
webView.reload();
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ public class MainActivity extends AppCompatActivity
|
|||
webView.loadData("", "text/html", null);
|
||||
webView.loadUrl("https://" + podDomain);
|
||||
} 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");
|
||||
setTitle(R.string.fab1_title);
|
||||
} 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();
|
||||
} 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()) {
|
||||
webView.goBack();
|
||||
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 {
|
||||
Snackbar snackbar = Snackbar
|
||||
.make(swipeView, R.string.confirm_exit, Snackbar.LENGTH_LONG)
|
||||
|
@ -488,7 +479,7 @@ public class MainActivity extends AppCompatActivity
|
|||
setTitle(R.string.jb_notifications);
|
||||
return true;
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
@ -499,7 +490,7 @@ public class MainActivity extends AppCompatActivity
|
|||
setTitle(R.string.jb_conversations);
|
||||
return true;
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
@ -697,7 +688,7 @@ public class MainActivity extends AppCompatActivity
|
|||
if (Helpers.isOnline(MainActivity.this)) {
|
||||
webView.loadUrl(webView.getUrl());
|
||||
} 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();
|
||||
}
|
||||
|
@ -718,7 +709,7 @@ public class MainActivity extends AppCompatActivity
|
|||
if (notificationCount > 0) {
|
||||
item.setIcon(R.drawable.ic_bell_ring_white_24dp);
|
||||
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() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
@ -726,7 +717,7 @@ public class MainActivity extends AppCompatActivity
|
|||
webView.loadUrl("https://" + podDomain + "/notifications");
|
||||
setTitle(R.string.jb_notifications);
|
||||
} 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) {
|
||||
item.setIcon(R.drawable.ic_message_text_white_24dp);
|
||||
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() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
@ -772,7 +763,7 @@ public class MainActivity extends AppCompatActivity
|
|||
webView.loadUrl("https://" + podDomain + "/conversations");
|
||||
setTitle(R.string.jb_notifications);
|
||||
} 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");
|
||||
setTitle(R.string.jb_stream);
|
||||
} else {
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show();
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -808,7 +799,7 @@ public class MainActivity extends AppCompatActivity
|
|||
webView.loadUrl("https://" + podDomain + "/people/" + profileId);
|
||||
setTitle(R.string.jb_profile);
|
||||
} else {
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show();
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -819,7 +810,7 @@ public class MainActivity extends AppCompatActivity
|
|||
webView.loadUrl("https://" + podDomain + "/followed_tags");
|
||||
setTitle(R.string.jb_followed_tags);
|
||||
} else {
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show();
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -829,7 +820,7 @@ public class MainActivity extends AppCompatActivity
|
|||
webView.loadUrl("https://" + podDomain + "/aspects");
|
||||
setTitle(R.string.jb_aspects);
|
||||
} else {
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show();
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -839,7 +830,7 @@ public class MainActivity extends AppCompatActivity
|
|||
webView.loadUrl("https://" + podDomain + "/activity");
|
||||
setTitle(R.string.jb_activities);
|
||||
} else {
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show();
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -849,7 +840,7 @@ public class MainActivity extends AppCompatActivity
|
|||
webView.loadUrl("https://" + podDomain + "/liked");
|
||||
setTitle(R.string.jb_liked);
|
||||
} else {
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show();
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -859,7 +850,7 @@ public class MainActivity extends AppCompatActivity
|
|||
webView.loadUrl("https://" + podDomain + "/commented");
|
||||
setTitle(R.string.jb_commented);
|
||||
} else {
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show();
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -869,7 +860,7 @@ public class MainActivity extends AppCompatActivity
|
|||
webView.loadUrl("https://" + podDomain + "/mentions");
|
||||
setTitle(R.string.jb_mentions);
|
||||
} else {
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show();
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -879,7 +870,7 @@ public class MainActivity extends AppCompatActivity
|
|||
webView.loadUrl("https://" + podDomain + "/public");
|
||||
setTitle(R.string.jb_public);
|
||||
} else {
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show();
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -902,7 +893,7 @@ public class MainActivity extends AppCompatActivity
|
|||
}
|
||||
}).show();
|
||||
} else {
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show();
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -945,7 +936,7 @@ public class MainActivity extends AppCompatActivity
|
|||
}
|
||||
}).show();
|
||||
} else {
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show();
|
||||
Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -77,7 +77,7 @@ public class PodsActivity extends ActionBarActivity {
|
|||
if (filter.getText().length() > 4 && filter.getText().toString().contains("."))
|
||||
askConfirmation(filter.getText().toString());
|
||||
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)) {
|
||||
progressDialog.show();
|
||||
} 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();
|
||||
|
||||
} 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);
|
||||
return true;
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class ShareActivity extends MainActivity {
|
|||
startActivityForResult(intent, 100);
|
||||
overridePendingTransition(0, 0);
|
||||
} 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)) {
|
||||
webView.reload();
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ public class ShareActivity extends MainActivity {
|
|||
takePictureIntent.putExtra("PhotoPath", mCameraPhotoPath);
|
||||
} catch (IOException ex) {
|
||||
// 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
|
||||
|
@ -278,7 +278,7 @@ public class ShareActivity extends MainActivity {
|
|||
if (Helpers.isOnline(ShareActivity.this)) {
|
||||
webView.loadUrl("https://"+podDomain+"/status_messages/new");
|
||||
} 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();
|
||||
return true;
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class ShareActivity2 extends MainActivity {
|
|||
startActivityForResult(intent, 100);
|
||||
overridePendingTransition(0, 0);
|
||||
} 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)) {
|
||||
webView.reload();
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
//Dialog
|
||||
<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="settings_font">Schriftgröße ändern</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.<br> <br
|
|||
<string name="new_conversations">Ungelesene Unterhaltung. Öffnen?</string>
|
||||
<string name="new_notifications">Ungelesene Benachrichtigung. Lesen?</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="new_post1">D* nur Text</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -31,8 +31,9 @@
|
|||
<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">Text only</string>
|
||||
<string name="new_post2">Title and text</string>
|
||||
<string name="new_post">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>
|
||||
<string name="messages">Conversations</string>
|
||||
|
||||
|
|
Loading…
Reference in a new issue