moved nyan sakamoto to library module
improved direct message bug fixes
@ -1,4 +1,4 @@
|
||||
include ':twidere', ':twidere.wear'
|
||||
include ':twidere', ':twidere.wear', ':twidere.donate.nyanwp', ':twidere.nyan', ':twidere.donate.nyanwp.wear'
|
||||
include ':SlidingMenu', ':DragSortListView', ':MenuComponent', ':RefreshNow', ':PullToRefresh', ':MessageBubbleView'
|
||||
|
||||
project(':SlidingMenu').projectDir = file('libraries/SlidingMenu/library')
|
||||
|
1
twidere.donate.nyanwp.wear/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
80
twidere.donate.nyanwp.wear/build.gradle
Normal file
@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* 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 21
|
||||
buildToolsVersion "21.1.2"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.mariotaku.twidere.donate.nyanwp"
|
||||
minSdkVersion 20
|
||||
targetSdkVersion 21
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
}
|
||||
signingConfigs {
|
||||
debug {
|
||||
File signingPropFile = project.rootProject.file('signing.properties')
|
||||
if (signingPropFile.exists()) {
|
||||
Properties signingProp = new Properties()
|
||||
signingProp.load(signingPropFile.newDataInputStream())
|
||||
storeFile file(signingProp.get("twidere.debug.storeFile"))
|
||||
storePassword signingProp.get("twidere.debug.storePassword")
|
||||
keyAlias signingProp.get("twidere.debug.keyAlias")
|
||||
keyPassword signingProp.get("twidere.debug.keyPassword")
|
||||
}
|
||||
}
|
||||
release {
|
||||
File signingPropFile = project.rootProject.file('signing.properties')
|
||||
if (signingPropFile.exists()) {
|
||||
Properties signingProp = new Properties()
|
||||
signingProp.load(signingPropFile.newDataInputStream())
|
||||
storeFile file(signingProp.get("twidere.release.storeFile"))
|
||||
storePassword signingProp.get("twidere.release.storePassword")
|
||||
keyAlias signingProp.get("twidere.release.keyAlias")
|
||||
keyPassword signingProp.get("twidere.release.keyPassword")
|
||||
}
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
File signingPropFile = project.rootProject.file('signing.properties')
|
||||
if (signingPropFile.exists()) {
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
release {
|
||||
File signingPropFile = project.rootProject.file('signing.properties')
|
||||
if (signingPropFile.exists()) {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':twidere.nyan')
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile 'com.google.android.support:wearable:1.1.0'
|
||||
}
|
17
twidere.donate.nyanwp.wear/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in /Users/mariotaku/Tools/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 *;
|
||||
#}
|
43
twidere.donate.nyanwp.wear/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ 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 package="org.mariotaku.twidere.donate.nyanwp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-feature android:name="android.hardware.type.watch"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@android:style/Theme.DeviceDefault">
|
||||
<activity
|
||||
android:name=".NyanActivity"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.donate.nyanwp;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.support.wearable.view.WatchViewStub;
|
||||
import android.support.wearable.view.WatchViewStub.OnLayoutInflatedListener;
|
||||
|
||||
import org.mariotaku.twidere.nyan.NyanDaydreamView;
|
||||
|
||||
public class NyanActivity extends Activity implements OnLayoutInflatedListener {
|
||||
|
||||
@Override
|
||||
public void onLayoutInflated(WatchViewStub watchViewStub) {
|
||||
final NyanDaydreamView nyanView = (NyanDaydreamView) watchViewStub.findViewById(R.id.nyan_view);
|
||||
nyanView.setScale(getResources().getInteger(R.integer.default_live_wallpaper_scale));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_nyan);
|
||||
final WatchViewStub stub = (WatchViewStub) findViewById(R.id.watch_view_stub);
|
||||
stub.setOnLayoutInflatedListener(this);
|
||||
}
|
||||
}
|
BIN
twidere.donate.nyanwp.wear/src/main/res/drawable-hdpi/ic_launcher.png
Executable file
After Width: | Height: | Size: 3.6 KiB |
BIN
twidere.donate.nyanwp.wear/src/main/res/drawable-mdpi/ic_launcher.png
Executable file
After Width: | Height: | Size: 2.3 KiB |
BIN
twidere.donate.nyanwp.wear/src/main/res/drawable-xhdpi/ic_launcher.png
Executable file
After Width: | Height: | Size: 4.8 KiB |
BIN
twidere.donate.nyanwp.wear/src/main/res/drawable-xxhdpi/ic_launcher.png
Executable file
After Width: | Height: | Size: 8.2 KiB |
BIN
twidere.donate.nyanwp.wear/src/main/res/drawable-xxxhdpi/ic_launcher.png
Executable file
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ 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/>.
|
||||
-->
|
||||
|
||||
<android.support.wearable.view.WatchViewStub
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/watch_view_stub"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:rectLayout="@layout/rect_activity_nyan"
|
||||
app:roundLayout="@layout/round_activity_nyan"
|
||||
tools:context=".NyanActivity"
|
||||
tools:deviceIds="wear">
|
||||
</android.support.wearable.view.WatchViewStub>
|
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ 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/>.
|
||||
-->
|
||||
|
||||
<org.mariotaku.twidere.nyan.NyanDaydreamView
|
||||
android:id="@+id/nyan_view"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".NyanActivity"
|
||||
tools:deviceIds="wear_square"/>
|
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ 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/>.
|
||||
-->
|
||||
|
||||
<org.mariotaku.twidere.nyan.NyanDaydreamView
|
||||
android:id="@+id/nyan_view"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".NyanActivity"
|
||||
tools:deviceIds="wear_round"/>
|
27
twidere.donate.nyanwp.wear/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ 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/>.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
|
||||
<string name="app_name">twidere.donate.nyanwp.wear</string>
|
||||
<string name="hello_round">Hello Round World!</string>
|
||||
<string name="hello_square">Hello Square World!</string>
|
||||
|
||||
</resources>
|
BIN
twidere.donate.nyanwp.wear/web_hi_res_512.png
Executable file
After Width: | Height: | Size: 25 KiB |
1
twidere.donate.nyanwp/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
79
twidere.donate.nyanwp/build.gradle
Normal file
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* 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 21
|
||||
buildToolsVersion "21.1.2"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.mariotaku.twidere.donate.nyanwp"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 21
|
||||
versionCode 3
|
||||
versionName "1.2"
|
||||
}
|
||||
signingConfigs {
|
||||
debug {
|
||||
File signingPropFile = project.rootProject.file('signing.properties')
|
||||
if (signingPropFile.exists()) {
|
||||
Properties signingProp = new Properties()
|
||||
signingProp.load(signingPropFile.newDataInputStream())
|
||||
storeFile file(signingProp.get("twidere.debug.storeFile"))
|
||||
storePassword signingProp.get("twidere.debug.storePassword")
|
||||
keyAlias signingProp.get("twidere.debug.keyAlias")
|
||||
keyPassword signingProp.get("twidere.debug.keyPassword")
|
||||
}
|
||||
}
|
||||
release {
|
||||
File signingPropFile = project.rootProject.file('signing.properties')
|
||||
if (signingPropFile.exists()) {
|
||||
Properties signingProp = new Properties()
|
||||
signingProp.load(signingPropFile.newDataInputStream())
|
||||
storeFile file(signingProp.get("twidere.release.storeFile"))
|
||||
storePassword signingProp.get("twidere.release.storePassword")
|
||||
keyAlias signingProp.get("twidere.release.keyAlias")
|
||||
keyPassword signingProp.get("twidere.release.keyPassword")
|
||||
}
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
File signingPropFile = project.rootProject.file('signing.properties')
|
||||
if (signingPropFile.exists()) {
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
release {
|
||||
File signingPropFile = project.rootProject.file('signing.properties')
|
||||
if (signingPropFile.exists()) {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
wearApp project(':twidere.donate.nyanwp.wear')
|
||||
compile project(':twidere.nyan')
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
}
|
BIN
twidere.donate.nyanwp/ic_launcher-web.png
Normal file
After Width: | Height: | Size: 52 KiB |
17
twidere.donate.nyanwp/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in /Users/mariotaku/Tools/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 *;
|
||||
#}
|
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.donate.nyanwp;
|
||||
|
||||
import android.app.Application;
|
||||
import android.test.ApplicationTestCase;
|
||||
|
||||
/**
|
||||
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
|
||||
*/
|
||||
public class ApplicationTest extends ApplicationTestCase<Application> {
|
||||
public ApplicationTest() {
|
||||
super(Application.class);
|
||||
}
|
||||
}
|
34
twidere.donate.nyanwp/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,34 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.mariotaku.twidere.donate.nyanwp">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name">
|
||||
<service
|
||||
android:name="org.mariotaku.twidere.nyan.NyanWallpaperService"
|
||||
android:exported="true"
|
||||
android:label="@string/livewp_name"
|
||||
android:permission="android.permission.BIND_WALLPAPER"
|
||||
android:process=":wallpaper">
|
||||
<intent-filter android:priority="1">
|
||||
<action android:name="android.service.wallpaper.WallpaperService"/>
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.service.wallpaper"
|
||||
android:resource="@xml/nyan_wallpaper"/>
|
||||
</service>
|
||||
<service
|
||||
android:name="org.mariotaku.twidere.nyan.NyanDaydreamService"
|
||||
android:exported="true"
|
||||
android:label="@string/daydream_name"
|
||||
android:process=":daydream">
|
||||
<intent-filter android:priority="1">
|
||||
<action android:name="android.service.dreams.DreamService"/>
|
||||
</intent-filter>
|
||||
</service>
|
||||
</application>
|
||||
|
||||
</manifest>
|
BIN
twidere.donate.nyanwp/src/main/res/drawable-hdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
twidere.donate.nyanwp/src/main/res/drawable-mdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 892 B |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 19 KiB |
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:antialias="true"
|
||||
android:filter="true"
|
||||
android:src="@drawable/nyan_sakamoto_thumbnail_bitmap"
|
||||
android:tileMode="disabled"/>
|
@ -0,0 +1,6 @@
|
||||
<resources>
|
||||
|
||||
<integer name="nyan_star_rows">5</integer>
|
||||
<integer name="nyan_star_cols">17</integer>
|
||||
|
||||
</resources>
|
@ -0,0 +1,6 @@
|
||||
<resources>
|
||||
|
||||
<integer name="nyan_star_rows">8</integer>
|
||||
<integer name="nyan_star_cols">23</integer>
|
||||
|
||||
</resources>
|
@ -0,0 +1,7 @@
|
||||
<resources>
|
||||
|
||||
<integer name="nyan_star_rows">10</integer>
|
||||
<integer name="nyan_star_cols">13</integer>
|
||||
<integer name="default_live_wallpaper_scale">2</integer>
|
||||
|
||||
</resources>
|
@ -0,0 +1,6 @@
|
||||
<resources>
|
||||
|
||||
<integer name="nyan_star_rows">13</integer>
|
||||
<integer name="nyan_star_cols">31</integer>
|
||||
|
||||
</resources>
|
@ -0,0 +1,7 @@
|
||||
<resources>
|
||||
|
||||
<integer name="nyan_star_rows">15</integer>
|
||||
<integer name="nyan_star_cols">19</integer>
|
||||
<integer name="default_live_wallpaper_scale">3</integer>
|
||||
|
||||
</resources>
|
5
twidere.donate.nyanwp/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<resources>
|
||||
|
||||
<color name="nyan_background">#003366</color>
|
||||
|
||||
</resources>
|
7
twidere.donate.nyanwp/src/main/res/values/integers.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<resources>
|
||||
|
||||
<integer name="nyan_star_rows">8</integer>
|
||||
<integer name="nyan_star_cols">11</integer>
|
||||
<integer name="default_live_wallpaper_scale">1</integer>
|
||||
|
||||
</resources>
|
7
twidere.donate.nyanwp/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Twidere Donate Live Wallpaper</string>
|
||||
<string name="livewp_name">Twidere Donate Wallpaper</string>
|
||||
<string name="daydream_name">Twidere Donate Daydream</string>
|
||||
|
||||
</resources>
|
21
twidere.donate.nyanwp/src/main/res/values/styles.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ 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/>.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
</resources>
|
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<wallpaper xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:thumbnail="@drawable/nyan_sakamoto_thumbnail"/>
|
1
twidere.nyan/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
42
twidere.nyan/build.gradle
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* 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.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 21
|
||||
buildToolsVersion "21.1.2"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 21
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
}
|
17
twidere.nyan/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in /Users/mariotaku/Tools/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 *;
|
||||
#}
|
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.nyan;
|
||||
|
||||
import android.app.Application;
|
||||
import android.test.ApplicationTestCase;
|
||||
|
||||
/**
|
||||
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
|
||||
*/
|
||||
public class ApplicationTest extends ApplicationTestCase<Application> {
|
||||
public ApplicationTest() {
|
||||
super(Application.class);
|
||||
}
|
||||
}
|
25
twidere.nyan/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ 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 package="org.mariotaku.twidere.nyan">
|
||||
|
||||
<application/>
|
||||
|
||||
|
||||
</manifest>
|
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.nyan;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 14/12/19.
|
||||
*/
|
||||
public interface NyanConstants {
|
||||
|
||||
public static final String SHARED_PREFERENCES_NAME = "nyan_preferences";
|
||||
|
||||
public static final String KEY_LIVE_WALLPAPER_SCALE = "live_wallpaper_scale";
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.nyan;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Build;
|
||||
import android.service.dreams.DreamService;
|
||||
import android.view.View;
|
||||
import android.view.View.OnSystemUiVisibilityChangeListener;
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
|
||||
public class NyanDaydreamService extends DreamService implements NyanConstants,
|
||||
OnSharedPreferenceChangeListener, OnSystemUiVisibilityChangeListener {
|
||||
|
||||
private NyanDaydreamView mNyanDaydreamView;
|
||||
private SharedPreferences mPreferences;
|
||||
|
||||
@Override
|
||||
public void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
setContentView(R.layout.nyan_daydream);
|
||||
mNyanDaydreamView.setOnSystemUiVisibilityChangeListener(this);
|
||||
updateView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContentChanged() {
|
||||
super.onContentChanged();
|
||||
mNyanDaydreamView = (NyanDaydreamView) findViewById(R.id.nyan);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
mPreferences = getSharedPreferences(SHARED_PREFERENCES_NAME, MODE_PRIVATE);
|
||||
mPreferences.registerOnSharedPreferenceChangeListener(this);
|
||||
setInteractive(false);
|
||||
setFullscreen(true);
|
||||
setScreenBright(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSharedPreferenceChanged(final SharedPreferences sharedPreferences, final String key) {
|
||||
if (KEY_LIVE_WALLPAPER_SCALE.equals(key)) {
|
||||
updateView();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSystemUiVisibilityChange(final int visibility) {
|
||||
if ((visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateView() {
|
||||
if (mPreferences == null) return;
|
||||
final Resources res = getResources();
|
||||
final int def = res.getInteger(R.integer.default_live_wallpaper_scale);
|
||||
mNyanDaydreamView.setScale(mPreferences.getInt(KEY_LIVE_WALLPAPER_SCALE, def));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.nyan;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.View;
|
||||
|
||||
public class NyanDaydreamView extends View {
|
||||
|
||||
private final InvalidateRunnable mInvalidateRunnable;
|
||||
|
||||
private final NyanDrawingHelper mNyanDrawingHelper;
|
||||
|
||||
public NyanDaydreamView(final Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public NyanDaydreamView(final Context context, final AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public NyanDaydreamView(final Context context, final AttributeSet attrs, final int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
|
||||
mNyanDrawingHelper = new DreamViewNyanDrawingHelper(this);
|
||||
mInvalidateRunnable = new InvalidateRunnable(this);
|
||||
}
|
||||
|
||||
public void setScale(final float scale) {
|
||||
mNyanDrawingHelper.setScale(scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
post(mInvalidateRunnable);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
removeCallbacks(mInvalidateRunnable);
|
||||
super.onDetachedFromWindow();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(final Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
mNyanDrawingHelper.dispatchDraw(canvas);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSizeChanged(final int w, final int h, final int oldw, final int oldh) {
|
||||
super.onSizeChanged(w, h, oldw, oldh);
|
||||
mNyanDrawingHelper.dispatchSizeChanged(w, h);
|
||||
}
|
||||
|
||||
private static final class DreamViewNyanDrawingHelper extends NyanDrawingHelper {
|
||||
|
||||
private final int mDisplayHeight;
|
||||
private final NyanDaydreamView mView;
|
||||
|
||||
public DreamViewNyanDrawingHelper(final NyanDaydreamView view) {
|
||||
super(view.getContext());
|
||||
mView = view;
|
||||
final Resources res = getResources();
|
||||
final DisplayMetrics dm = res.getDisplayMetrics();
|
||||
mDisplayHeight = dm.heightPixels;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getRainbowYOffset() {
|
||||
final int visibility = mView.getSystemUiVisibility();
|
||||
if ((visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0) return 0;
|
||||
return mDisplayHeight - getHeight();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final class InvalidateRunnable implements Runnable {
|
||||
|
||||
private final View mView;
|
||||
|
||||
InvalidateRunnable(final View view) {
|
||||
mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
mView.invalidate();
|
||||
mView.postDelayed(this, 66);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,23 +1,23 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.util;
|
||||
package org.mariotaku.twidere.nyan;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
@ -34,8 +34,6 @@ import android.graphics.drawable.AnimationDrawable;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Random;
|
||||
@ -95,9 +93,9 @@ public class NyanDrawingHelper {
|
||||
public final void dispatchSizeChanged(final int width, final int height) {
|
||||
mWidth = width;
|
||||
mHeight = height;
|
||||
mStarsHelper.dispatchSizeChanged(width, height);
|
||||
mRainbowHelper.dispatchSizeChanged(width, height);
|
||||
mSakamotoHelper.dispatchSizeChanged(width, height);
|
||||
for (final IDrawingHelper h : mDrawingHelpers) {
|
||||
h.dispatchSizeChanged(width, height);
|
||||
}
|
||||
setupSpirtes();
|
||||
}
|
||||
|
||||
@ -159,7 +157,9 @@ public class NyanDrawingHelper {
|
||||
}
|
||||
|
||||
private void setupSpirtes() {
|
||||
final int centerX = mWidth / 2, centerY = mHeight / 2;
|
||||
final int width = mWidth, height = mHeight;
|
||||
if (width == 0 || height == 0) return;
|
||||
final int centerX = width / 2, centerY = height / 2;
|
||||
final int sakamotoDotScale = Math.round(SAKAMOTO_DOT_SIZE * mDensity * mScale);
|
||||
final int sakamotoW = mSakamotoHelper.getIntrinsicWidth() * sakamotoDotScale;
|
||||
final int sakamotoH = mSakamotoHelper.getIntrinsicHeight() * sakamotoDotScale;
|
||||
@ -184,6 +184,7 @@ public class NyanDrawingHelper {
|
||||
setDrawable(drawable);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void dispatchOnDraw(final Canvas canvas) {
|
||||
if (mDrawable == null) return;
|
||||
@ -226,6 +227,7 @@ public class NyanDrawingHelper {
|
||||
public void setBounds(final int left, final int top, final int right, final int bottom) {
|
||||
if (mDrawable == null) return;
|
||||
if (mAnimationFrames > 0) {
|
||||
mDrawable.setBounds(left, top, right, bottom);
|
||||
for (int i = 0; i < mAnimationFrames; i++) {
|
||||
final Drawable frame = ((AnimationDrawable) mDrawable).getFrame(i);
|
||||
frame.setBounds(left, top, right, bottom);
|
||||
@ -273,12 +275,11 @@ public class NyanDrawingHelper {
|
||||
}
|
||||
|
||||
final Rect bounds = getBounds();
|
||||
final int height = bounds.bottom - bounds.top;
|
||||
// Translate down by the remainder
|
||||
mMatrix.setTranslate(0, bounds.top);
|
||||
mMatrix.setTranslate(bounds.left, bounds.top);
|
||||
canvas.save();
|
||||
canvas.setMatrix(mMatrix);
|
||||
canvas.drawRect(bounds.left, 0, bounds.right, height, mPaint);
|
||||
canvas.drawRect(0, 0, bounds.width(), bounds.height(), mPaint);
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
@ -453,9 +454,6 @@ public class NyanDrawingHelper {
|
||||
}
|
||||
|
||||
private static interface StarAnimFrames {
|
||||
/*
|
||||
* @formatter:off
|
||||
*/
|
||||
static final byte[][] FRAME1 = {
|
||||
{
|
||||
0, 0, 0, 0, 0, 0, 0
|
||||
@ -595,9 +593,6 @@ public class NyanDrawingHelper {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* @formatter:on
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,126 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.nyan;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.view.SurfaceHolder;
|
||||
|
||||
public final class NyanSurfaceHelper implements SurfaceHolder.Callback {
|
||||
|
||||
private SurfaceHolder mHolder;
|
||||
private DrawingThread mThread;
|
||||
private final NyanDrawingHelper mNyanDrawingHelper;
|
||||
|
||||
public NyanSurfaceHelper(final Context context) {
|
||||
mNyanDrawingHelper = new NyanDrawingHelper(context);
|
||||
}
|
||||
|
||||
public SurfaceHolder getHolder() {
|
||||
return mHolder;
|
||||
}
|
||||
|
||||
public void setScale(final float scale) {
|
||||
mNyanDrawingHelper.setScale(scale);
|
||||
}
|
||||
|
||||
public void setSkipDrawing(final boolean skipDrawing) {
|
||||
if (mThread != null) {
|
||||
mThread.setSkipDrawing(skipDrawing);
|
||||
}
|
||||
}
|
||||
|
||||
public void start() {
|
||||
if (mThread != null) return;
|
||||
mThread = new DrawingThread(this, mNyanDrawingHelper);
|
||||
mThread.start();
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
if (mThread != null) {
|
||||
mThread.cancel();
|
||||
}
|
||||
mThread = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void surfaceChanged(final SurfaceHolder holder, final int format, final int width, final int height) {
|
||||
mNyanDrawingHelper.dispatchSizeChanged(width, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void surfaceCreated(final SurfaceHolder holder) {
|
||||
mHolder = holder;
|
||||
start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void surfaceDestroyed(final SurfaceHolder holder) {
|
||||
stop();
|
||||
mHolder = null;
|
||||
}
|
||||
|
||||
private static class DrawingThread extends Thread {
|
||||
|
||||
private final NyanSurfaceHelper mSurfaceHelper;
|
||||
private final NyanDrawingHelper mDrawingHelper;
|
||||
private boolean mCancelled;
|
||||
private boolean mSkipDrawing;
|
||||
|
||||
DrawingThread(final NyanSurfaceHelper surfaceHelper, final NyanDrawingHelper drawingHelper) {
|
||||
mSurfaceHelper = surfaceHelper;
|
||||
mDrawingHelper = drawingHelper;
|
||||
}
|
||||
|
||||
public void cancel() {
|
||||
mCancelled = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
while (!mCancelled) {
|
||||
final long startTime = System.currentTimeMillis();
|
||||
drawFrame();
|
||||
final long endTime = System.currentTimeMillis();
|
||||
try {
|
||||
Thread.sleep(Math.max(0, 66 - (endTime - startTime)));
|
||||
} catch (final InterruptedException ignored) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setSkipDrawing(final boolean skipDrawing) {
|
||||
mSkipDrawing = skipDrawing;
|
||||
}
|
||||
|
||||
private void drawFrame() {
|
||||
final SurfaceHolder holder = mSurfaceHelper.getHolder();
|
||||
if (mSkipDrawing || holder == null || holder.isCreating()) return;
|
||||
final Canvas c = holder.lockCanvas();
|
||||
if (c == null) return;
|
||||
if (mDrawingHelper != null) {
|
||||
mDrawingHelper.dispatchDraw(c);
|
||||
}
|
||||
holder.unlockCanvasAndPost(c);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,133 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.nyan;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
||||
import android.content.res.Resources;
|
||||
import android.os.PowerManager;
|
||||
import android.service.wallpaper.WallpaperService;
|
||||
import android.view.SurfaceHolder;
|
||||
|
||||
public class NyanWallpaperService extends WallpaperService implements NyanConstants {
|
||||
|
||||
@Override
|
||||
public Engine onCreateEngine() {
|
||||
return new NyanWallpaperEngine();
|
||||
}
|
||||
|
||||
private Context getContext() {
|
||||
return this;
|
||||
}
|
||||
|
||||
private final class NyanWallpaperEngine extends Engine implements OnSharedPreferenceChangeListener {
|
||||
|
||||
private SharedPreferences mPreferences;
|
||||
private final BroadcastReceiver mScreenReceiver = new BroadcastReceiver() {
|
||||
|
||||
@Override
|
||||
public void onReceive(final Context context, final Intent intent) {
|
||||
final String action = intent.getAction();
|
||||
if (Intent.ACTION_SCREEN_ON.equals(action)) {
|
||||
if (mHelper == null) return;
|
||||
mHelper.start();
|
||||
} else if (Intent.ACTION_SCREEN_OFF.equals(action)) {
|
||||
if (mHelper == null) return;
|
||||
mHelper.stop();
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
private NyanSurfaceHelper mHelper;
|
||||
|
||||
@Override
|
||||
public void onCreate(final SurfaceHolder surfaceHolder) {
|
||||
super.onCreate(surfaceHolder);
|
||||
mPreferences = getSharedPreferences(SHARED_PREFERENCES_NAME, MODE_PRIVATE);
|
||||
mPreferences.registerOnSharedPreferenceChangeListener(this);
|
||||
mHelper = new NyanSurfaceHelper(getContext());
|
||||
final IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(Intent.ACTION_SCREEN_ON);
|
||||
filter.addAction(Intent.ACTION_SCREEN_OFF);
|
||||
registerReceiver(mScreenReceiver, filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
mPreferences.unregisterOnSharedPreferenceChangeListener(this);
|
||||
unregisterReceiver(mScreenReceiver);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSharedPreferenceChanged(final SharedPreferences sharedPreferences, final String key) {
|
||||
if (KEY_LIVE_WALLPAPER_SCALE.equals(key)) {
|
||||
updateSurface();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSurfaceCreated(final SurfaceHolder holder) {
|
||||
super.onSurfaceCreated(holder);
|
||||
holder.addCallback(mHelper);
|
||||
updateSurface();
|
||||
updateHelperState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSurfaceDestroyed(final SurfaceHolder holder) {
|
||||
mHelper.stop();
|
||||
holder.removeCallback(mHelper);
|
||||
super.onSurfaceDestroyed(holder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVisibilityChanged(final boolean visible) {
|
||||
super.onVisibilityChanged(visible);
|
||||
if (mHelper != null) {
|
||||
mHelper.setSkipDrawing(!visible);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateHelperState() {
|
||||
final PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE);
|
||||
if (pm.isScreenOn()) {
|
||||
mHelper.start();
|
||||
} else {
|
||||
mHelper.stop();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateSurface() {
|
||||
if (mPreferences == null) return;
|
||||
final Resources res = getResources();
|
||||
final int def = res.getInteger(R.integer.default_live_wallpaper_scale);
|
||||
mHelper.setScale(mPreferences.getInt(KEY_LIVE_WALLPAPER_SCALE, def));
|
||||
updateHelperState();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 209 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 209 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 209 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 311 B |
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 312 B |
Before Width: | Height: | Size: 313 B After Width: | Height: | Size: 313 B |
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 312 B |
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 311 B |
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 315 B |
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 311 B |
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 315 B |
Before Width: | Height: | Size: 445 B After Width: | Height: | Size: 445 B |
Before Width: | Height: | Size: 441 B After Width: | Height: | Size: 441 B |
Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 438 B After Width: | Height: | Size: 438 B |
Before Width: | Height: | Size: 445 B After Width: | Height: | Size: 445 B |
Before Width: | Height: | Size: 451 B After Width: | Height: | Size: 451 B |
Before Width: | Height: | Size: 445 B After Width: | Height: | Size: 445 B |
Before Width: | Height: | Size: 446 B After Width: | Height: | Size: 446 B |
Before Width: | Height: | Size: 445 B After Width: | Height: | Size: 445 B |
Before Width: | Height: | Size: 443 B After Width: | Height: | Size: 443 B |
Before Width: | Height: | Size: 451 B After Width: | Height: | Size: 451 B |
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 450 B |
78
twidere.nyan/src/main/res/drawable/nyan_sakamoto.xml
Normal file
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:oneshot="false">
|
||||
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_frame00"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_frame01"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_frame02"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_frame03"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_frame04"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_frame05"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_frame06"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_frame07"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_frame08"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_frame09"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_frame10"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_frame11"/>
|
||||
</item>
|
||||
|
||||
</animation-list>
|
97
twidere.nyan/src/main/res/drawable/nyan_sakamoto_santa.xml
Normal file
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ 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/>.
|
||||
-->
|
||||
|
||||
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:oneshot="false">
|
||||
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_santa_frame00"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_santa_frame01"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_santa_frame02"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_santa_frame03"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_santa_frame04"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_santa_frame05"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_santa_frame06"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_santa_frame07"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_santa_frame08"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_santa_frame09"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_santa_frame10"/>
|
||||
</item>
|
||||
<item android:duration="70">
|
||||
<bitmap
|
||||
android:antialias="false"
|
||||
android:filter="false"
|
||||
android:src="@drawable/nyan_sakamoto_santa_frame11"/>
|
||||
</item>
|
||||
|
||||
</animation-list>
|
26
twidere.nyan/src/main/res/layout/nyan_daydream.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ 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/>.
|
||||
-->
|
||||
|
||||
<org.mariotaku.twidere.nyan.NyanDaydreamView
|
||||
android:id="@+id/nyan"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
6
twidere.nyan/src/main/res/values-land/integers.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<resources>
|
||||
|
||||
<integer name="nyan_star_rows">5</integer>
|
||||
<integer name="nyan_star_cols">17</integer>
|
||||
|
||||
</resources>
|
6
twidere.nyan/src/main/res/values-large-land/integers.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<resources>
|
||||
|
||||
<integer name="nyan_star_rows">8</integer>
|
||||
<integer name="nyan_star_cols">23</integer>
|
||||
|
||||
</resources>
|
7
twidere.nyan/src/main/res/values-large/integers.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<resources>
|
||||
|
||||
<integer name="nyan_star_rows">10</integer>
|
||||
<integer name="nyan_star_cols">13</integer>
|
||||
<integer name="default_live_wallpaper_scale">2</integer>
|
||||
|
||||
</resources>
|
@ -0,0 +1,6 @@
|
||||
<resources>
|
||||
|
||||
<integer name="nyan_star_rows">13</integer>
|
||||
<integer name="nyan_star_cols">31</integer>
|
||||
|
||||
</resources>
|
7
twidere.nyan/src/main/res/values-xlarge/integers.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<resources>
|
||||
|
||||
<integer name="nyan_star_rows">15</integer>
|
||||
<integer name="nyan_star_cols">19</integer>
|
||||
<integer name="default_live_wallpaper_scale">3</integer>
|
||||
|
||||
</resources>
|
5
twidere.nyan/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<resources>
|
||||
|
||||
<color name="nyan_background">#003366</color>
|
||||
|
||||
</resources>
|
7
twidere.nyan/src/main/res/values/integers.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<resources>
|
||||
|
||||
<integer name="nyan_star_rows">8</integer>
|
||||
<integer name="nyan_star_cols">11</integer>
|
||||
<integer name="default_live_wallpaper_scale">1</integer>
|
||||
|
||||
</resources>
|
7
twidere.nyan/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Twidere Donate Live Wallpaper</string>
|
||||
<string name="livewp_name">Twidere Donate Wallpaper</string>
|
||||
<string name="daydream_name">Twidere Donate Daydream</string>
|
||||
|
||||
</resources>
|
@ -17,8 +17,42 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
}
|
||||
buildTypes {
|
||||
signingConfigs {
|
||||
debug {
|
||||
File signingPropFile = project.rootProject.file('signing.properties')
|
||||
if (signingPropFile.exists()) {
|
||||
Properties signingProp = new Properties()
|
||||
signingProp.load(signingPropFile.newDataInputStream())
|
||||
storeFile file(signingProp.get("twidere.debug.storeFile"))
|
||||
storePassword signingProp.get("twidere.debug.storePassword")
|
||||
keyAlias signingProp.get("twidere.debug.keyAlias")
|
||||
keyPassword signingProp.get("twidere.debug.keyPassword")
|
||||
}
|
||||
}
|
||||
release {
|
||||
File signingPropFile = project.rootProject.file('signing.properties')
|
||||
if (signingPropFile.exists()) {
|
||||
Properties signingProp = new Properties()
|
||||
signingProp.load(signingPropFile.newDataInputStream())
|
||||
storeFile file(signingProp.get("twidere.release.storeFile"))
|
||||
storePassword signingProp.get("twidere.release.storePassword")
|
||||
keyAlias signingProp.get("twidere.release.keyAlias")
|
||||
keyPassword signingProp.get("twidere.release.keyPassword")
|
||||
}
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
File signingPropFile = project.rootProject.file('signing.properties')
|
||||
if (signingPropFile.exists()) {
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
release {
|
||||
File signingPropFile = project.rootProject.file('signing.properties')
|
||||
if (signingPropFile.exists()) {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
|
@ -16,6 +16,16 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
}
|
||||
packagingOptions {
|
||||
exclude 'META-INF/DEPENDENCIES'
|
||||
exclude 'META-INF/LICENSE'
|
||||
exclude 'META-INF/LICENSE.txt'
|
||||
exclude 'META-INF/license.txt'
|
||||
exclude 'META-INF/NOTICE'
|
||||
exclude 'META-INF/NOTICE.txt'
|
||||
exclude 'META-INF/notice.txt'
|
||||
exclude 'META-INF/ASL2.0'
|
||||
}
|
||||
signingConfigs {
|
||||
debug {
|
||||
File signingPropFile = project.rootProject.file('signing.properties')
|
||||
@ -40,16 +50,6 @@ android {
|
||||
}
|
||||
}
|
||||
}
|
||||
packagingOptions {
|
||||
exclude 'META-INF/DEPENDENCIES'
|
||||
exclude 'META-INF/LICENSE'
|
||||
exclude 'META-INF/LICENSE.txt'
|
||||
exclude 'META-INF/license.txt'
|
||||
exclude 'META-INF/NOTICE'
|
||||
exclude 'META-INF/NOTICE.txt'
|
||||
exclude 'META-INF/notice.txt'
|
||||
exclude 'META-INF/ASL2.0'
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
File signingPropFile = project.rootProject.file('signing.properties')
|
||||
@ -99,7 +99,7 @@ dependencies {
|
||||
compile project(':SlidingMenu')
|
||||
compile project(':DragSortListView')
|
||||
compile project(':MenuComponent')
|
||||
compile project(':RefreshNow')
|
||||
compile project(':MessageBubbleView')
|
||||
compile project(':twidere.nyan')
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
}
|
||||
|
@ -1,4 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ 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">
|
||||
|
||||
<application>
|
||||
|
@ -1,4 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
~
|
||||
~ 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/>.
|
||||
-->
|
||||
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|