This repository has been archived by the owner on Sep 30, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 933
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switching branches and caching them to close #52
- Loading branch information
Kosh
committed
Mar 3, 2017
1 parent
4900381
commit 75b5382
Showing
10 changed files
with
297 additions
and
154 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
app/src/main/java/com/fastaccess/data/dao/RepoPathsManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.fastaccess.data.dao; | ||
|
||
import android.support.annotation.NonNull; | ||
import android.support.annotation.Nullable; | ||
|
||
import java.util.ArrayList; | ||
import java.util.HashMap; | ||
|
||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* Created by Kosh on 03 Mar 2017, 10:43 PM | ||
*/ | ||
|
||
@NoArgsConstructor | ||
public class RepoPathsManager { | ||
private HashMap<String, ArrayList<RepoFilesModel>> files = new HashMap<>(); | ||
|
||
@Nullable public ArrayList<RepoFilesModel> getPaths(@NonNull String url, @NonNull String ref) { | ||
return files.get(ref + "/" + url); | ||
} | ||
|
||
public void setFiles(@NonNull String ref, @NonNull String path, @NonNull ArrayList<RepoFilesModel> paths) { | ||
files.put(ref + "/" + path, paths); | ||
} | ||
|
||
public void clear() { | ||
files.clear(); | ||
} | ||
} |
42 changes: 0 additions & 42 deletions
42
app/src/main/java/com/fastaccess/data/dao/RepoPathsModel.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
app/src/main/res/layouts/main_layouts/layout-land/repo_file_header_layout.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout | ||
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="wrap_content" | ||
android:background="@color/universal_primary_dark_color" | ||
android:orientation="horizontal" | ||
android:paddingBottom="@dimen/spacing_micro" | ||
android:paddingEnd="@dimen/spacing_xs_large" | ||
android:paddingStart="@dimen/spacing_xs_large" | ||
android:paddingTop="@dimen/spacing_micro" | ||
tools:showIn="@layout/repo_file_layout"> | ||
|
||
<LinearLayout | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center" | ||
android:layout_weight="1" | ||
android:orientation="horizontal"> | ||
|
||
<com.fastaccess.ui.widgets.ForegroundImageView | ||
android:id="@+id/toParentFolder" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center" | ||
android:contentDescription="@string/switch_branch" | ||
android:padding="@dimen/spacing_normal" | ||
android:src="@drawable/ic_home"/> | ||
|
||
<android.support.v7.widget.RecyclerView | ||
android:id="@+id/recycler" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center" | ||
android:layout_marginStart="@dimen/spacing_xs_large" | ||
android:orientation="horizontal" | ||
app:layoutManager="@string/linear_layout_manager" | ||
tools:listitem="@layout/file_path_row_item"/> | ||
</LinearLayout> | ||
|
||
<LinearLayout | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="0.6" | ||
android:background="@drawable/left_border" | ||
android:clickable="true" | ||
android:orientation="horizontal"> | ||
|
||
<com.fastaccess.ui.widgets.ForegroundImageView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center" | ||
android:contentDescription="@string/switch_branch" | ||
android:padding="@dimen/spacing_normal" | ||
android:src="@drawable/ic_branch"/> | ||
|
||
<android.support.v7.widget.AppCompatSpinner | ||
android:id="@+id/branches" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center" | ||
android:layout_marginEnd="@dimen/spacing_xs_large" | ||
android:layout_marginStart="@dimen/spacing_xs_large" | ||
android:layout_weight="1" | ||
android:spinnerMode="dialog" | ||
app:backgroundTint="?colorAccent" | ||
tools:entries="@array/notification_types"/> | ||
|
||
<ProgressBar | ||
android:id="@+id/branchesProgress" | ||
android:layout_width="24dp" | ||
android:layout_height="24dp" | ||
android:layout_gravity="center" | ||
android:visibility="gone"/> | ||
|
||
|
||
</LinearLayout> | ||
|
||
</LinearLayout> |
Oops, something went wrong.