{
+ UrlDrawable urlDrawable;
+
+ public ImageGetterAsyncTask(UrlDrawable d) {
+ this.urlDrawable = d;
+ }
+
+ @Override
+ protected Drawable doInBackground(String... params) {
+ String source = params[0];
+ return fetchDrawable(source);
+ }
+
+ @Override
+ protected void onPostExecute(Drawable result) {
+ // set the correct bound according to the result from HTTP call
+ urlDrawable.setBounds(0, 0, 0 + result.getIntrinsicWidth(), 0 + result.getIntrinsicHeight());
+
+ // change the reference of the current drawable to the result from the HTTP call
+ urlDrawable.drawable = result;
+
+ // redraw the image by invalidating the container
+ UrlImageGetter.this.container.invalidate();
+ }
+
+ /**
+ * Get the Drawable from URL
+ *
+ * @param urlString
+ * @return
+ */
+ public Drawable fetchDrawable(String urlString) {
+ try {
+ InputStream is = fetch(urlString);
+ Drawable drawable = Drawable.createFromStream(is, "src");
+ drawable.setBounds(0, 0, 0 + drawable.getIntrinsicWidth(), 0 + drawable.getIntrinsicHeight());
+ return drawable;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ private InputStream fetch(String urlString) throws MalformedURLException, IOException {
+ DefaultHttpClient httpClient = new DefaultHttpClient();
+ HttpGet request = new HttpGet(urlString);
+ HttpResponse response = httpClient.execute(request);
+ return response.getEntity().getContent();
+ }
+ }
+
+ @SuppressWarnings("deprecation")
+ public class UrlDrawable extends BitmapDrawable {
+ protected Drawable drawable;
+
+ @Override
+ public void draw(Canvas canvas) {
+ // override the draw to facilitate refresh function later
+ if (drawable != null) {
+ drawable.draw(canvas);
+ }
+ }
+ }
+}
diff --git a/app/src/main/res/layout/activity_help.xml b/app/src/main/res/layout/activity_help.xml
new file mode 100644
index 0000000..eac6266
--- /dev/null
+++ b/app/src/main/res/layout/activity_help.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_help_about.xml b/app/src/main/res/layout/fragment_help_about.xml
new file mode 100644
index 0000000..6d730c4
--- /dev/null
+++ b/app/src/main/res/layout/fragment_help_about.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/main.xml b/app/src/main/res/menu/main.xml
index c0e3174..637a59b 100644
--- a/app/src/main/res/menu/main.xml
+++ b/app/src/main/res/menu/main.xml
@@ -19,4 +19,10 @@
android:title="@string/action_settings"
i2pandroid:showAsAction="never"/>
+
+
\ No newline at end of file
diff --git a/app/src/main/res/raw/help_about.html b/app/src/main/res/raw/help_about.html
new file mode 100644
index 0000000..090d967
--- /dev/null
+++ b/app/src/main/res/raw/help_about.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+https://github.com/i2p/i2p.i2p-bote.android
+Bote is the Android app for I2P-Bote.
+License: GPLv3+
+
+Libraries
+
+
+
diff --git a/app/src/main/res/raw/help_changelog.html b/app/src/main/res/raw/help_changelog.html
new file mode 100644
index 0000000..c9b7a76
--- /dev/null
+++ b/app/src/main/res/raw/help_changelog.html
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+0.5
+
+- Attachments!
+- Email content can be seleted/copied (API 11+)
+- Cc: and Bcc: fields
+- Much better support for legacy devices
+- UI improvements, bug fixes, translation updates
+
+
+0.4
+
+- New email notifications!
+- Fixed crash when clicking "Create new contact" button
+- Fixed crash when sending email
+- Fixed occasional crashes when Bote connects to / disconnects from the network
+- Added "Copy to clipboard" button to identities and contacts
+- Added labels to the address book actions menu
+- UI improvements, bug fixes, translation updates
+
+
+0.3
+
+- Migrated to new Material design from Android Lollipop
+- Overhauled password usability
+- Identicons for contacts without pictures
+- Check email improvements
+- Use new-style swipe
+- Users can now launch check from menu, or swipe on empty inbox
+- "Forward" and "Reply all" actions for emails
+- QR codes for sharing identities
+- Separated viewing and editing contacts
+- Improved network information page
+- Various bug fixes
+- Updated translations
+
+
+0.3-rc3
+
+- Test release to Norway on Google Play
+
+
+0.2
+
+0.1.1
+
+- Fixed bugs in identity creation and password setting
+
+
+0.1
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/raw/help_start.html b/app/src/main/res/raw/help_start.html
new file mode 100644
index 0000000..51d658a
--- /dev/null
+++ b/app/src/main/res/raw/help_start.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+Getting started
+First you need an identity. Create one via the "Settings" menu, or import an existing identity. Afterwards, you can add your friends' addresses by copy-paste, or exchange them via QR Codes or NFC.
+
+On Android lower than 4.4, it is recommended that you install OI File Manager for enhanced file selection. To share via QR Codes install Barcode Scanner. Clicking on the links will open Google Play Store or F-Droid for installation.
+
+I found a bug in Bote!
+Please report the bug using the I2P bug tracker.
+
+Translations
+Help translating Bote! Everybody can participate at I2P on Transifex.
+
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 127ac32..671e730 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -240,5 +240,10 @@
This field is required
Bote address for %s
Copied to clipboard
+ Help
+ Start
+ Changelog
+ About
+ Version: