Skip to content

Commit

Permalink
WIP file caption - Formatting optimizations
Browse files Browse the repository at this point in the history
Signed-off-by: rapterjet2004 <[email protected]>
  • Loading branch information
rapterjet2004 committed Nov 3, 2023
1 parent 7f864ce commit 97e9024
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ class RemoteFileBrowserActivity : AppCompatActivity(), SelectionInterface, Swipe
is RemoteFileBrowserItemsViewModel.FinishState -> {
finishWithResult(state.selectedPaths)
}

else -> {}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

package com.nextcloud.talk.remotefilebrowser.viewmodels

import android.content.res.Resources
import android.util.Log
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
Expand Down Expand Up @@ -96,7 +95,7 @@ constructor(
get() = _selectedPaths

init {
val key = Resources.getSystem().getString(R.string.nc_file_browser_sort_by_key)
val key = appPreferences.context.getString(R.string.nc_file_browser_sort_by_key)
sortingFlow = appPreferences.readString(key)
CoroutineScope(Dispatchers.Main).launch {
var state = appPreferences.sorting
Expand Down
24 changes: 16 additions & 8 deletions app/src/main/res/layout/dialog_file_attachment_preview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,19 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<com.google.android.material.textview.MaterialTextView
android:id="@+id/dialog_file_attachment_preview_filenames"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/standard_margin"
android:textSize="@dimen/headline_text_size"
tools:text="a.png\nb.png\nc.png"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="100dp">

<com.google.android.material.textview.MaterialTextView
android:id="@+id/dialog_file_attachment_preview_filenames"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/standard_margin"
android:textSize="@dimen/headline_text_size"
tools:text="a.png\nb.png\nc.png"/>

</ScrollView>

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/dialog_file_attachment_preview_layout"
Expand All @@ -56,7 +62,9 @@
android:id="@+id/dialog_file_attachment_preview_caption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/nc_caption" />
android:hint="@string/nc_caption"
android:maxLines="3"
tools:text="a.png\nb.png\nc.png"/>

</com.google.android.material.textfield.TextInputLayout>

Expand Down

0 comments on commit 97e9024

Please sign in to comment.