Browse Source

Moved to Android Gradle plugin 1.0 (for Android Studio 1.0). Removed old manager project as it doesn't compile now and development has to start from scartch anyway.

material
Eric Kok 10 years ago
parent
commit
7f533779dd
  1. 21
      app/build.gradle
  2. 11
      app/src/main/java/org/transdroid/core/gui/rss/RssitemStatusLayout.java
  3. BIN
      app/src/main/res/drawable-hdpi/ic_action_barcode.png
  4. BIN
      app/src/main/res/drawable-hdpi/ic_action_file.png
  5. BIN
      app/src/main/res/drawable-hdpi/ic_action_link.png
  6. BIN
      app/src/main/res/drawable-hdpi/ic_action_new_dark.png
  7. BIN
      app/src/main/res/drawable-hdpi/ic_action_new_light.png
  8. BIN
      app/src/main/res/drawable-hdpi/ic_action_search.png
  9. BIN
      app/src/main/res/drawable-hdpi/ic_action_search_dark.png
  10. BIN
      app/src/main/res/drawable-hdpi/ic_action_search_light.png
  11. BIN
      app/src/main/res/drawable-xhdpi/ic_action_barcode.png
  12. BIN
      app/src/main/res/drawable-xhdpi/ic_action_file.png
  13. BIN
      app/src/main/res/drawable-xhdpi/ic_action_link.png
  14. BIN
      app/src/main/res/drawable-xhdpi/ic_action_new_dark.png
  15. BIN
      app/src/main/res/drawable-xhdpi/ic_action_new_light.png
  16. BIN
      app/src/main/res/drawable-xhdpi/ic_action_search.png
  17. BIN
      app/src/main/res/drawable-xhdpi/ic_action_search_dark.png
  18. BIN
      app/src/main/res/drawable-xhdpi/ic_action_search_light.png
  19. BIN
      app/src/main/res/drawable-xxhdpi/ic_action_barcode.png
  20. BIN
      app/src/main/res/drawable-xxhdpi/ic_action_file.png
  21. BIN
      app/src/main/res/drawable-xxhdpi/ic_action_link.png
  22. BIN
      app/src/main/res/drawable-xxhdpi/ic_action_search.png
  23. BIN
      app/src/main/res/drawable-xxxhdpi/ic_action_barcode.png
  24. BIN
      app/src/main/res/drawable-xxxhdpi/ic_action_file.png
  25. BIN
      app/src/main/res/drawable-xxxhdpi/ic_action_link.png
  26. BIN
      app/src/main/res/drawable-xxxhdpi/ic_action_search.png
  27. 11
      app/src/main/res/layout/fragment_torrents.xml
  28. 6
      build.gradle
  29. 4
      gradle/wrapper/gradle-wrapper.properties

21
app/build.gradle

