Skip to content

Commit

Permalink
fix further review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyScherzinger committed May 29, 2018
1 parent 84401e7 commit c3209d8
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,28 +80,28 @@ public class FileDetailFragment extends FileFragment implements OnClickListener
private static final String ARG_ACCOUNT = "ACCOUNT";
private static final String ARG_ACTIVE_TAB = "TAB";

@Nullable @BindView(R.id.fdProgressBlock)
@Nullable @BindView(R.id.progressBlock)
View downloadProgressContainer;

@Nullable @BindView(R.id.fdCancelBtn)
@Nullable @BindView(R.id.cancelBtn)
ImageButton cancelButton;

@Nullable @BindView(R.id.fdProgressBar)
@Nullable @BindView(R.id.progressBar)
ProgressBar progressBar;

@Nullable @BindView(R.id.fdProgressText)
@Nullable @BindView(R.id.progressText)
TextView progressText;

@Nullable @BindView(R.id.fdFilename)
@Nullable @BindView(R.id.filename)
TextView fileName;

@Nullable @BindView(R.id.fdSize)
@Nullable @BindView(R.id.size)
TextView fileSize;

@Nullable @BindView(R.id.fdModified)
@Nullable @BindView(R.id.modified)
TextView fileModifiedTimestamp;

@Nullable @BindView(R.id.fdFavorite)
@Nullable @BindView(R.id.favorite)
ImageView favoriteIcon;

