This repository has been archived by the owner on Nov 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jan-Lk Else
committed
Nov 23, 2016
1 parent
9c975ef
commit e83ab90
Showing
26 changed files
with
607 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,9 @@ | |||
*.iml | |||
.gradle | |||
/local.properties | |||
/.idea/workspace.xml | |||
/.idea/libraries | |||
.DS_Store | |||
/build | |||
/captures | |||
.externalNativeBuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1 +1,20 @@ | |||
teleposter | # Teleposter | ||
|
|||
This app is a completely independent wrapper made for Telegra.ph. | |||
|
|||
With this app it's very easy to create and share posts directly to Telegram. | |||
|
|||
These posts are marked with "Instant View" and are able to open "instantly" in Telegram. If you don't believe how fast that is, try yourself! | |||
|
|||
Telegra.ph is quite similar to Medium.com. | |||
|
|||
## LICENSE | |||
|
|||
``` | |||
NewsCatchr Copyright © 2016 Jan-Lukas Else | |||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | |||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |||
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,27 @@ | |||
apply plugin: 'com.android.application' | |||
|
|||
android { | |||
compileSdkVersion 25 | |||
buildToolsVersion "25.0.0" | |||
defaultConfig { | |||
applicationId "telegra.ph" | |||
minSdkVersion 9 | |||
targetSdkVersion 25 | |||
versionCode 1 | |||
versionName "0.1 beta" | |||
} | |||
buildTypes { | |||
debug { | |||
minifyEnabled true | |||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |||
} | |||
release { | |||
minifyEnabled true | |||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |||
} | |||
} | |||
} | |||
|
|||
dependencies { | |||
compile 'com.android.support:appcompat-v7:25.0.1' | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,22 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |||
package="telegra.ph"> | |||
|
|||
<uses-permission android:name="android.permission.INTERNET"/> | |||
|
|||
<application | |||
android:allowBackup="true" | |||
android:icon="@drawable/telegraph" | |||
android:label="@string/app_name" | |||
android:supportsRtl="true" | |||
android:theme="@style/AppTheme"> | |||
<activity android:name=".MainActivity"> | |||
<intent-filter> | |||
<action android:name="android.intent.action.MAIN"/> | |||
|
|||
<category android:name="android.intent.category.LAUNCHER"/> | |||
</intent-filter> | |||
</activity> | |||
</application> | |||
|
|||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,69 @@ | |||
package telegra.ph; | |||
|
|||
import android.content.Intent; | |||
import android.os.Bundle; | |||
import android.support.v7.app.AppCompatActivity; | |||
import android.view.Menu; | |||
import android.view.MenuItem; | |||
import android.webkit.WebChromeClient; | |||
import android.webkit.WebResourceRequest; | |||
import android.webkit.WebSettings; | |||
import android.webkit.WebView; | |||
import android.webkit.WebViewClient; | |||
|
|||
public class MainActivity extends AppCompatActivity { | |||
|
|||
private WebView webView; | |||
private WebSettings webSettings; | |||
|
|||
@Override | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.activity_main); | |||
|
|||
|
|||
webView = (WebView) findViewById(R.id.webView); | |||
webSettings = webView.getSettings(); | |||
|
|||
// Enable Javascript | |||
webSettings.setJavaScriptEnabled(true); | |||
|
|||
webView.setWebViewClient(new WebViewClient() { | |||
@Override | |||
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { | |||
return true; | |||
} | |||
}); | |||
|
|||
webView.setWebChromeClient(new WebChromeClient() { | |||
|
|||
}); | |||
|
|||
// Load Telegra.ph | |||
webView.loadUrl("http://telegra.ph"); | |||
|
|||
} | |||
|
|||
@Override | |||
public boolean onCreateOptionsMenu(Menu menu) { | |||
super.onCreateOptionsMenu(menu); | |||
getMenuInflater().inflate(R.menu.activity_main, menu); | |||
return true; | |||
} | |||
|
|||
@Override | |||
public boolean onOptionsItemSelected(MenuItem item) { | |||
switch (item.getItemId()) { | |||
case R.id.share: | |||
Intent shareIntent = new Intent(); | |||
shareIntent.setAction(Intent.ACTION_SEND); | |||
shareIntent.setType("text/plain"); | |||
shareIntent.putExtra(Intent.EXTRA_TITLE, webView.getTitle()); | |||
shareIntent.putExtra(Intent.EXTRA_TEXT, webView.getUrl()); | |||
startActivity(Intent.createChooser(shareIntent, getString(R.string.share))); | |||
return true; | |||
default: | |||
return super.onOptionsItemSelected(item); | |||
} | |||
} | |||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<WebView xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:id="@+id/webView" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,8 @@ | |||
<?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"> | |||
<item | |||
android:id="@+id/share" | |||
android:title="@string/share" | |||
app:showAsAction="always"/> | |||
</menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,6 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<resources> | |||
<color name="colorPrimary">#3F51B5</color> | |||
<color name="colorPrimaryDark">#303F9F</color> | |||
<color name="colorAccent">#FF4081</color> | |||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,4 @@ | |||
<resources> | |||
<string name="app_name">Teleposter</string> | |||
<string name="share">Share</string> | |||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,9 @@ | |||
<resources> | |||
|
|||
<style name="AppTheme" parent="Theme.AppCompat"> | |||
<item name="colorPrimary">@color/colorPrimary</item> | |||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> | |||
<item name="colorAccent">@color/colorAccent</item> | |||
</style> | |||
|
|||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,14 @@ | |||
buildscript { | |||
repositories { | |||
jcenter() | |||
} | |||
dependencies { | |||
classpath 'com.android.tools.build:gradle:2.3.0-alpha1' | |||
} | |||
} | |||
|
|||
allprojects { | |||
repositories { | |||
jcenter() | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,17 @@ | |||
# Project-wide Gradle settings. | |||
|
|||
# IDE (e.g. Android Studio) users: | |||
# Gradle settings configured through the IDE *will override* | |||
# any settings specified in this file. | |||
|
|||
# For more details on how to configure your build environment visit | |||
# http://www.gradle.org/docs/current/userguide/build_environment.html | |||
|
|||
# Specifies the JVM arguments used for the daemon process. | |||
# The setting is particularly useful for tweaking memory settings. | |||
org.gradle.jvmargs=-Xmx1536m | |||
|
|||
# When configured, Gradle will run in incubating parallel mode. | |||
# This option should only be used with decoupled projects. More details, visit | |||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | |||
# org.gradle.parallel=true |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,6 @@ | |||
#Wed Nov 23 23:25:53 CET 2016 | |||
distributionBase=GRADLE_USER_HOME | |||
distributionPath=wrapper/dists | |||
zipStoreBase=GRADLE_USER_HOME | |||
zipStorePath=wrapper/dists | |||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2-bin.zip |
Oops, something went wrong.