Browse Source

0.4

pull/2/head
Jan-Lk Else 4 years ago
parent
commit
b1ea82a3fb
  1. 1
      .gitignore
  2. BIN
      apks/0.4.apk
  3. 7
      app/build.gradle
  4. 4
      app/src/main/AndroidManifest.xml
  5. 10
      app/src/main/java/telegra/ph/MainActivity.kt
  6. 12
      app/src/main/res/menu/activity_main.xml
  7. 4
      app/src/main/res/values/strings.xml

1
.gitignore

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

BIN
apks/0.4.apk

7
app/build.gradle

@ -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'
}

4
app/src/main/AndroidManifest.xml

@ -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"

10
app/src/main/java/telegra/ph/MainActivity.kt

@ -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)
}
}

12
app/src/main/res/menu/activity_main.xml

@ -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>

4
app/src/main/res/values/strings.xml

@ -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>
Loading…
Cancel
Save