This commit is contained in:
Jan-Lk Else 2016-11-26 11:37:27 +01:00
parent e5fa595bbf
commit b1ea82a3fb
7 changed files with 30 additions and 8 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@
/build
/captures
.externalNativeBuild
/app/build

BIN
apks/0.4.apk Normal file

Binary file not shown.

View File

@ -6,10 +6,10 @@ android {
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "telegra.ph"
minSdkVersion 9
minSdkVersion 13
targetSdkVersion 25
versionCode 3
versionName "0.3 beta"
versionCode 4
versionName "0.4 beta"
resConfigs "en"
}
buildTypes {
@ -30,4 +30,5 @@ dependencies {
compile 'com.android.support:appcompat-v7:25.0.1'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'com.github.delight-im:Android-AdvancedWebView:v3.0.0'
compile 'com.afollestad.material-dialogs:core:0.9.1.0'
}

View File

@ -2,6 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="telegra.ph">
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

View File

@ -3,9 +3,12 @@ package telegra.ph
import android.content.Intent
import android.graphics.Bitmap
import android.os.Bundle
import android.support.v7.app.AlertDialog
import android.support.v7.app.AppCompatActivity
import android.text.Html
import android.view.Menu
import android.view.MenuItem
import com.afollestad.materialdialogs.MaterialDialog
import im.delight.android.webview.AdvancedWebView
class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
@ -94,6 +97,13 @@ class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
startActivity(Intent.createChooser(shareIntent, getString(R.string.share)))
true
}
R.id.help -> {
MaterialDialog.Builder(this)
.title(R.string.help)
.content(R.string.help_text)
.show()
true
}
else -> super.onOptionsItemSelected(item)
}
}

View File

@ -4,5 +4,9 @@
<item
android:id="@+id/share"
android:title="@string/share"
app:showAsAction="always"/>
app:showAsAction="ifRoom"/>
<item
android:id="@+id/help"
android:title="@string/help"
app:showAsAction="ifRoom"/>
</menu>

View File

@ -1,4 +1,8 @@
<resources>
<string name="app_name">Teleposter</string>
<string name="share">Share</string>
<string name="help">Help</string>
<string name="help_text">
<![CDATA[<h3>How to use text formatting?</h3>You can use formatting like <b>bold</b>, <i>italics</i> and so on at least on Lollipop and above by double tapping the text.<h3>The app only shows strange things!</h3>It\'s not verified, that the app will work on devices with KitKat or lower. In Lollipop Google introduced a Chrome based and updatable WebView with more features and fixes. I\'m sorry! But in December \'16 Telegram will publish docs for the Telegraph API, so I\'ll be able to create a native app instead of a wrapper. Be patient!]]>
</string>
</resources>