diff --git a/app/app.iml b/app/app.iml index 2c94eee8..10fe9cb3 100644 --- a/app/app.iml +++ b/app/app.iml @@ -10,81 +10,81 @@ - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -138,11 +138,11 @@ - - - - - + + + + + @@ -154,7 +154,7 @@ - + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index e989b2cc..405a2e2b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -56,20 +56,20 @@ android { productFlavors { pro { applicationId 'com.lgallardo.qbittorrentclientpro' - versionName '4.8.5' + versionName '4.8.6' minSdkVersion 14 targetSdkVersion 28 archivesBaseName = "qBittorrentController_v" + versionName - versionCode 4850 + versionCode 4860 dimension "default" } free { applicationId "com.lgallardo.qbittorrentclient" - versionName '4.8.5' + versionName '4.8.6' minSdkVersion 14 targetSdkVersion 28 archivesBaseName = "qBittorrentController_v" + versionName - versionCode 4850 + versionCode 4860 dimension "default" } } @@ -103,7 +103,7 @@ dependencies { implementation 'com.android.support:recyclerview-v7:28.0.0' implementation 'com.android.support:cardview-v7:28.0.0' implementation 'com.android.support:design:28.0.0' - implementation 'com.google.android.gms:play-services-ads:15.0.1' + implementation 'com.google.android.gms:play-services-ads:16.0.0' implementation 'com.android.volley:volley:1.1.0' implementation 'com.google.code.gson:gson:2.8.0' diff --git a/app/src/free/res/layout/activity_main.xml b/app/src/free/res/layout/activity_main.xml index a8bbffed..ddda73bc 100644 --- a/app/src/free/res/layout/activity_main.xml +++ b/app/src/free/res/layout/activity_main.xml @@ -1,5 +1,5 @@ - - - - - - - - + + + + + + + - diff --git a/app/src/main/java/com/lgallardo/qbittorrentclient/MainActivity.java b/app/src/main/java/com/lgallardo/qbittorrentclient/MainActivity.java index d4aafc33..1af6e335 100644 --- a/app/src/main/java/com/lgallardo/qbittorrentclient/MainActivity.java +++ b/app/src/main/java/com/lgallardo/qbittorrentclient/MainActivity.java @@ -4301,6 +4301,7 @@ public void onSuccess(TransferInfo transferInfo) { // Set headerInfo TextView uploadSpeedTextView = (TextView) findViewById(R.id.upspeed); TextView downloadSpeedTextView = (TextView) findViewById(R.id.dlspeed); + TextView header2InfoTextView = (TextView) findViewById(R.id.header2_info); headerInfo = (LinearLayout) findViewById(R.id.header); @@ -4320,13 +4321,20 @@ public void onSuccess(TransferInfo transferInfo) { } uploadSpeedTextView.setText(AltSpeedInfo + Common.calculateSize("" + transferInfo.getUp_info_speed()) + "/s " + '\u2022' + " " + Common.calculateSize(transferInfo.getUp_info_data()) + " (" + uploadCount + ")"); + downloadSpeedTextView.setText(Character.toString('\u21C5') + " " + Common.calculateSize("" + downloadSpeedCount) + "/s " + '\u2022' + " " + Common.calculateSize(transferInfo.getDl_info_data()) + " (" + downloadCount + ")"); - - if (freeSpaceOnDisk == null) { - downloadSpeedTextView.setText(Character.toString('\u21C5') + " " + Common.calculateSize("" + downloadSpeedCount) + "/s " + '\u2022' + " " + Common.calculateSize(transferInfo.getDl_info_data()) + " (" + downloadCount + ")"); - } else { - downloadSpeedTextView.setText(Character.toString('\u21C5') + " " + Common.calculateSize("" + downloadSpeedCount) + "/s " + '\u2022' + " " + Common.calculateSize(transferInfo.getDl_info_data()) + " (" + downloadCount + ") " + '\u2022' + " Free: " + freeSpaceOnDisk); + if (freeSpaceOnDisk != null) { + // Phone + if(header2InfoTextView != null) { + downloadSpeedTextView.setText(Character.toString('\u21C5') + " " + Common.calculateSize("" + downloadSpeedCount) + "/s " + '\u2022' + " " + Common.calculateSize(transferInfo.getDl_info_data()) + " (" + downloadCount + ")"); + header2InfoTextView.setText("Free: " + freeSpaceOnDisk); + } + // Tablets + else { + downloadSpeedTextView.setText(Character.toString('\u21C5') + " " + Common.calculateSize("" + downloadSpeedCount) + "/s " + '\u2022' + " " + Common.calculateSize(transferInfo.getUp_info_data()) + " (" + downloadCount + ") " + '\u2022' + " Free: " + freeSpaceOnDisk); + } } + } }); diff --git a/app/src/pro/res/layout/activity_main.xml b/app/src/pro/res/layout/activity_main.xml index b3a26b7d..8102d688 100644 --- a/app/src/pro/res/layout/activity_main.xml +++ b/app/src/pro/res/layout/activity_main.xml @@ -1,5 +1,5 @@ @@ -23,7 +24,7 @@ + + + android:gravity="bottom" + ads:adSize="BANNER" + ads:adUnitId ="ca-app-pub-1035265933040074/6449288097"/> - + - - - - - - - - - + + + +