-
Notifications
You must be signed in to change notification settings - Fork 37
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
0 parents
commit 529c1e7
Showing
84 changed files
with
6,088 additions
and
0 deletions.
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Built application files | ||
*.apk | ||
*.ap_ | ||
|
||
# Files for the Dalvik VM | ||
*.dex | ||
|
||
# Java class files | ||
*.class | ||
|
||
# Generated files | ||
bin/ | ||
gen/ | ||
|
||
# Gradle files | ||
.gradle/ | ||
build/ | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Proguard folder generated by Eclipse | ||
proguard/ | ||
|
||
# Log Files | ||
*.log | ||
|
||
# Android Studio Navigation editor temp files | ||
.navigation/ | ||
|
||
# Android Studio captures folder | ||
captures/ | ||
|
||
# Others | ||
.idea/ | ||
*.DS_Store | ||
*.iml |
Large diffs are not rendered by default.
Oops, something went wrong.
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Mirror | ||
=== | ||
|
||
Yet another Sketch Mirror App for Android. | ||
|
||
Support Android Lollipop+. | ||
|
||
## Usage | ||
|
||
![example.png](./example.png "example.png") | ||
|
||
## Attendtion | ||
|
||
- Sometimes the WIFI connection is unstable, better to use it at good network. USB supports comming soon. | ||
|
||
- Highly recommended to use resolution 1280x720's phone to preview Material Design; or resolution : artboard's size = 1:1. | ||
|
||
- Good Pull Request is always welcome :) | ||
|
||
## Dependences | ||
|
||
- [Android Support Library](https://developer.android.com/topic/libraries/support-library/index.html "Support Library"), Apache License Version 2.0 | ||
|
||
- [ReactiveX/RxJava](https://github.com/ReactiveX/RxJava "ReactiveX/RxJava"), Apache License Version 2.0 | ||
|
||
- [trello/RxLifecycle](https://github.com/trello/RxLifecycle "trello/RxLifecycle"), Apache License Version 2.0 | ||
|
||
- [facebook/fresco](https://github.com/facebook/fresco "facebook/fresco"), BSD License | ||
|
||
- [google/gson](https://github.com/google/gson "google/gson"), Apache License Version 2.0 | ||
|
||
- [square/okhttp](https://github.com/square/okhttp "square/okhttp"), Apache License Version 2.0 | ||
|
||
- [davemorrissey/subsampling-scale-image-view](https://github.com/davemorrissey/subsampling-scale-image-view "davemorrissey/subsampling-scale-image-view"), Apache License Version 2.0 | ||
|
||
## License | ||
|
||
Mirror - Yet another Sketch Mirror App for Android. | ||
Copyright (C) 2016 Zhihu Inc. | ||
|
||
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/>. |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Mirror - Yet another Sketch Mirror App for Android. | ||
* Copyright (C) 2016 Zhihu Inc. | ||
* | ||
* 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/>. | ||
*/ | ||
|
||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 25 | ||
buildToolsVersion "25.0.0" | ||
|
||
defaultConfig { | ||
applicationId "com.zhihu.android.app.mirror" | ||
minSdkVersion 21 | ||
targetSdkVersion 25 | ||
versionCode 1 | ||
versionName "1.0.0" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled true | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compile fileTree(include: ['*.jar'], dir: 'libs') | ||
compile 'com.android.support:appcompat-v7:25.0.0' | ||
compile 'com.android.support:recyclerview-v7:25.0.0' | ||
compile 'io.reactivex:rxjava:1.2.1' | ||
compile 'com.trello:rxlifecycle-components:0.8.0' | ||
compile 'com.facebook.fresco:fresco:0.14.1' | ||
compile 'com.facebook.fresco:imagepipeline-okhttp3:0.14.1' | ||
compile 'com.google.code.gson:gson:2.7' | ||
compile 'com.squareup.okhttp3:okhttp-ws:3.4.1' | ||
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0' | ||
} |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in /Users/matthew/Library/Android/sdk/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the proguardFiles | ||
# directive in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# Add any project specific keep options here: | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# RxJava | ||
# https://github.com/artem-zinnatullin/RxJavaProGuardRules | ||
-dontwarn sun.misc.** | ||
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* { | ||
long producerIndex; | ||
long consumerIndex; | ||
} | ||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef { | ||
rx.internal.util.atomic.LinkedQueueNode producerNode; | ||
} | ||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef { | ||
rx.internal.util.atomic.LinkedQueueNode consumerNode; | ||
} | ||
|
||
# Fresco | ||
# http://frescolib.org/docs/proguard.html | ||
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip | ||
-keep @com.facebook.common.internal.DoNotStrip class * | ||
-keepclassmembers class * { | ||
@com.facebook.common.internal.DoNotStrip *; | ||
} | ||
-keepclassmembers class * { | ||
native <methods>; | ||
} | ||
-dontwarn okio.** | ||
-dontwarn com.squareup.okhttp.** | ||
-dontwarn okhttp3.** | ||
-dontwarn javax.annotation.** | ||
-dontwarn com.android.volley.toolbox.** | ||
|
||
# Gson | ||
# https://github.com/google/gson/tree/master/examples/android-proguard-example | ||
-keepattributes Signature | ||
-keepattributes *Annotation* | ||
-keep class sun.misc.Unsafe { *; } | ||
-keep class com.google.gson.examples.android.model.** { *; } | ||
-keep class * implements com.google.gson.TypeAdapterFactory | ||
-keep class * implements com.google.gson.JsonSerializer | ||
-keep class * implements com.google.gson.JsonDeserializer | ||
|
||
# OkHttp3 | ||
# https://github.com/square/okhttp/issues/2230 | ||
-keepattributes Signature | ||
-keepattributes *Annotation* | ||
-keep class okhttp3.** { *; } | ||
-keep interface okhttp3.** { *; } | ||
-dontwarn okhttp3.** |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<!-- | ||
~ Mirror - Yet another Sketch Mirror App for Android. | ||
~ Copyright (C) 2016 Zhihu Inc. | ||
~ | ||
~ 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/>. | ||
--> | ||
|
||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.zhihu.android.app.mirror"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | ||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> | ||
|
||
<application android:label="@string/app_name" | ||
android:icon="@mipmap/ic_launcher" | ||
android:allowBackup="true" | ||
android:hardwareAccelerated="true" | ||
android:largeHeap="true" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
|
||
<!-- support resizeableActivity and screenOrientation landscape? --> | ||
<activity android:name="com.zhihu.android.app.mirror.app.MainActivity" | ||
android:resizeableActivity="false" | ||
android:screenOrientation="portrait"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
<service android:name="com.zhihu.android.app.mirror.app.MirrorService" /> | ||
|
||
</application> | ||
|
||
</manifest> |
Oops, something went wrong.