Skip to content

Commit

Permalink
Merge pull request #101 from Rashxz/docs_support
Browse files Browse the repository at this point in the history
Support for Microsoft Word, Excel, LibreOffice and PDF
  • Loading branch information
CrazyMarvin authored Jul 14, 2024
2 parents 019c570 + fe40f9b commit eaf4cde
Show file tree
Hide file tree
Showing 30 changed files with 794 additions and 14 deletions.
14 changes: 14 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ android {
targetCompatibility = Versions.jvm
}

packaging {
resources {
excludes.add("META-INF/INDEX.LIST")
excludes.add("META-INF/DEPENDENCIES")
}
}

// Always show the result of every unit test, even if it passes.
/*
testOptions.unitTests.all {
Expand Down Expand Up @@ -182,6 +189,13 @@ dependencies {

//ffmpeg
implementation("com.arthenica:ffmpeg-kit-full:6.0-2.LTS")

//Apache POI
implementation ("org.apache.poi:poi:5.3.0")
implementation ("org.apache.poi:poi-ooxml:5.3.0")
implementation ("org.apache.poi:poi-scratchpad:5.2.2")
implementation ("org.apache.odftoolkit:simple-odf:0.8.2-incubating")
implementation ("com.itextpdf:itext7-core:7.1.16")
}


Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ class VideoMetadataHandler(private val context: Context): MetadataHandler {
inputFile: File,
outputFile: File,
): Boolean {

println(outputFile.absolutePath)
check(mediaType in writableMimeTypes)

val command = "-y -i ${inputFile.absolutePath} -map 0 -map_metadata -1 -c copy ${outputFile.absolutePath}"
val session = FFmpegKit.execute(command)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ package rocks.poopjournal.metadataremover.model.util

enum class SupportedTypes {
IMAGE,
VIDEO
VIDEO,
DOCUMENTS
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ class MainActivity : AppCompatActivity(), OnLastItemClickedListener {
}
}

private val pickMultipleDocuments =
registerForActivityResult(ActivityResultContracts.OpenMultipleDocuments()) { uris ->
if (uris.isNotEmpty()) {
viewModel.getPicketUris(uris)
adapter.setUris(uris, SupportedTypes.DOCUMENTS)
currentSupportedType = SupportedTypes.DOCUMENTS
preparePager(true)
}
}

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
Expand Down Expand Up @@ -174,6 +184,7 @@ class MainActivity : AppCompatActivity(), OnLastItemClickedListener {
showRestartConfirmationDialog(this@MainActivity, onConfirmed = {
metadata.clear()
viewModel.restart()
adapter.restart()
binding.bottomSheet.listMetadata.apply {
val adapter = adapter
if (adapter is MetaAttributeAdapter) {
Expand Down Expand Up @@ -300,10 +311,16 @@ class MainActivity : AppCompatActivity(), OnLastItemClickedListener {
}

override fun onLastItemClicked() {
if (currentSupportedType == SupportedTypes.IMAGE){
launchPhotoPicker()
} else {
launchVideoPicker()
when (currentSupportedType) {
SupportedTypes.IMAGE -> {
launchPhotoPicker()
}
SupportedTypes.VIDEO -> {
launchVideoPicker()
}
else -> {
launchDocumentPicker()
}
}
}

Expand All @@ -315,6 +332,20 @@ class MainActivity : AppCompatActivity(), OnLastItemClickedListener {
pickMultipleVideos.launch(arrayOf("video/*"))
}

private fun launchDocumentPicker(){
val mimeTypes = arrayOf(
"application/msword",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.ms-excel",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/vnd.oasis.opendocument.text",
"application/vnd.oasis.opendocument.spreadsheet",
"application/pdf"
)

pickMultipleDocuments.launch(mimeTypes)
}

private fun handleSendImage(intent: Intent) {
(intent.parcelable<Parcelable>(Intent.EXTRA_STREAM) as? Uri)?.let { uri ->
val uris = arrayListOf<Uri>()
Expand Down Expand Up @@ -371,5 +402,10 @@ class MainActivity : AppCompatActivity(), OnLastItemClickedListener {
launchVideoPicker()
dialog.dismiss()
}

dialogBinding.documentSelection.setOnClickListener {
launchDocumentPicker()
dialog.dismiss()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import android.view.View
import android.view.ViewGroup
import android.widget.ImageButton
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import rocks.poopjournal.metadataremover.R
Expand All @@ -26,6 +27,9 @@ class PageAdapter : RecyclerView.Adapter<PageAdapter.PageViewHolder>() {
val addNewBody: View = itemView.findViewById(R.id.addNewBody)
val addNewButton : ImageButton = itemView.findViewById(R.id.addNewButton)
val playIcon: ImageView = itemView.findViewById(R.id.playIcon)
val documentBackground: View = itemView.findViewById(R.id.documentBackground)
val documentIcon: ImageView = itemView.findViewById(R.id.documentIcon)
val documentType: TextView = itemView.findViewById(R.id.documentType)
}

override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): PageViewHolder {
Expand All @@ -39,6 +43,11 @@ class PageAdapter : RecyclerView.Adapter<PageAdapter.PageViewHolder>() {
if (isLastItem(position)){
holder.addNewBody.visibility = View.VISIBLE
holder.addNewButton.visibility = View.VISIBLE

holder.documentBackground.visibility = View.GONE
holder.documentIcon.visibility = View.GONE
holder.documentType.visibility = View.GONE

holder.addNewBody.setOnClickListener {
lastItemClickedListener?.onLastItemClicked()
}
Expand All @@ -53,14 +62,36 @@ class PageAdapter : RecyclerView.Adapter<PageAdapter.PageViewHolder>() {
Glide.with(holder.imageView)
.load(uri)
.into(holder.imageView)
} else {
} else if (mediaType == SupportedTypes.VIDEO) {
val thumbnail = getThumbnail(holder.imageView.context, uri)
holder.imageView.setImageBitmap(thumbnail)
holder.playIcon.visibility = View.VISIBLE
} else {
holder.documentBackground.visibility = View.VISIBLE
holder.documentIcon.visibility = View.VISIBLE
holder.documentType.visibility = View.VISIBLE

val docType = getMimeTypeFromUri(holder.itemView.context, uri)
holder.documentType.text = docType
}
}
}

private fun getMimeTypeFromUri(context: Context, uri: Uri): String {
val mimeType = context.contentResolver.getType(uri) ?: return "Unknown type"

return when {
mimeType.startsWith("application/vnd.openxmlformats-officedocument.wordprocessingml.document") -> "DOCX"
mimeType.startsWith("application/msword") -> "DOC"
mimeType.startsWith("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") -> "XLSX"
mimeType.startsWith("application/vnd.ms-excel") -> "XLS"
mimeType.startsWith("application/vnd.oasis.opendocument.text") -> "ODT"
mimeType.startsWith("application/vnd.oasis.opendocument.spreadsheet") -> "ODS"
mimeType.startsWith("application/pdf") -> "PDF"
else -> "Other ($mimeType)"
}
}

override fun getItemCount(): Int {
return imageUris.size
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package rocks.poopjournal.metadataremover.viewmodel.usecases

import android.content.Context
import rocks.poopjournal.metadataremover.metadata.handlers.ApplyAllMetadataHandler
import rocks.poopjournal.metadataremover.metadata.handlers.DocumentMetadataHandler
import rocks.poopjournal.metadataremover.metadata.handlers.ExifMetadataHandler
import rocks.poopjournal.metadataremover.metadata.handlers.FirstMatchMetadataHandler
import rocks.poopjournal.metadataremover.metadata.handlers.PngMetadataHandler
Expand All @@ -17,7 +18,8 @@ class MetadataHandler @Inject constructor(
ExifMetadataHandler(context),
// DrewMetadataReader.toMetadataHandler(),
PngMetadataHandler,
VideoMetadataHandler(context)
VideoMetadataHandler(context),
DocumentMetadataHandler(context)
)
// , NopMetadataHandler // For testing purposes only. TODO Remove after testing.
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class SaveFiles @Inject constructor(
val collection = when {
mimeType?.startsWith("image/") == true -> MediaStore.Images.Media.EXTERNAL_CONTENT_URI
mimeType?.startsWith("video/") == true -> MediaStore.Video.Media.EXTERNAL_CONTENT_URI
else -> throw IllegalArgumentException("Unsupported MIME type: $mimeType")
else -> MediaStore.Files.getContentUri("external")
}

val uriToInsert = contentResolver.insert(collection, contentValues)
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_apps.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M4,8h4L8,4L4,4v4zM10,20h4v-4h-4v4zM4,20h4v-4L4,16v4zM4,14h4v-4L4,10v4zM10,14h4v-4h-4v4zM16,4v4h4L20,4h-4zM10,8h4L14,4h-4v4zM16,14h4v-4h-4v4zM16,20h4v-4h-4v4z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M22.7,19l-9.1,-9.1c0.9,-2.3 0.4,-5 -1.5,-6.9 -2,-2 -5,-2.4 -7.4,-1.3L9,6 6,9 1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1c1.9,1.9 4.6,2.4 6.9,1.5l9.1,9.1c0.4,0.4 1,0.4 1.4,0l2.3,-2.3c0.5,-0.4 0.5,-1.1 0.1,-1.4z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_business.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M12,7L12,3L2,3v18h20L22,7L12,7zM6,19L4,19v-2h2v2zM6,15L4,15v-2h2v2zM6,11L4,11L4,9h2v2zM6,7L4,7L4,5h2v2zM10,19L8,19v-2h2v2zM10,15L8,15v-2h2v2zM10,11L8,11L8,9h2v2zM10,7L8,7L8,5h2v2zM20,19h-8v-2h2v-2h-2v-2h2v-2h-2L12,9h8v10zM18,11h-2v2h2v-2zM18,15h-2v2h2v-2z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_calendar_today.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M20,3h-1L19,1h-2v2L7,3L7,1L5,1v2L4,3c-1.1,0 -2,0.9 -2,2v16c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,5c0,-1.1 -0.9,-2 -2,-2zM20,21L4,21L4,8h16v13z"/>

</vector>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M12,2l-5.5,9h11z"/>

<path android:fillColor="@android:color/white" android:pathData="M17.5,17.5m-4.5,0a4.5,4.5 0,1 1,9 0a4.5,4.5 0,1 1,-9 0"/>

<path android:fillColor="@android:color/white" android:pathData="M3,13.5h8v8H3z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_description.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M14,2L6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8l-6,-6zM16,18L8,18v-2h8v2zM16,14L8,14v-2h8v2zM13,9L13,3.5L18.5,9L13,9z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_document.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8l-6,-6L6,2zM13,9L13,3.5L18.5,9L13,9z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_edit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_error.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-2h2v2zM13,13h-2L11,7h2v6z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_factory.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M22,10v12H2V10l7,-3v2l5,-2l0,0l0,3H22zM17.2,8.5L18,2h3l0.8,6.5H17.2zM11,18h2v-4h-2V18zM7,18h2v-4H7V18zM17,14h-2v4h2V14z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_file_type.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8l-6,-6L6,2zM13,9L13,3.5L18.5,9L13,9z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_label.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M17.63,5.84C17.27,5.33 16.67,5 16,5L5,5.01C3.9,5.01 3,5.9 3,7v10c0,1.1 0.9,1.99 2,1.99L16,19c0.67,0 1.27,-0.33 1.63,-0.84L22,12l-4.37,-6.16z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_language.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM18.92,8h-2.95c-0.32,-1.25 -0.78,-2.45 -1.38,-3.56 1.84,0.63 3.37,1.91 4.33,3.56zM12,4.04c0.83,1.2 1.48,2.53 1.91,3.96h-3.82c0.43,-1.43 1.08,-2.76 1.91,-3.96zM4.26,14C4.1,13.36 4,12.69 4,12s0.1,-1.36 0.26,-2h3.38c-0.08,0.66 -0.14,1.32 -0.14,2 0,0.68 0.06,1.34 0.14,2L4.26,14zM5.08,16h2.95c0.32,1.25 0.78,2.45 1.38,3.56 -1.84,-0.63 -3.37,-1.9 -4.33,-3.56zM8.03,8L5.08,8c0.96,-1.66 2.49,-2.93 4.33,-3.56C8.81,5.55 8.35,6.75 8.03,8zM12,19.96c-0.83,-1.2 -1.48,-2.53 -1.91,-3.96h3.82c-0.43,1.43 -1.08,2.76 -1.91,3.96zM14.34,14L9.66,14c-0.09,-0.66 -0.16,-1.32 -0.16,-2 0,-0.68 0.07,-1.35 0.16,-2h4.68c0.09,0.65 0.16,1.32 0.16,2 0,0.68 -0.07,1.34 -0.16,2zM14.59,19.56c0.6,-1.11 1.06,-2.31 1.38,-3.56h2.95c-0.96,1.65 -2.49,2.93 -4.33,3.56zM16.36,14c0.08,-0.66 0.14,-1.32 0.14,-2 0,-0.68 -0.06,-1.34 -0.14,-2h3.38c0.16,0.64 0.26,1.31 0.26,2s-0.1,1.36 -0.26,2h-3.38z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_loop.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M12,4L12,1L8,5l4,4L12,6c3.31,0 6,2.69 6,6 0,1.01 -0.25,1.97 -0.7,2.8l1.46,1.46C19.54,15.03 20,13.57 20,12c0,-4.42 -3.58,-8 -8,-8zM12,18c-3.31,0 -6,-2.69 -6,-6 0,-1.01 0.25,-1.97 0.7,-2.8L5.24,7.74C4.46,8.97 4,10.43 4,12c0,4.42 3.58,8 8,8v3l4,-4 -4,-4v3z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_print.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M19,8L5,8c-1.66,0 -3,1.34 -3,3v6h4v4h12v-4h4v-6c0,-1.66 -1.34,-3 -3,-3zM16,19L8,19v-5h8v5zM19,12c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1zM18,3L6,3v4h12L18,3z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_subject.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M14,17L4,17v2h10v-2zM20,9L4,9v2h16L20,9zM4,15h16v-2L4,13v2zM4,5v2h16L20,5L4,5z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_supervisor_account.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M16.5,12c1.38,0 2.49,-1.12 2.49,-2.5S17.88,7 16.5,7C15.12,7 14,8.12 14,9.5s1.12,2.5 2.5,2.5zM9,11c1.66,0 2.99,-1.34 2.99,-3S10.66,5 9,5C7.34,5 6,6.34 6,8s1.34,3 3,3zM16.5,14c-1.83,0 -5.5,0.92 -5.5,2.75L11,19h11v-2.25c0,-1.83 -3.67,-2.75 -5.5,-2.75zM9,13c-2.33,0 -7,1.17 -7,3.5L2,19h7v-2.25c0,-0.85 0.33,-2.34 2.37,-3.47C10.5,13.1 9.66,13 9,13z"/>

</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_update.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M21,10.12h-6.78l2.74,-2.82c-2.73,-2.7 -7.15,-2.8 -9.88,-0.1c-2.73,2.71 -2.73,7.08 0,9.79s7.15,2.71 9.88,0C18.32,15.65 19,14.08 19,12.1h2c0,1.98 -0.88,4.55 -2.64,6.29c-3.51,3.48 -9.21,3.48 -12.72,0c-3.5,-3.47 -3.53,-9.11 -0.02,-12.58s9.14,-3.47 12.65,0L21,3V10.12zM12.5,8v4.25l3.5,2.08l-0.72,1.21L11,13V8H12.5z"/>

</vector>
25 changes: 25 additions & 0 deletions app/src/main/res/layout/image_child.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,30 @@
android:background="@drawable/add_circle"
android:layout_gravity="center"/>

<View
android:id="@+id/documentBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/rounded_corner_background"
android:backgroundTint="@color/color_accent"
android:visibility="gone"/>

<ImageView
android:id="@+id/documentIcon"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/ic_document"
app:tint="@color/white"
android:layout_gravity="center"
android:visibility="gone"/>

<TextView
android:id="@+id/documentType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PDF"
android:textSize="18sp"
android:layout_gravity="center"
android:visibility="gone"/>

</FrameLayout>
Loading

0 comments on commit eaf4cde

Please sign in to comment.