Skip to content

Commit 226e747

Browse files
authored
Merge pull request #69 from kaczmarkiewiczp/dev
Update shortcut icons to be adaptive
2 parents fb4b548 + 85d75a7 commit 226e747

File tree

85 files changed

+296
-42
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+296
-42
lines changed

.idea/assetWizardSettings.xml

Lines changed: 57 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/caches/build_file_checksums.ser

0 Bytes
Binary file not shown.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Credits/Libraries
4444
-----------------
4545
- [ExFile Picker](https://github.com/bartwell/ExFilePicker) - Open source Android library. Implement choosing files and directories in your application.
4646
- [Floating Action Button SpeedDial](https://github.com/leinardi/FloatingActionButtonSpeedDial) - A Floating Action Button Speed Dial implementation for Android that follows the Material Design specification.
47-
- [Font Awesome Icons](https://fontawesome.com/) - The iconic SVG, font, and CSS toolkit/
4847
- [Markdown View](https://github.com/falnatsheh/MarkdownView) - MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.
4948
- [Material Design Icons](https://github.com/Templarian/MaterialDesign) - 2200+ Material Design Icons from the Community.
5049
- [rclone](https://github.com/ncw/rclone) - "rsync for cloud storage"

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ android {
66
applicationId "ca.pkay.rcloneexplorer"
77
minSdkVersion 21
88
targetSdkVersion 27
9-
versionCode 12
10-
versionName "1.2.3"
9+
versionCode 13
10+
versionName "1.2.4"
1111
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1212
}
1313
buildTypes {

app/src/main/assets/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### 1.2.4
2+
* **Update:** App shortcut icons are now adaptive and with color
3+
14
### 1.2.3
25
* **New:** Files can be shared with Rclone Explorer
36
* **New:** Tablet layout
12.8 KB
Loading

app/src/main/java/ca/pkay/rcloneexplorer/AboutLibsActivity.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,6 @@ private void createData() {
9999
libraryLicences.put(floatingActionButtonSpeedDial, "Licensed under Apache-2.0");
100100
libraryLicenceUrls.put(floatingActionButtonSpeedDial, "https://github.com/leinardi/FloatingActionButtonSpeedDial/blob/master/LICENSE");
101101

102-
String fontAwesome = "Font Awesome";
103-
libraryNames.add(fontAwesome);
104-
libraryUrls.put(fontAwesome, "https://fontawesome.com/");
105-
libraryLicences.put(fontAwesome, "Licensed under CC BY 4.0");
106-
libraryLicenceUrls.put(fontAwesome, "https://fontawesome.com/license");
107-
108102
String markDownView = "MarkDown View";
109103
libraryNames.add(markDownView);
110104
libraryUrls.put(markDownView, "https://github.com/falnatsheh/MarkdownView");

app/src/main/java/ca/pkay/rcloneexplorer/MainActivity.java

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import android.support.v7.app.AppCompatActivity;
3535
import android.support.v7.widget.Toolbar;
3636
import android.text.InputType;
37+
import android.util.TypedValue;
3738
import android.view.MenuItem;
3839
import android.view.View;
3940
import android.widget.Toast;
@@ -141,6 +142,10 @@ private void applyTheme() {
141142
getTheme().applyStyle(R.style.LightTheme, true);
142143
}
143144

145+
TypedValue typedValue = new TypedValue();
146+
getTheme().resolveAttribute(R.attr.colorPrimaryDark, typedValue, true);
147+
getWindow().setStatusBarColor(typedValue.data);
148+
144149
// set recents app color to the primary color
145150
Bitmap bm = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher_round);
146151
ActivityManager.TaskDescription taskDesc = new ActivityManager.TaskDescription(getString(R.string.app_name), bm, customPrimaryColor);
@@ -368,29 +373,25 @@ private void addRemoteToShortcutList(RemoteItem remoteItem) {
368373
private int getRemoteIcon(String remoteType) {
369374
switch (remoteType) {
370375
case "crypt":
371-
return R.drawable.ic_lock_black;
376+
return R.mipmap.ic_shortcut_lock;
372377
case "amazon cloud drive":
373-
return R.drawable.ic_amazon;
374-
case "b2":
375-
return R.drawable.ic_b2;
378+
return R.mipmap.ic_shortcut_amazon;
376379
case "drive":
377-
return R.drawable.ic_google_drive;
380+
return R.mipmap.ic_shortcut_drive;
378381
case "dropbox":
379-
return R.drawable.ic_dropbox;
382+
return R.mipmap.ic_shortcut_dropbox;
380383
case "google cloud storage":
381-
return R.drawable.ic_google;
384+
return R.mipmap.ic_shortcut_google;
382385
case "onedrive":
383-
return R.drawable.ic_onedrive;
386+
return R.mipmap.ic_shortcut_onedrive;
384387
case "s3":
385-
return R.drawable.ic_amazon;
386-
case "yandex":
387-
return R.drawable.ic_yandex;
388+
return R.mipmap.ic_shortcut_amazon;
388389
case "box":
389-
return R.drawable.ic_box;
390+
return R.mipmap.ic_shortcut_box;
390391
case "sftp":
391-
return R.drawable.ic_terminal;
392+
return R.mipmap.ic_shortcut_terminal;
392393
default:
393-
return R.drawable.ic_cloud;
394+
return R.mipmap.ic_shortcut_cloud;
394395
}
395396
}
396397

app/src/main/java/ca/pkay/rcloneexplorer/RecyclerViewAdapters/RemotesRecyclerViewAdapter.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, final int positio
4949
case "amazon cloud drive":
5050
holder.ivIcon.setImageDrawable(view.getResources().getDrawable(R.drawable.ic_amazon));
5151
break;
52-
case "b2":
53-
holder.ivIcon.setImageDrawable(view.getResources().getDrawable(R.drawable.ic_b2));
54-
break;
5552
case "drive":
5653
holder.ivIcon.setImageDrawable(view.getResources().getDrawable(R.drawable.ic_google_drive));
5754
break;
@@ -67,9 +64,6 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, final int positio
6764
case "s3":
6865
holder.ivIcon.setImageDrawable(view.getResources().getDrawable(R.drawable.ic_amazon));
6966
break;
70-
case "yandex":
71-
holder.ivIcon.setImageDrawable(view.getResources().getDrawable(R.drawable.ic_yandex));
72-
break;
7367
case "box":
7468
holder.ivIcon.setImageDrawable(view.getResources().getDrawable(R.drawable.ic_box));
7569
break;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="108dp"
3+
android:height="108dp"
4+
android:viewportWidth="55.151516"
5+
android:viewportHeight="55.151516">
6+
<group android:translateX="15.320427"
7+
android:translateY="15.575758">
8+
<path
9+
android:pathData="M15.93,17.09C15.75,17.25 15.5,17.26 15.3,17.15C14.41,16.41 14.25,16.07 13.76,15.36C12.29,16.86 11.25,17.31 9.34,17.31C7.09,17.31 5.33,15.92 5.33,13.14C5.33,10.96 6.5,9.5 8.19,8.76C9.65,8.12 11.68,8 13.23,7.83V7.5C13.23,6.84 13.28,6.09 12.9,5.54C12.58,5.05 11.95,4.84 11.4,4.84C10.38,4.84 9.47,5.37 9.25,6.45C9.2,6.69 9,6.93 8.78,6.94L6.18,6.66C5.96,6.61 5.72,6.44 5.78,6.1C6.38,2.95 9.23,2 11.78,2C13.08,2 14.78,2.35 15.81,3.33C17.11,4.55 17,6.18 17,7.95V12.12C17,13.37 17.5,13.93 18,14.6C18.17,14.85 18.21,15.14 18,15.31L15.94,17.09H15.93M13.23,10.56V10C11.29,10 9.24,10.39 9.24,12.67C9.24,13.83 9.85,14.62 10.87,14.62C11.63,14.62 12.3,14.15 12.73,13.4C13.25,12.47 13.23,11.6 13.23,10.56M20.16,19.54C18,21.14 14.82,22 12.1,22C8.29,22 4.85,20.59 2.25,18.24C2.05,18.06 2.23,17.81 2.5,17.95C5.28,19.58 8.75,20.56 12.33,20.56C14.74,20.56 17.4,20.06 19.84,19.03C20.21,18.87 20.5,19.27 20.16,19.54M21.07,18.5C20.79,18.14 19.22,18.33 18.5,18.42C18.31,18.44 18.28,18.26 18.47,18.12C19.71,17.24 21.76,17.5 22,17.79C22.24,18.09 21.93,20.14 20.76,21.11C20.58,21.27 20.41,21.18 20.5,21C20.76,20.33 21.35,18.86 21.07,18.5Z"
10+
android:fillColor="#4caf50"
11+
android:fillAlpha="1"/>
12+
</group>
13+
</vector>

0 commit comments

Comments
 (0)