mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 04:12:08 +01:00
Share screenshot fix; Minor Aspects rework
This commit is contained in:
parent
a1962a723d
commit
6003cdfb7e
3 changed files with 10 additions and 14 deletions
|
@ -697,10 +697,9 @@ public class MainActivity extends AppCompatActivity
|
|||
|
||||
Date dateNow = new Date();
|
||||
DateFormat dateFormat = new SimpleDateFormat("yy_MM_dd--HH_mm_ss", Locale.getDefault());
|
||||
File fileSaveDirectory = new File(hasToShareScreenshot ? getCacheDir().getAbsolutePath()
|
||||
: Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + "/Diaspora");
|
||||
File fileSaveDirectory = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + "/Diaspora");
|
||||
|
||||
String fileSaveName = String.format("DfA_%s.jpg", hasToShareScreenshot ? "share" : dateFormat.format(dateNow));
|
||||
String fileSaveName = hasToShareScreenshot ? ".DfA_share.jpg" : String.format("DfA_%s.jpg", dateFormat.format(dateNow));
|
||||
if (!fileSaveDirectory.exists()) {
|
||||
fileSaveDirectory.mkdirs();
|
||||
}
|
||||
|
@ -739,8 +738,7 @@ public class MainActivity extends AppCompatActivity
|
|||
Uri bmpUri = Uri.fromFile(new File(fileSaveDirectory, fileSaveName));
|
||||
sharingIntent.putExtra(Intent.EXTRA_STREAM, bmpUri);
|
||||
startActivity(Intent.createChooser(sharingIntent, getString(R.string.share_dotdotdot)));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// Broadcast that this file is indexable
|
||||
File file = new File(fileSaveDirectory, fileSaveName);
|
||||
Uri uri = Uri.fromFile(file);
|
||||
|
|
|
@ -95,19 +95,17 @@ public class Helpers {
|
|||
public static void showAspectList(final WebView wv, final App app) {
|
||||
wv.stopLoading();
|
||||
PodUserProfile profile = app.getPodUserProfile();
|
||||
StringBuffer sb = new StringBuffer();
|
||||
int intColor = ContextCompat.getColor(app, R.color.colorAccent);
|
||||
String strColor = String.format("#%06X", (0xFFFFFF & intColor));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append("<html><body style='margin-top: 25px; margin-left:auto;margin-right:auto; font-size: 400%;'>");
|
||||
|
||||
sb.append("<html><body style='width:80%; margin-left:auto;margin-right:auto; font-size: 400%;'><center><b>");
|
||||
sb.append(String.format("<h1 style='color: %s; text-shadow: 4px 4px 12px #000000;'>%s</h1>", strColor, app.getString(R.string.jb_aspects)));
|
||||
sb.append("</b></center>");
|
||||
// Content
|
||||
for (PodAspect aspect : profile.getAspects()) {
|
||||
sb.append("» ");
|
||||
sb.append("<span style='margin-left: 30px; '></span>» ");
|
||||
sb.append(aspect.toHtmlLink(app));
|
||||
sb.append("</br></br>");
|
||||
sb.append("<hr style='height:5px;' />");
|
||||
}
|
||||
|
||||
// End
|
||||
sb.append("</body></html>");
|
||||
wv.loadData(sb.toString(), "text/html", "UTF-16");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<group android:checkableBehavior="single">
|
||||
<group android:checkableBehavior="none">
|
||||
<item
|
||||
android:id="@+id/nav_stream"
|
||||
android:icon="@drawable/jb_stream"
|
||||
|
|
Loading…
Reference in a new issue