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

+57-2
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

-1
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

+2-2
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

+3
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

-6
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

+15-14
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

-6
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;
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>

app/src/main/res/drawable/ic_b2.xml

-4
This file was deleted.
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="60.60606"
5+
android:viewportHeight="60.60606">
6+
<group android:translateX="18.30303"
7+
android:translateY="17.741863">
8+
<path
9+
android:pathData="M15.39,14.04V14.04C15.39,12.62 14.24,11.47 12.82,11.47C11.41,11.47 10.26,12.62 10.26,14.04V14.04C10.26,15.45 11.41,16.6 12.82,16.6C14.24,16.6 15.39,15.45 15.39,14.04M17.1,14.04C17.1,16.4 15.18,18.31 12.82,18.31C11.19,18.31 9.77,17.39 9.05,16.04C8.33,17.39 6.91,18.31 5.28,18.31C2.94,18.31 1.04,16.43 1,14.11V14.11H1V7H1V7C1,6.56 1.39,6.18 1.86,6.18C2.33,6.18 2.7,6.56 2.71,7V7H2.71V10.62C3.43,10.08 4.32,9.76 5.28,9.76C6.91,9.76 8.33,10.68 9.05,12.03C9.77,10.68 11.19,9.76 12.82,9.76C15.18,9.76 17.1,11.68 17.1,14.04V14.04M7.84,14.04V14.04C7.84,12.62 6.69,11.47 5.28,11.47C3.86,11.47 2.71,12.62 2.71,14.04V14.04C2.71,15.45 3.86,16.6 5.28,16.6C6.69,16.6 7.84,15.45 7.84,14.04M22.84,16.96V16.96C22.95,17.12 23,17.3 23,17.47C23,17.73 22.88,18 22.66,18.15C22.5,18.26 22.33,18.32 22.15,18.32C21.9,18.32 21.65,18.21 21.5,18L19.59,15.47L17.7,18V18C17.53,18.21 17.28,18.32 17.03,18.32C16.85,18.32 16.67,18.26 16.5,18.15C16.29,18 16.17,17.72 16.17,17.46C16.17,17.29 16.23,17.11 16.33,16.96V16.96H16.33V16.96L18.5,14.04L16.33,11.11V11.11H16.33V11.11C16.22,10.96 16.17,10.79 16.17,10.61C16.17,10.35 16.29,10.1 16.5,9.93C16.89,9.65 17.41,9.72 17.7,10.09V10.09L19.59,12.61L21.5,10.09C21.76,9.72 22.29,9.65 22.66,9.93C22.89,10.1 23,10.36 23,10.63C23,10.8 22.95,10.97 22.84,11.11V11.11H22.84V11.11L20.66,14.04L22.84,16.96V16.96H22.84Z"
10+
android:fillColor="#4caf50"
11+
android:fillAlpha="1"/>
12+
</group>
13+
</vector>
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="65.454544"
5+
android:viewportHeight="65.454544">
6+
<group android:translateX="20.727272"
7+
android:translateY="20.727272">
8+
<path
9+
android:pathData="M19.35,10.03C18.67,6.59 15.64,4 12,4C9.11,4 6.6,5.64 5.35,8.03C2.34,8.36 0,10.9 0,14A6,6 0,0 0,6 20H19A5,5 0,0 0,24 15C24,12.36 21.95,10.22 19.35,10.03Z"
10+
android:fillColor="#4caf50"
11+
android:fillAlpha="1"/>
12+
</group>
13+
</vector>
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="59.39394"
5+
android:viewportHeight="59.39394">
6+
<group android:translateX="17.69697"
7+
android:translateY="18.796858">
8+
<path
9+
android:pathData="M7.71,3.5L1.15,15L4.58,21L11.13,9.5M9.73,15L6.3,21H19.42L22.85,15M22.28,14L15.42,2H8.58L8.57,2L15.43,14H22.28Z"
10+
android:fillColor="#4caf50"
11+
android:fillAlpha="1"/>
12+
</group>
13+
</vector>
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="58.18182"
5+
android:viewportHeight="58.18182">
6+
<group android:translateX="17.09091"
7+
android:translateY="16.552189">
8+
<path
9+
android:pathData="M12,14.56L16.35,18.16L18.2,16.95V18.3L12,22L5.82,18.3V16.95L7.68,18.16L12,14.56M7.68,2.5L12,6.09L16.32,2.5L22.5,6.5L18.23,9.94L22.5,13.36L16.32,17.39L12,13.78L7.68,17.39L1.5,13.36L5.77,9.94L1.5,6.5L7.68,2.5M12,13.68L18.13,9.94L12,6.19L5.87,9.94L12,13.68Z"
10+
android:fillColor="#4caf50"
11+
android:fillAlpha="1"/>
12+
</group>
13+
</vector>
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="54.545456"
5+
android:viewportHeight="54.545456">
6+
<group android:translateX="15.777778"
7+
android:translateY="15.272727">
8+
<path
9+
android:pathData="M21.35,11.1H12.18V13.83H18.69C18.36,17.64 15.19,19.27 12.19,19.27C8.36,19.27 5,16.25 5,12C5,7.9 8.2,4.73 12.2,4.73C15.29,4.73 17.1,6.7 17.1,6.7L19,4.72C19,4.72 16.56,2 12.1,2C6.42,2 2.03,6.8 2.03,12C2.03,17.05 6.16,22 12.25,22C17.6,22 21.5,18.33 21.5,12.91C21.5,11.76 21.35,11.1 21.35,11.1V11.1Z"
10+
android:fillColor="#4caf50"
11+
android:fillAlpha="1"/>
12+
</group>
13+
</vector>
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="57.575756"
5+
android:viewportHeight="57.575756">
6+
<group android:translateX="16.787878"
7+
android:translateY="18.120651">
8+
<path
9+
android:pathData="M12,17A2,2 0,0 0,14 15C14,13.89 13.1,13 12,13A2,2 0,0 0,10 15A2,2 0,0 0,12 17M18,8A2,2 0,0 1,20 10V20A2,2 0,0 1,18 22H6A2,2 0,0 1,4 20V10C4,8.89 4.9,8 6,8H7V6A5,5 0,0 1,12 1A5,5 0,0 1,17 6V8H18M12,3A3,3 0,0 0,9 6V8H15V6A3,3 0,0 0,12 3Z"
10+
android:fillColor="#4caf50"
11+
android:fillAlpha="1"/>
12+
</group>
13+
</vector>
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="54.545456"
5+
android:viewportHeight="54.545456">
6+
<group android:translateX="15.272727"
7+
android:translateY="15.272727">
8+
<path
9+
android:pathData="M20.08,13.64C21.17,13.81 22,14.75 22,15.89C22,16.78 21.5,17.55 20.75,17.92L20.58,18H9.18L9.16,18V18C7.71,18 6.54,16.81 6.54,15.36C6.54,13.9 7.72,12.72 9.18,12.72L9.4,12.73L9.39,12.53A3.3,3.3 0,0 1,12.69 9.23C13.97,9.23 15.08,9.96 15.63,11C16.08,10.73 16.62,10.55 17.21,10.55A2.88,2.88 0,0 1,20.09 13.43L20.08,13.64M8.82,12.16C7.21,12.34 5.96,13.7 5.96,15.36C5.96,16.04 6.17,16.66 6.5,17.18H4.73A2.73,2.73 0,0 1,2 14.45C2,13 3.12,11.83 4.53,11.73L4.46,11.06C4.46,9.36 5.84,8 7.54,8C8.17,8 8.77,8.18 9.26,8.5C9.95,7.11 11.4,6.15 13.07,6.15C15.27,6.15 17.08,7.83 17.3,9.97H17.21C16.73,9.97 16.27,10.07 15.84,10.25C15.12,9.25 13.96,8.64 12.69,8.64C10.67,8.64 9,10.19 8.82,12.16Z"
10+
android:fillColor="#4caf50"
11+
android:fillAlpha="1"/>
12+
</group>
13+
</vector>
+8-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
<vector android:height="24dp" android:viewportHeight="16"
2-
android:viewportWidth="14" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
3-
<path android:fillColor="#FF000000" android:fillType="evenOdd" android:pathData="M7,10h4v1L7,11v-1zM4,11l3,-3 -3,-3 -0.75,0.75L5.5,8l-2.25,2.25L4,11zM14,3v10c0,0.55 -0.45,1 -1,1L1,14c-0.55,0 -1,-0.45 -1,-1L0,3c0,-0.55 0.45,-1 1,-1h12c0.55,0 1,0.45 1,1zM13,3L1,3v10h12L13,3z"/>
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M17,2A2,2 0,0 1,19 4V14A2,2 0,0 1,17 16H13V18H14A1,1 0,0 1,15 19H22V21H15A1,1 0,0 1,14 22H10A1,1 0,0 1,9 21H2V19H9A1,1 0,0 1,10 18H11V16H7A2,2 0,0 1,5 14V4A2,2 0,0 1,7 2H17M7,6L11,10L7,14H9.85L13.13,10.72C13.5,10.33 13.5,9.7 13.13,9.3L9.83,6H7M17,12H14V14H17V12Z"/>
49
</vector>
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="54.545456"
5+
android:viewportHeight="54.545456">
6+
<group android:translateX="15.272727"
7+
android:translateY="15.272727">
8+
<path
9+
android:pathData="M17,2A2,2 0,0 1,19 4V14A2,2 0,0 1,17 16H13V18H14A1,1 0,0 1,15 19H22V21H15A1,1 0,0 1,14 22H10A1,1 0,0 1,9 21H2V19H9A1,1 0,0 1,10 18H11V16H7A2,2 0,0 1,5 14V4A2,2 0,0 1,7 2H17M7,6L11,10L7,14H9.85L13.13,10.72C13.5,10.33 13.5,9.7 13.13,9.3L9.83,6H7M17,12H14V14H17V12Z"
10+
android:fillColor="#4caf50"
11+
android:fillAlpha="1"/>
12+
</group>
13+
</vector>

0 commit comments

Comments
 (0)