This commit is contained in:
rodič
e5fa595bbf
revize
b1ea82a3fb
|
@ -6,3 +6,4 @@
|
|||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
/app/build
|
Binární soubor nebyl zobrazen.
|
@ -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'
|
||||
}
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
<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" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="false"
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/share"
|
||||
android:title="@string/share"
|
||||
app:showAsAction="always"/>
|
||||
android:id="@+id/share"
|
||||
android:title="@string/share"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/help"
|
||||
android:title="@string/help"
|
||||
app:showAsAction="ifRoom"/>
|
||||
</menu>
|
|
@ -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>
|
||||
|
|
Načítá se…
Odkázat v novém úkolu