@Nullable @BindView(R.id.overflow_menu)
Expand Down Expand Up @@ -419,11 +419,11 @@ private boolean optionsItemSelected(MenuItem item) {
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.fdCancelBtn: {
case R.id.cancelBtn: {
((FileDisplayActivity) mContainerActivity).cancelTransference(getFile());
break;
}
case R.id.fdFavorite: {
case R.id.favorite: {
if (getFile().getIsFavorite()) {
mContainerActivity.getFileOperationsHelper().toggleFavoriteFile(getFile(), false);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ public class FileDetailSharingFragment extends Fragment implements UserListAdapt
@BindView(R.id.searchView)
SearchView searchView;

@BindView(R.id.fdshareUsersList)
@BindView(R.id.shareUsersList)
RecyclerView usersList;

@BindView(R.id.fdShareNoUsers)
@BindView(R.id.shareNoUsers)
TextView noList;

@BindView(R.id.share_by_link)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ public void onClick(View v) {
}


// BEWARE: next methods will failed with NullPointerException if called before onCreateView() finishes
// BEWARE: next methods will fail with NullPointerException if called before onCreateView() finishes

private SwitchCompat getShareViaLinkSwitch() {
return (SwitchCompat) getView().findViewById(R.id.shareViaLinkSectionSwitch);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static void setupSearchView(SearchManager searchManager, SearchView searc
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
// return true to prevent the query is processed to be queried;
// return true to prevent the query from being processed;
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/res/drawable/divider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
<size android:height="1dp" />
</shape>
</item>
</layer-list>
</layer-list>
20 changes: 10 additions & 10 deletions src/main/res/layout/file_details_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fdScrollView"
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
Expand All @@ -46,7 +46,7 @@
android:orientation="vertical">

<TextView
android:id="@+id/fdFilename"
android:id="@+id/filename"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="middle"
Expand All @@ -56,14 +56,14 @@
android:textSize="20sp" />

<LinearLayout
android:id="@+id/fdFiledetails"
android:id="@+id/filedetails"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">

<ImageView
android:id="@+id/fdFavorite"
android:id="@+id/favorite"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/standard_eighth_margin"
Expand All @@ -74,7 +74,7 @@
android:src="@drawable/ic_star_outline" />

<TextView
android:id="@+id/fdSize"
android:id="@+id/size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/placeholder_fileSize"
Expand All @@ -94,7 +94,7 @@
android:textSize="@dimen/two_line_secondary_text_size" />

<TextView
android:id="@+id/fdModified"
android:id="@+id/modified"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end"
Expand Down Expand Up @@ -132,7 +132,7 @@
</LinearLayout>

<LinearLayout
android:id="@+id/fdProgressBlock"
android:id="@+id/progressBlock"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/standard_padding"
Expand All @@ -141,7 +141,7 @@
android:orientation="vertical">

<TextView
android:id="@+id/fdProgressText"
android:id="@+id/progressText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/downloader_download_in_progress_ticker" />
Expand All @@ -154,7 +154,7 @@
android:orientation="horizontal">

<ProgressBar
android:id="@+id/fdProgressBar"
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="0dp"
android:layout_height="wrap_content"
Expand All @@ -163,7 +163,7 @@
android:indeterminateOnly="false" />

<ImageButton
android:id="@+id/fdCancelBtn"
android:id="@+id/cancelBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/standard_half_margin"
Expand Down
6 changes: 3 additions & 3 deletions src/main/res/layout/file_details_sharing_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
android:layout_weight="1">

<LinearLayout
android:id="@+id/fdShareContainer"
android:id="@+id/shareContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
Expand Down Expand Up @@ -92,15 +92,15 @@
</LinearLayout>

<android.support.v7.widget.RecyclerView
android:id="@+id/fdshareUsersList"
android:id="@+id/shareUsersList"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:divider="@drawable/divider"
android:dividerHeight="1dp"/>

<TextView
android:id="@+id/fdShareNoUsers"
android:id="@+id/shareNoUsers"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/standard_half_padding"
Expand Down
36 changes: 12 additions & 24 deletions src/main/res/menu/file_details_actions_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,74 +26,62 @@
android:id="@+id/action_rename_file"
android:title="@string/common_rename"
app:showAsAction="never"
android:showAsAction="never"
android:orderInCategory="1" />
android:showAsAction="never" />
<item
android:id="@+id/action_download_file"
android:title="@string/filedetails_download"
app:showAsAction="never"
android:showAsAction="never"
android:orderInCategory="1" />
android:showAsAction="never" />
<item
android:id="@+id/action_send_file"
android:title="@string/common_send"
app:showAsAction="never"
android:showAsAction="never"
android:icon="@drawable/ic_share"
android:orderInCategory="1" />
android:icon="@drawable/ic_share" />
<item
android:id="@+id/action_open_file_with"
android:title="@string/actionbar_open_with"
app:showAsAction="never"
android:showAsAction="never"
android:orderInCategory="1" />
android:showAsAction="never" />
<item
android:id="@+id/action_sync_file"
android:title="@string/filedetails_sync_file"
app:showAsAction="never"
android:showAsAction="never"
android:orderInCategory="1" />
android:showAsAction="never" />
<item
android:id="@+id/action_cancel_sync"
android:title="@string/common_cancel_sync"
app:showAsAction="never"
android:showAsAction="never"
android:orderInCategory="1" />
android:showAsAction="never" />
<item
android:id="@+id/action_keep_files_offline"
android:title="@string/favorite"
app:showAsAction="never"
android:showAsAction="never"
android:orderInCategory="1" />
android:showAsAction="never" />
<item
android:id="@+id/action_unset_keep_files_offline"
android:title="@string/unfavorite"
app:showAsAction="never"
android:showAsAction="never"
android:orderInCategory="1" />
android:showAsAction="never" />
<item
android:id="@+id/action_encrypted"
android:title="@string/encrypted"
app:showAsAction="never"
android:showAsAction="never"
android:orderInCategory="1"/>
android:showAsAction="never" />
<item
android:id="@+id/action_unset_encrypted"
android:title="@string/unset_encrypted"
app:showAsAction="never"
android:showAsAction="never"
android:orderInCategory="1"/>
android:showAsAction="never" />
<item
android:id="@+id/action_set_as_wallpaper"
android:title="@string/set_picture_as"
app:showAsAction="never"
android:showAsAction="never"
android:orderInCategory="1" />
android:showAsAction="never" />
<item
android:id="@+id/action_remove_file"
android:title="@string/common_remove"
app:showAsAction="never"
android:showAsAction="never"
android:orderInCategory="1" />
android:showAsAction="never" />

</menu>
2 changes: 1 addition & 1 deletion src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -787,5 +787,5 @@
<string name="tags">Tags</string>
<string name="sharee_add_failed">Adding sharee failed</string>
<string name="unsharing_failed">Unsharing failed</string>
<string name="updating_share_failed">Updateing share failed</string>
<string name="updating_share_failed">Updating share failed</string>
</resources>

0 comments on commit c3209d8

Please sign in to comment.