@ -1,29 +1,19 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'android-apt' apply plugin: 'android-apt'
apply from: '../signing.gradle'
android { android {
compileSdkVersion 21 compileSdkVersion 21
buildToolsVersion '20.0.0' buildToolsVersion '21.1.1'
defaultConfig { defaultConfig {
minSdkVersion 15 minSdkVersion 15
targetSdkVersion 21 targetSdkVersion 21
versionCode 216 versionCode 217
versionName '2.3.0-beta' versionName '2.5.0-SNAPSHOT'
}
signingConfigs {
release {
storeFile STORE_FILE
storePassword STORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
}
} }
buildTypes { buildTypes {
release { release {
runProguard false runProguard false
signingConfig signingConfigs.release
} }
} }
productFlavors { productFlavors {
@ -50,8 +40,9 @@ dependencies {
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.+' compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.+'
compile 'com.android.support:appcompat-v7:21.0.0' compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:support-annotations:20.0.0' compile 'com.android.support:support-annotations:20.0.0'
//compile 'com.getbase:floatingactionbutton:1.2.1' compile 'com.getbase:floatingactionbutton:1.2.1'
apt "org.androidannotations:androidannotations:3.1" compile 'com.afollestad:material-dialogs:0.3.6'
apt 'org.androidannotations:androidannotations:3.1'
} }
apt { apt {

11
app/src/main/java/org/transdroid/core/gui/rss/RssitemStatusLayout.java

@ -23,6 +23,8 @@ import android.graphics.RectF;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import org.transdroid.R;
/** /**
* A relative layout that that is checkable (to be used in a contextual action bar) and shows a coloured bar in the far * A relative layout that that is checkable (to be used in a contextual action bar) and shows a coloured bar in the far
* left indicating the view status, that is, if the item is new to the user or was viewed earlier. * left indicating the view status, that is, if the item is new to the user or was viewed earlier.
@ -32,11 +34,10 @@ public class RssitemStatusLayout extends RelativeLayout {
private final float scale = getContext().getResources().getDisplayMetrics().density; private final float scale = getContext().getResources().getDisplayMetrics().density;
private final int WIDTH = (int) (6 * scale + 0.5f); private final int WIDTH = (int) (6 * scale + 0.5f);
private Boolean isNew = null;
private final Paint oldPaint = new Paint(); private final Paint oldPaint = new Paint();
private final Paint newPaint = new Paint(); private final Paint newPaint = new Paint();
private final RectF fullRect = new RectF(); private final RectF fullRect = new RectF();
private Boolean isNew = null;
public RssitemStatusLayout(Context context) { public RssitemStatusLayout(Context context) {
super(context); super(context);
@ -51,8 +52,8 @@ public class RssitemStatusLayout extends RelativeLayout {
} }
private void initPaints() { private void initPaints() {
oldPaint.setColor(0xFF9E9E9E); // Grey oldPaint.setColor(getResources().getColor(R.color.file_off)); // Grey
newPaint.setColor(0xFF8ACC12); // Normal green newPaint.setColor(getResources().getColor(R.color.file_normal)); // Normal green
} }
public void setIsNew(Boolean isNew) { public void setIsNew(Boolean isNew) {
@ -72,7 +73,7 @@ public class RssitemStatusLayout extends RelativeLayout {
return; return;
} }
canvas.drawRect(fullRect, isNew? newPaint: oldPaint); canvas.drawRect(fullRect, isNew ? newPaint : oldPaint);
} }

BIN
app/src/main/res/drawable-hdpi/ic_action_barcode.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
app/src/main/res/drawable-hdpi/ic_action_file.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

BIN
app/src/main/res/drawable-hdpi/ic_action_link.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

BIN
app/src/main/res/drawable-hdpi/ic_action_new_dark.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
app/src/main/res/drawable-hdpi/ic_action_new_light.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
app/src/main/res/drawable-hdpi/ic_action_search.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

BIN
app/src/main/res/drawable-hdpi/ic_action_search_dark.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
app/src/main/res/drawable-hdpi/ic_action_search_light.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
app/src/main/res/drawable-xhdpi/ic_action_barcode.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
app/src/main/res/drawable-xhdpi/ic_action_file.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

BIN
app/src/main/res/drawable-xhdpi/ic_action_link.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

BIN
app/src/main/res/drawable-xhdpi/ic_action_new_dark.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
app/src/main/res/drawable-xhdpi/ic_action_new_light.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
app/src/main/res/drawable-xhdpi/ic_action_search.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

BIN
app/src/main/res/drawable-xhdpi/ic_action_search_dark.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
app/src/main/res/drawable-xhdpi/ic_action_search_light.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
app/src/main/res/drawable-xxhdpi/ic_action_barcode.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
app/src/main/res/drawable-xxhdpi/ic_action_file.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

BIN
app/src/main/res/drawable-xxhdpi/ic_action_link.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

BIN
app/src/main/res/drawable-xxhdpi/ic_action_search.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

BIN
app/src/main/res/drawable-xxxhdpi/ic_action_barcode.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
app/src/main/res/drawable-xxxhdpi/ic_action_file.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

BIN
app/src/main/res/drawable-xxxhdpi/ic_action_link.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

BIN
app/src/main/res/drawable-xxxhdpi/ic_action_search.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

11
app/src/main/res/layout/fragment_torrents.xml

@ -16,15 +16,19 @@
along with Transdroid. If not, see <http://www.gnu.org/licenses/>. along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
--> -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout 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:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" > android:layout_height="match_parent">
<ListView <ListView
android:id="@+id/torrents_list" android:id="@+id/torrents_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:choiceMode="multipleChoiceModal" android:choiceMode="multipleChoiceModal"
android:visibility="gone" /> android:visibility="gone"
tools:visibility="visible"
tools:listitem="@layout/list_item_torrent"/>
<ProgressBar <ProgressBar
android:id="@+id/loading_progress" android:id="@+id/loading_progress"
@ -34,7 +38,8 @@
android:indeterminate="true" android:indeterminate="true"
android:indeterminateDrawable="?attr/loading_progress" android:indeterminateDrawable="?attr/loading_progress"
android:indeterminateOnly="true" android:indeterminateOnly="true"
android:visibility="visible" /> android:visibility="visible"
tools:visibility="gone" />
<TextView <TextView
android:id="@+id/empty_text" android:id="@+id/empty_text"

6
build.gradle

@ -1,16 +1,16 @@
buildscript { buildscript {
repositories { repositories {
mavenCentral() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:0.12.2' classpath 'com.android.tools.build:gradle:0.14.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4+' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4+'
} }
} }
allprojects { allprojects {
repositories { repositories {
mavenCentral() jcenter()
mavenLocal() mavenLocal()
} }
} }

4
gradle/wrapper/gradle-wrapper.properties vendored

@ -1,6 +1,6 @@
#Wed Apr 10 15:27:10 PDT 2013 #Tue Dec 09 09:45:38 CET 2014
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip

Loading…
Cancel
Save