From ec50f38eb20a3dadc521b8cfc0b0c1a459c32f79 Mon Sep 17 00:00:00 2001 From: scoute-dich Date: Tue, 8 Mar 2016 15:42:02 +0100 Subject: [PATCH] v1.1 see changelog --- CHANGELOG.md | 5 +- app/build.gradle | 4 +- .../de/baumann/diaspora/MainActivity.java | 337 +++++++++--------- .../de/baumann/diaspora/PodsActivity.java | 8 +- .../de/baumann/diaspora/ShareActivity.java | 5 +- app/src/main/res/values-de/strings.xml | 80 +++-- app/src/main/res/values/strings.xml | 95 +++-- 7 files changed, 289 insertions(+), 245 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2a220f8..7a4d9ffb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ +### v1.0.1 +- new about app and help dialogs +- better snackbar integration + ### v1.0.1 - click toolbar to load strem - ### v1.0 First release: diff --git a/app/build.gradle b/app/build.gradle index 532ce1e5..92a6b6a7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "de.baumann.diaspora" minSdkVersion 15 targetSdkVersion 23 - versionCode 2 - versionName "1.0.1" + versionCode 4 + versionName "1.1" } buildTypes { release { diff --git a/app/src/main/java/de/baumann/diaspora/MainActivity.java b/app/src/main/java/de/baumann/diaspora/MainActivity.java index 683d2115..8b6ee60e 100644 --- a/app/src/main/java/de/baumann/diaspora/MainActivity.java +++ b/app/src/main/java/de/baumann/diaspora/MainActivity.java @@ -48,6 +48,10 @@ import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; +import android.text.Html; +import android.text.SpannableString; +import android.text.method.LinkMovementMethod; +import android.text.util.Linkify; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; @@ -116,7 +120,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_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } } }); @@ -186,7 +190,7 @@ public class MainActivity extends AppCompatActivity if (Helpers.isOnline(MainActivity.this)) { webView.reload(); } else { - Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); swipeView.setRefreshing(false); } } @@ -278,7 +282,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_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } } @@ -294,7 +298,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_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } } @@ -336,7 +340,7 @@ public class MainActivity extends AppCompatActivity alert.show(); } else { - Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } } @@ -482,7 +486,7 @@ public class MainActivity extends AppCompatActivity setTitle(R.string.jb_notifications); return true; } else { - Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); return false; } } @@ -493,7 +497,7 @@ public class MainActivity extends AppCompatActivity setTitle(R.string.jb_conversations); return true; } else { - Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); return false; } } @@ -511,7 +515,7 @@ public class MainActivity extends AppCompatActivity } if (id == R.id.help_license) { - final CharSequence[] options = { getString(R.string.help_license), getString(R.string.help_help), getString(R.string.help_donate) }; + final CharSequence[] options = { getString(R.string.help_license), getString(R.string.help_about), getString(R.string.help_help), getString(R.string.help_donate) }; new AlertDialog.Builder(MainActivity.this) .setItems(options, new DialogInterface.OnClickListener() { @@ -522,30 +526,48 @@ public class MainActivity extends AppCompatActivity if (options[item].equals(getString(R.string.help_license))) { - new AlertDialog.Builder(MainActivity.this) - .setMessage(getString(R.string.about_text)) - .setPositiveButton(getString(R.string.about_yes), - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int id) { - Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/scoute-dich/Diaspora-Native-WebApp")); - startActivity(i); - dialog.cancel(); - } - }) - .setNegativeButton(getString(R.string.about_no), + final SpannableString s = new SpannableString(Html.fromHtml(getString(R.string.license_text))); + Linkify.addLinks(s, Linkify.WEB_URLS); + + final AlertDialog d = new AlertDialog.Builder(MainActivity.this) + .setTitle(R.string.license_title) + .setMessage( s ) + .setPositiveButton(getString(R.string.yes), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }).show(); + d.show(); + ((TextView)d.findViewById(android.R.id.message)).setMovementMethod(LinkMovementMethod.getInstance()); + } + + if (options[item].equals(getString(R.string.help_about))) + + { + final SpannableString s = new SpannableString(Html.fromHtml(getString(R.string.about_text))); + Linkify.addLinks(s, Linkify.WEB_URLS); + + final AlertDialog d = new AlertDialog.Builder(MainActivity.this) + .setTitle(R.string.help_about) + .setMessage(s) + .setPositiveButton(getString(R.string.yes), + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + dialog.cancel(); + } + }).show(); + d.show(); + ((TextView)d.findViewById(android.R.id.message)).setMovementMethod(LinkMovementMethod.getInstance()); } if (options[item].equals(getString(R.string.help_help))) { new AlertDialog.Builder(MainActivity.this) - .setMessage(getString(R.string.markdown_text)) - .setNegativeButton(getString(R.string.about_no), + .setTitle(R.string.help_help) + .setMessage(Html.fromHtml(getString(R.string.markdown_text))) + .setPositiveButton(getString(R.string.yes), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); @@ -558,19 +580,19 @@ public class MainActivity extends AppCompatActivity { new AlertDialog.Builder(MainActivity.this) .setMessage(getString(R.string.donate_text)) - .setPositiveButton(getString(R.string.donate_1), + .setPositiveButton(getString(R.string.yes), + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + dialog.cancel(); + } + }) + .setNegativeButton(getString(R.string.donate_1), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("http://martinv.tip.me/")); startActivity(i); dialog.cancel(); } - }) - .setNegativeButton(getString(R.string.about_no), - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int id) { - dialog.cancel(); - } }).show(); } @@ -581,48 +603,30 @@ public class MainActivity extends AppCompatActivity if (id == R.id.view) { final CharSequence[] options = { getString(R.string.settings_font), getString(R.string.settings_view),getString(R.string.settings_image) }; - new AlertDialog.Builder(MainActivity.this) - .setItems(options, new DialogInterface.OnClickListener() { + if (Helpers.isOnline(MainActivity.this)) { + new AlertDialog.Builder(MainActivity.this) + .setItems(options, new DialogInterface.OnClickListener() { - @Override + @Override - public void onClick(DialogInterface dialog, int item) { + public void onClick(DialogInterface dialog, int item) { - if (options[item].equals(getString(R.string.settings_font))) - - { - if (Helpers.isOnline(MainActivity.this)) { + if (options[item].equals(getString(R.string.settings_font))) alertFormElements(); - } else { - Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show(); - } - } - if (options[item].equals(getString(R.string.settings_view))) - - { - if (Helpers.isOnline(MainActivity.this)) { + if (options[item].equals(getString(R.string.settings_view))) webView.loadUrl("https://" + podDomain + "/mobile/toggle"); - } else { // No Internet connection - Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show(); - } - } - if (options[item].equals(getString(R.string.settings_image))) - - { - if (Helpers.isOnline(MainActivity.this)) { + if (options[item].equals(getString(R.string.settings_image))) wSettings.setLoadsImagesAutomatically(!pm.getLoadImages()); - pm.setLoadImages(!pm.getLoadImages()); - webView.loadUrl(webView.getUrl()); - } else { - Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show(); - } + pm.setLoadImages(!pm.getLoadImages()); + webView.loadUrl(webView.getUrl()); } - } - - }).show(); + }).show(); + } else { + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); + } } if (id == R.id.share) { @@ -839,7 +843,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_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } dialog.cancel(); } @@ -859,6 +863,20 @@ public class MainActivity extends AppCompatActivity if (item != null) { if (notificationCount > 0) { item.setIcon(R.drawable.ic_bell_ring_white_24dp); + Snackbar snackbar = Snackbar + .make(swipeView, R.string.new_notifications, Snackbar.LENGTH_INDEFINITE) + .setAction(R.string.yes, new View.OnClickListener() { + @Override + public void onClick(View view) { + if (Helpers.isOnline(MainActivity.this)) { + webView.loadUrl("https://" + podDomain + "/notifications"); + setTitle(R.string.jb_notifications); + } else { + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); + } + } + }); + snackbar.show(); } else { item.setIcon(R.drawable.ic_bell_outline_white_24dp); } @@ -881,6 +899,21 @@ public class MainActivity extends AppCompatActivity if (item != null) { if (conversationCount > 0) { item.setIcon(R.drawable.ic_message_text_white_24dp); + item.setIcon(R.drawable.ic_bell_ring_white_24dp); + Snackbar snackbar = Snackbar + .make(swipeView, R.string.new_conversations, Snackbar.LENGTH_INDEFINITE) + .setAction(R.string.yes, new View.OnClickListener() { + @Override + public void onClick(View view) { + if (Helpers.isOnline(MainActivity.this)) { + webView.loadUrl("https://" + podDomain + "/conversations"); + setTitle(R.string.jb_notifications); + } else { + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); + } + } + }); + snackbar.show(); } else { item.setIcon(R.drawable.ic_message_text_outline_white_24dp); } @@ -903,7 +936,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_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } } else if (id == R.id.jb_followed_tags) { @@ -911,7 +944,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_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } } else if (id == R.id.jb_aspects) { @@ -919,7 +952,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_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } } else if (id == R.id.jb_activities) { @@ -927,7 +960,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_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } } else if (id == R.id.jb_liked) { @@ -935,7 +968,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_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } } else if (id == R.id.jb_commented) { @@ -943,7 +976,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_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } } else if (id == R.id.jb_mentions) { @@ -951,7 +984,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_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } } else if (id == R.id.jb_public) { @@ -959,101 +992,55 @@ 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_LONG).show(); + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } } else if (id == R.id.jb_settings_view) { final CharSequence[] options = { getString(R.string.settings_font), getString(R.string.settings_view),getString(R.string.settings_image) }; - new AlertDialog.Builder(MainActivity.this) - .setItems(options, new DialogInterface.OnClickListener() { + if (Helpers.isOnline(MainActivity.this)) { + new AlertDialog.Builder(MainActivity.this) + .setItems(options, new DialogInterface.OnClickListener() { - @Override + @Override + public void onClick(DialogInterface dialog, int item) { - public void onClick(DialogInterface dialog, int item) { - - if (options[item].equals(getString(R.string.settings_font))) - - { - if (Helpers.isOnline(MainActivity.this)) { + if (options[item].equals(getString(R.string.settings_font))) alertFormElements(); - } else { - Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show(); - } - } - if (options[item].equals(getString(R.string.settings_view))) - - { - if (Helpers.isOnline(MainActivity.this)) { + if (options[item].equals(getString(R.string.settings_view))) webView.loadUrl("https://" + podDomain + "/mobile/toggle"); - } else { // No Internet connection - Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show(); - } - } - if (options[item].equals(getString(R.string.settings_image))) - - { - if (Helpers.isOnline(MainActivity.this)) { + if (options[item].equals(getString(R.string.settings_image))) wSettings.setLoadsImagesAutomatically(!pm.getLoadImages()); - pm.setLoadImages(!pm.getLoadImages()); - webView.loadUrl(webView.getUrl()); - } else { - Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show(); - } + pm.setLoadImages(!pm.getLoadImages()); + webView.loadUrl(webView.getUrl()); } - - } - - }).show(); + }).show(); + } else { + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); + } } else if (id == R.id.jb_settings_diaspora) { + final CharSequence[] options2 = { getString(R.string.jb_settings), getString(R.string.jb_manage_tags), getString(R.string.jb_contacts), getString(R.string.jb_pod) }; - new AlertDialog.Builder(MainActivity.this) - .setItems(options2, new DialogInterface.OnClickListener() { + if (Helpers.isOnline(MainActivity.this)) { + new AlertDialog.Builder(MainActivity.this) + .setItems(options2, new DialogInterface.OnClickListener() { - @Override + @Override + public void onClick(DialogInterface dialog, int item) { - public void onClick(DialogInterface dialog, int item) { - - if (options2[item].equals(getString(R.string.jb_settings))) - - { - setTitle(R.string.jb_settings); - if (Helpers.isOnline(MainActivity.this)) { + if (options2[item].equals(getString(R.string.jb_settings))) webView.loadUrl("https://" + podDomain + "/user/edit"); - } else { // No Internet connection - Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show(); - } - } - if (options2[item].equals(getString(R.string.jb_manage_tags))) - - { - setTitle(R.string.jb_manage_tags); - if (Helpers.isOnline(MainActivity.this)) { + if (options2[item].equals(getString(R.string.jb_manage_tags))) webView.loadUrl("https://" + podDomain + "/tag_followings/manage"); - } else { // No Internet connection - Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show(); - } - } - if (options2[item].equals(getString(R.string.jb_contacts))) - - { - setTitle(R.string.jb_contacts); - if (Helpers.isOnline(MainActivity.this)) { + if (options2[item].equals(getString(R.string.jb_contacts))) webView.loadUrl("https://" + podDomain + "/contacts"); - } else { // No Internet connection - Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show(); - } - } - if (options2[item].equals(getString(R.string.jb_pod))) - - { - if (Helpers.isOnline(MainActivity.this)) { + if (options2[item].equals(getString(R.string.jb_pod))) new AlertDialog.Builder(MainActivity.this) .setTitle(getString(R.string.confirmation)) .setMessage(getString(R.string.change_pod_warning)) @@ -1074,17 +1061,14 @@ public class MainActivity extends AppCompatActivity dialog.cancel(); } }).show(); - } else { - Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_LONG).show(); - } } - - } - - }).show(); + }).show(); + } else { + Snackbar.make(swipeView, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); + } } else if (id == R.id.jb_license_help) { - final CharSequence[] options = { getString(R.string.help_license), getString(R.string.help_help), getString(R.string.help_donate) }; + final CharSequence[] options = { getString(R.string.help_license), getString(R.string.help_about), getString(R.string.help_help), getString(R.string.help_donate) }; new AlertDialog.Builder(MainActivity.this) .setItems(options, new DialogInterface.OnClickListener() { @@ -1095,31 +1079,48 @@ public class MainActivity extends AppCompatActivity if (options[item].equals(getString(R.string.help_license))) { - new AlertDialog.Builder(MainActivity.this) - .setTitle(R.string.about_title) - .setMessage(getString(R.string.about_text)) - .setPositiveButton(getString(R.string.about_yes), - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int id) { - Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/scoute-dich/Diaspora-Native-WebApp")); - startActivity(i); - dialog.cancel(); - } - }) - .setNegativeButton(getString(R.string.about_no), + final SpannableString s = new SpannableString(Html.fromHtml(getString(R.string.license_text))); + Linkify.addLinks(s, Linkify.WEB_URLS); + + final AlertDialog d = new AlertDialog.Builder(MainActivity.this) + .setTitle(R.string.license_title) + .setMessage( s ) + .setPositiveButton(getString(R.string.yes), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }).show(); + d.show(); + ((TextView)d.findViewById(android.R.id.message)).setMovementMethod(LinkMovementMethod.getInstance()); + } + + if (options[item].equals(getString(R.string.help_about))) + + { + final SpannableString s = new SpannableString(Html.fromHtml(getString(R.string.about_text))); + Linkify.addLinks(s, Linkify.WEB_URLS); + + final AlertDialog d = new AlertDialog.Builder(MainActivity.this) + .setTitle(R.string.help_about) + .setMessage( s ) + .setPositiveButton(getString(R.string.yes), + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + dialog.cancel(); + } + }).show(); + d.show(); + ((TextView)d.findViewById(android.R.id.message)).setMovementMethod(LinkMovementMethod.getInstance()); } if (options[item].equals(getString(R.string.help_help))) { new AlertDialog.Builder(MainActivity.this) - .setMessage(getString(R.string.markdown_text)) - .setNegativeButton(getString(R.string.about_no), + .setTitle(R.string.help_help) + .setMessage(Html.fromHtml(getString(R.string.markdown_text))) + .setPositiveButton(getString(R.string.yes), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); @@ -1132,19 +1133,19 @@ public class MainActivity extends AppCompatActivity { new AlertDialog.Builder(MainActivity.this) .setMessage(getString(R.string.donate_text)) - .setPositiveButton(getString(R.string.donate_1), + .setPositiveButton(getString(R.string.yes), + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + dialog.cancel(); + } + }) + .setNegativeButton(getString(R.string.donate_1), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("http://martinv.tip.me/")); startActivity(i); dialog.cancel(); } - }) - .setNegativeButton(getString(R.string.about_no), - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int id) { - dialog.cancel(); - } }).show(); } diff --git a/app/src/main/java/de/baumann/diaspora/PodsActivity.java b/app/src/main/java/de/baumann/diaspora/PodsActivity.java index 15340cff..49ddcec8 100644 --- a/app/src/main/java/de/baumann/diaspora/PodsActivity.java +++ b/app/src/main/java/de/baumann/diaspora/PodsActivity.java @@ -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_LONG).show(); + Snackbar.make(lv, R.string.valid_pod, Snackbar.LENGTH_INDEFINITE).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_LONG).show(); + Snackbar.make(lv, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } } @@ -207,7 +207,7 @@ public class PodsActivity extends ActionBarActivity { }).show(); } else { - Snackbar.make(lv, R.string.no_internet, Snackbar.LENGTH_LONG).show(); + Snackbar.make(lv, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); } } @@ -248,7 +248,7 @@ public class PodsActivity extends ActionBarActivity { startService(i); return true; } else { - Snackbar.make(lv, R.string.no_internet, Snackbar.LENGTH_LONG).show(); + Snackbar.make(lv, R.string.no_internet, Snackbar.LENGTH_INDEFINITE).show(); return false; } } diff --git a/app/src/main/java/de/baumann/diaspora/ShareActivity.java b/app/src/main/java/de/baumann/diaspora/ShareActivity.java index 553f2502..0e8dd7fc 100644 --- a/app/src/main/java/de/baumann/diaspora/ShareActivity.java +++ b/app/src/main/java/de/baumann/diaspora/ShareActivity.java @@ -57,7 +57,6 @@ public class ShareActivity extends MainActivity { private String podDomain; private ValueCallback mFilePathCallback; private String mCameraPhotoPath; - private com.getbase.floatingactionbutton.FloatingActionsMenu fab; private TextView txtTitle; private ProgressBar progressBar; @@ -88,7 +87,7 @@ public class ShareActivity extends MainActivity { SharedPreferences config = getSharedPreferences("PodSettings", MODE_PRIVATE); podDomain = config.getString("podDomain", null); - fab = (com.getbase.floatingactionbutton.FloatingActionsMenu) findViewById(R.id.multiple_actions); + com.getbase.floatingactionbutton.FloatingActionsMenu fab = (com.getbase.floatingactionbutton.FloatingActionsMenu) findViewById(R.id.multiple_actions); fab.setVisibility(View.GONE); webView = (WebView)findViewById(R.id.webView); @@ -296,7 +295,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_INDEFINITE).show(); return false; } } diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index eda8f3d6..9b4a9336 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -1,5 +1,5 @@ - + Neu laden Pod auswählen Pod-Domain eingeben @@ -13,7 +13,7 @@ Bestätigung Willst du folgenden Pod benutzen: Möchtest du die App verlassen? - JA + OK NEIN Das wird alle Cookies und Session-Daten löschen. Willst du wirklich den Pod wechseln? @@ -75,48 +75,58 @@ Bildschirmfoto wird gespeichert... Diaspora Einstellungen Ansichtseinstellungen - OK Markdown Formatierung Lizenz - Lizenz | Hilfe | Spende - "Auf Diaspora* ist es möglich, dass du deinen Text in Nachrichten, Kommentaren und Unterhaltungen formatierst, indem du ein vereinfachtes Mark-Up-System namens Markdown verwendest. Diese Seite stellt eine kurze Einleitung dar, um grundlegende Formatierungen anwenden zu können.\n\n + Über die App | Hilfe + <i>"Auf Diaspora* ist es möglich, dass du deinen Text in Nachrichten, Kommentaren und + Unterhaltungen formatierst, indem du ein vereinfachtes Mark-Up-System namens Markdown verwendest. Diese Seite stellt + eine kurze Einleitung dar, um grundlegende Formatierungen anwenden zu können.</i><br> <br> - Überschriften\n - # das ist eine sehr große Überschrift\n - ## halb so groß wie die oben drüber\n - ### doppelt so groß wie normaler Text\n\n + <b>Überschriften</b><br> + # das ist eine sehr große Überschrift<br> + ## halb so groß wie die oben drüber<br> + ### doppelt so groß wie normaler Text<br> <br> - Kursiv und fett\n - Kursiv: *Wort* oder _Wort_\n - Fett: **Wort** oder __Wort__\n - Fett kursiv: ***Wort*** oder ___Wort___\n\n + <b>Kursiv und fett</b><br> + Kursiv: *Wort* oder _Wort_<br> + Fett: **Wort** oder __Wort__<br> + Fett kursiv: ***Wort*** oder ___Wort___<br> <br> - Aufzählung\n - *, + oder - vor jeder Linie die du als Teil der Aufzählung haben willst oder 1., 2., usw. vor jedem Aufzählungspunkt.\n\n + <b>Aufzählung</b><br> + *, + oder - vor jeder Linie die du als Teil der Aufzählung haben willst oder 1., 2., usw. vor jedem + Aufzählungspunkt.<br> <br> - Zitat\n - Wenn du einen Teil eines Artikels oder eines anderen Kommentares zitieren willst, kannst du deinen Text bequem formatieren, indem du die Zeile oder den Abschnitt mit einem > Zeichen beginnst.\n\n + <b>Zitat</b><br> + Wenn du einen Teil eines Artikels oder eines anderen Kommentares zitieren willst, kannst du deinen Text bequem formatieren, + indem du die Zeile oder den Abschnitt mit einem > Zeichen beginnst.<br> <br> - Horizontale Linie\n - Um eine horizontale Linie zu erstellen benutzt du mindestens drei - - -, _ _ _ oder * * * in einer separaten Linie. Jede größere Anzahl bewirkt dasselbe und Leerzeichen zwischen den Zeichen stören nicht.\n\n + <b>Horizontale Linie</b><br> + Um eine horizontale Linie zu erstellen benutzt du mindestens drei - - -, _ _ _ oder * * * in einer separaten Linie. + Jede größere Anzahl bewirkt dasselbe und Leerzeichen zwischen den Zeichen stören nicht.<br> <br> - Inline Link\n - [displayed text here](http://link.address.here \"alt text\") Der 'alt text' ist optional, und zeigt einen Tool-Tip, wenn der Curser sich über den Link bewegt.\n\n + <b>Inline Link</b><br> + [angezeigter Text hier](http://link.addresse.hier \"alt text\") Der 'alt text' ist optional, und zeigt einen Tool-Tip, + wenn der Curser sich über den Link bewegt.<br> <br> - Externe Bilder\n - ![Alt text](http://website.com/image.jpg \"optional title\") Der 'alt text' in der eckigen Klammer wird angezeigt, wenn das Bild nicht geladen werden kann. Der optionale Titel zeigt einen Tool-Tip, wenn der Curser sich über den Link bewegt. Beides ist nützlich aber nicht nötig.\n\n + <b>Externe Bilder</b><br> + ![Alt text](http://website.com/image.jpg \"optionaler Titel\") Der 'alt text' in der eckigen Klammer wird angezeigt, + wenn das Bild nicht geladen werden kann. Der optionale Titel zeigt einen Tool-Tip, wenn der Curser sich über den Link bewegt. + Beides ist nützlich aber nicht nötig.<br> <br> - Escape\n - Wenn du in deiner Nachricht ein Zeichen benutzen willst, das ebenfalls zur Markdownformatierung verwendet wird, kannst du verhindern, dass es von Markdown als Formatcode gelesen wird, indem du es 'escapest'. Um dies zu tun, musst du einen Backslash vor das Zeichen setzen. Du kannst trotzdem 'diaspora*' oder 'D*' schreiben, ohne dass das Sternchen als formatierender Code gelesen wird!\n\n + <b>Escape</b><br> + Wenn du in deiner Nachricht ein Zeichen benutzen willst, das ebenfalls zur Markdownformatierung verwendet wird, kannst du + verhindern, dass es von Markdown als Formatcode gelesen wird, indem du es 'escapest'. Um dies zu tun, musst du einen + Backslash vor das Zeichen setzen. Du kannst trotzdem 'diaspora*' oder 'D*' schreiben, ohne dass das Sternchen als + formatierender Code gelesen wird!<br> <br> - Sonderzeichen\n - Du kannst Symbole und Sonderzeichen nutzen, indem du bestimmte Zeichenfolgen verwendest. Z.B.:\n + <b>Sonderzeichen</b><br> + Du kannst Symbole und Sonderzeichen nutzen, indem du bestimmte Zeichenfolgen verwendest. Z.B.:<br> (c) = © ; (r) = ® ; x^2 = x²" - Besuche die Projektseite auf GitHub - Zuerst einmal: ich bin kein Entwickler. Ich verstehe ein paar Grundlagen, aber das Meiste meiner + OK + <i>Zuerst einmal: ich bin kein Entwickler. Ich verstehe ein paar Grundlagen, aber das Meiste meiner Arbeit ist mit \"Copy and Paste\" passiert. Diese App ist ein Fork der original \"DiasporaNativeWebApp\" von \"martinchodev\" (der die allermeiste Arbeit erledigt hat -> mein großer Dank gilt ihm), welche unter der GPL-Lizenz - veröffentlicht wurde.\n\n + veröffentlicht wurde.</i> <br> <br> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -129,11 +139,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program. If not, see http://www.gnu.org/licenses/.\n\n +along with this program. If not, see http://www.gnu.org/licenses.<br> <br> - Die Bilder des Startbildschirms können auf Flickr gefunden werden: - https://www.flickr.com/photos/129581906@N06/sets/72157651933980136/with/16594947123/. - Sie wurden von \"Lydia\" veröffentlicht und stehen unter der cc by-nc-sa Lizenz. + <i>Die Bilder des Startbildschirms können auf Flickr gefunden werden: + https://www.flickr.com/photos/129581906@N06/sets/72157651933980136/with/16594947123. + Sie wurden von \"Lydia\" veröffentlicht und stehen unter der cc by-nc-sa Lizenz.</i> Suche nach Personen ... Suche nach Tags ... per Bitcoin @@ -141,4 +151,6 @@ along with this program. If not, see http://www.gnu.org/licenses/.\n\n eine Kleinigkeit spenden: Spenden Startbildschirm + Ungelesene Unterhaltung. Öffnen? + Ungelesene Benachrichtigung. Lesen? diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 32acf2ba..4fa8a65d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -6,6 +6,8 @@ Close navigation drawer Diaspora Reload + Unread notification. Want to read it? + Unread conversation. Open it? You must grant \"Access Storage Permission\" to save screenshots. After that you should completely close the app or restart the phone. If you don\'t permit the storage access but want to use the screenshot function at a later time, you can grant the permission later. Please open then: systemsettings - apps - @@ -37,7 +39,7 @@ The community-run distributed social network Settings - License | Help | Donate + About the app | Help Stream Notifications Conversations @@ -66,6 +68,7 @@ License Markdown formating Donate + Changelog Taking screenshot ... @@ -87,49 +90,75 @@ //Dialog //License - "On diaspora* it's possible to format your text in status messages, comments and conversations using a simplified mark-up system called Markdown. This page gives an introduction to the codes used to create this formatting.\n\n + <i>"On diaspora* it's possible to format your text in status messages, comments + and conversations using a simplified mark-up system called Markdown. This page gives an introduction to the + codes used to create this formatting.</i><br> <br> - Heading\n - # This is an extremely large header\n - ## Half as big as the one above\n - ### Twice the size of normal text\n\n + <b>Heading</b><br> + # This is an extremely large header<br> + ## Half as big as the one above<br> + ### Twice the size of normal text<br> <br> - Italics and bold\n - Italics: *word* or _word_\n - Bold: **word** or __word__\n - Bold italics: ***word*** or ___word___\n\n + <b>Italics and bold</b><br> + Italics: *word* or _word_<br> + Bold: **word** or __word__<br> + Bold italics: ***word*** or ___word___<br> <br> - Bulleted list\n - *, + or - in front of each line you want as part of the list or 1., 2., etc. in front of the list items\n\n + <b>Bulleted list</b><br> + *, + or - in front of each line you want as part of the list or 1., 2., etc. in front of the list items<br> <br> - Quotation\n - When you want to quote an extract of an article or another comment, you can conveniently format your text by starting the line or the paragraph by the > character\n\n + <b>Quotation</b><br> + When you want to quote an extract of an article or another comment, you can conveniently format your text by starting the + line or the paragraph by the > character<br> <br> - Horizontal line\n - To create a horizontal line, use at least three - - -, _ _ _ or * * * on a separate line. Any number above three will do the same thing and spaces between the characters do not matter.\n\n + <b>Horizontal line</b><br> + To create a horizontal line, use at least three - - -, _ _ _ or * * * on a separate line. Any number above three will do + the same thing and spaces between the characters do not matter.<br> <br> - Inline link\n - [displayed text here](http://link.address.here \"alt text\") The 'alt text' is optional, and is displayed as a tool-tip when the cursor is moved over the link.\n\n + <b>Inline link</b><br> + [displayed text here](http://link.address.here \"alt text\") The 'alt text' is optional, and is displayed as a tool-tip + when the cursor is moved over the link.<br> <br> - External images\n - ![Alt text](http://website.com/image.jpg \"optional title\") The alternative text in the square brackets is displayed if the image cannot be loaded, and the optional title is displayed as a tool-tip when the cursor is moved over the image; both are useful but not essential.\n\n + <b>External images</b><br> + ![Alt text](http://website.com/image.jpg \"optional title\") The alternative text in the square brackets is displayed if the image cannot be loaded, and the optional title is displayed as a tool-tip when the cursor is moved over the image; both are useful but not essential.<br> <br> - Escape\n - If you want your message to include a character which is also used in Markdown coding, you can prevent it from being read by Markdown as a formatting code by 'escaping' it. To do this, place a backslash in front of the character. You can, however, type 'diaspora*' or 'D*' without the asterisk becoming a formatting code!\n\n + <b>Escape</b><br> + If you want your message to include a character which is also used in Markdown coding, you can prevent it from being read by Markdown as a formatting code by 'escaping' it. To do this, place a backslash in front of the character. You can, however, type 'diaspora*' or 'D*' without the asterisk becoming a formatting code!<br> <br> - Special characters\n - You can create the following symbols and other special characters using a combination of characters:\n + <b>Special characters</b><br> + You can create the following symbols and other special characters using a combination of characters:<br> (c) = © ; (r) = ® ; x^2 = x²" If you like the app fell free to donate to the devoloper of the original \"DiasporaNativeWebApp\": Via Bitcoin - Visit projectsite on Github - OK - Copyright © 2016 by scoute-dich - First of all: I am not a developer. I understand a few basics and most of my work is done + + + <b>v1.1:</b><br> + • new about app and help dialogs<br> + • better snackbar integration<br> + • click on titelbar to load stream<br><br> + + <b>v1.0.1:</b><br> + • click on titelbar to load stream<br><br> + + <b>v1.0:</b><br> + • all features of original Diaspora-Native-Webapp<br> + • popup menus (view settings, diaspora settings, share function)<br> + • share function (link, screenshot)<br> + • design improvements<br> + • implemented android marshmallow perimssion model<br> + • implemented swipe to refresh<br><br> + + <i>Projectsite on github:<br> + https://github.com/scoute-dich/Diaspora/</i> + + + OK + Copyright © 2016 by scoute-dich + <i>First of all: I am not a developer. I understand a few basics and most of my work is done by copy and paste. This app is a fork of the original \"DiasporaNativeWebApp\" - from \"martinchodev\" (who did most of the work -> big thanks to him), which is released under the GPL-license.\n\n + from \"martinchodev\" (who did most of the work -> big thanks to him), which is released under the GPL-license.</i> <br> <br> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -142,17 +171,17 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/.\n\n + along with this program. If not, see http://www.gnu.org/licenses.<br> <br> - The splashscreen images can be found on flickr: https://www.flickr.com/photos/129581906@N06/sets/72157651933980136/with/16594947123/. - They were published by \"Lydia\" and are licensed under cc by-nc-sa. + <i>The splashscreen images can be found on flickr: + https://www.flickr.com/photos/129581906@N06/sets/72157651933980136/with/16594947123. + They were published by \"Lydia\" and are licensed under cc by-nc-sa.</i> Splash screen Please reload the stream Normal Large Huge - Unable to get image