Skip to content

Commit

Permalink
Merge pull request #67 from kaczmarkiewiczp/dev
Browse files Browse the repository at this point in the history
Tablet layout
  • Loading branch information
patrykcoding authored May 1, 2018
2 parents 13d0969 + bbaf329 commit e5a3c2c
Show file tree
Hide file tree
Showing 9 changed files with 195 additions and 2 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "ca.pkay.rcloneexplorer"
minSdkVersion 21
targetSdkVersion 27
versionCode 11
versionName "1.2.2"
versionCode 12
versionName "1.2.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/assets/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### 1.2.3
* **New:** Files can be shared with Rclone Explorer
* **New:** Tablet layout
* **Fix:** Wait for streaming service be available before streaming

***

### 1.2.2
* **Update:** Rclone to version 1.41
* **New:** App shortcuts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,14 @@ public void onClick(View v) {
context.getTheme ().resolveAttribute (R.attr.colorAccent, accentColorValue, true);
view.findViewById(R.id.bottom_bar).setBackgroundColor(accentColorValue.data);
view.findViewById(R.id.move_bar).setBackgroundColor(accentColorValue.data);
if (view.findViewById(R.id.background) != null) {
view.findViewById(R.id.background).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onClickOutsideOfView();
}
});
}

setBottomBarClickListeners(view);

Expand Down Expand Up @@ -521,6 +529,14 @@ private void sortDirectory() {
}
}

private void onClickOutsideOfView() {
if (recyclerViewAdapter.isInSelectMode()) {
recyclerViewAdapter.cancelSelection();
} else if (recyclerViewAdapter.isInMoveMode()) {
cancelMoveClicked();
}
}

@Override
public void onAttach(Context context) {
super.onAttach(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ public int getNumberOfSelectedItems() {
return selectedItems.size();
}

public Boolean isInMoveMode() {
return isInMoveMode;
}

private void onClickAction(FileItem item) {
if (item.isDir() && null != listener) {
listener.onDirectoryClicked(item);
Expand Down
33 changes: 33 additions & 0 deletions app/src/main/res/layout-sw720dp/activity_about.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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_height="match_parent"
android:background="?attr/backgroundColor"
tools:context=".AboutActivity">

<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />

</android.support.design.widget.AppBarLayout>

<include
android:id="@+id/content_about"
android:layout_width="600dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_gravity="center_horizontal"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
layout="@layout/content_about" />

</android.support.design.widget.CoordinatorLayout>
32 changes: 32 additions & 0 deletions app/src/main/res/layout-sw720dp/activity_changelog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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_height="match_parent"
android:background="?attr/backgroundColor"
tools:context=".ChangelogActivity">

<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />

</android.support.design.widget.AppBarLayout>

<include
android:id="@+id/markdownView"
android:layout_width="600dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
layout="@layout/content_changelog" />

</android.support.design.widget.CoordinatorLayout>
23 changes: 23 additions & 0 deletions app/src/main/res/layout-sw720dp/content_about_libs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".AboutLibsActivity"
tools:showIn="@layout/activity_about_libs">

<android.support.v7.widget.RecyclerView
android:id="@+id/about_libs_list"
android:layout_width="600dp"
android:layout_height="match_parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layoutManager="LinearLayoutManager"
tools:listitem="@layout/about_libraries_item">

</android.support.v7.widget.RecyclerView>
</android.support.constraint.ConstraintLayout>
78 changes: 78 additions & 0 deletions app/src/main/res/layout-sw720dp/fragment_file_explorer_list.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>

<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:background="?attr/backgroundColor">

<include
layout="@layout/empty_directory_state" />

<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/file_explorer_srl"
android:layout_width="600dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_above="@+id/bottom_bar" >

<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/file_explorer_list"
android:clipToPadding="false"
android:paddingBottom="54dp"
app:layoutManager="LinearLayoutManager"
tools:listitem="@layout/fragment_file_explorer_item" />
</android.support.v4.widget.SwipeRefreshLayout>

<com.leinardi.android.speeddial.SpeedDialOverlayLayout
android:id="@+id/fab_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/fabOverlayColor"
app:clickable_overlay="true"/>

<com.leinardi.android.speeddial.SpeedDialView
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="2dp"
app:layout_behavior="@string/speeddial_scrolling_view_snackbar_behavior"
app:sdExpansionMode="top"
app:sdFabCloseSrc="@drawable/ic_close"
app:sdFabRotateOnToggle="true"
app:srcCompat="@drawable/ic_add" />

<include
android:id="@+id/bottom_bar"
android:layout_width="600dp"
android:layout_height="56dp"
android:orientation="horizontal"
android:layout_gravity="bottom|center"
android:background="@color/colorPrimary"
android:elevation="8dp"
android:visibility="gone"
android:clickable="true"
tools:visibility="visible"
android:focusable="true"
layout="@layout/bottom_bar"/>

<include
android:id="@+id/move_bar"
android:layout_width="600dp"
android:layout_height="56dp"
android:orientation="horizontal"
android:layout_gravity="bottom|center"
android:background="@color/colorPrimary"
android:elevation="8dp"
android:visibility="gone"
android:clickable="true"
android:focusable="true"
layout="@layout/move_bar"/>
</android.support.design.widget.CoordinatorLayout>

0 comments on commit e5a3c2c

Please sign in to comment.