Skip to content

Commit

Permalink
fix: supported mime types, hide cancel button
Browse files Browse the repository at this point in the history
  • Loading branch information
motionman committed Jul 27, 2022
1 parent eacde70 commit 2dde266
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion filestack/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ afterEvaluate {

groupId = 'com.github.boykod'
artifactId = 'smartsuite-filestack'
version = '0.1.1'
version = '0.1.2'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import ua.motionman.filestack.ui.uploadingprogress.UploadingProgressFragment.Com
import ua.motionman.filestack.utils.delegate.viewBinding
import ua.motionman.filestack.utils.extensions.toSelection
import ua.motionman.filestack.utils.source.localSourceData
import ua.motionman.filestack.utils.source.mimeTypes

class SourcesFragment : Fragment(R.layout.sources_fragment) {

Expand Down Expand Up @@ -61,8 +62,6 @@ class SourcesFragment : Fragment(R.layout.sources_fragment) {
}

private fun proceedWithDeviceContentPicker() {
val mimeTypes: Array<String> = arrayOf("application/pdf", "video/*", "image/*")

Intent(Intent.ACTION_OPEN_DOCUMENT).apply {
addCategory(Intent.CATEGORY_OPENABLE)
putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package ua.motionman.filestack.utils.source

val mimeTypes: Array<String> =
arrayOf(
"application/*",
"video/*",
"image/*,",
"audio/*",
"font/*",
"text/*"
)
3 changes: 2 additions & 1 deletion filestack/src/main/res/layout/uploading_progress.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
android:layout_height="wrap_content"
android:layout_margin="24dp"
android:progress="0"
android:progressTint="@color/primary"
android:progressDrawable="@drawable/curved_progress_bar"
android:progressTint="@color/primary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand All @@ -35,6 +35,7 @@
android:layout_marginBottom="16dp"
android:text="@string/cancel_button"
android:textColor="@color/red"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit 2dde266

Please sign in to comment.