diff --git a/app/WikiSpot/.idea/codeStyles/Project.xml b/app/WikiSpot/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..7643783 --- /dev/null +++ b/app/WikiSpot/.idea/codeStyles/Project.xml @@ -0,0 +1,123 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/WikiSpot/.idea/codeStyles/codeStyleConfig.xml b/app/WikiSpot/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/app/WikiSpot/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/app/WikiSpot/.idea/compiler.xml b/app/WikiSpot/.idea/compiler.xml index 61a9130..fb7f4a8 100644 --- a/app/WikiSpot/.idea/compiler.xml +++ b/app/WikiSpot/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/app/WikiSpot/.idea/misc.xml b/app/WikiSpot/.idea/misc.xml index d5d35ec..860da66 100644 --- a/app/WikiSpot/.idea/misc.xml +++ b/app/WikiSpot/.idea/misc.xml @@ -1,6 +1,6 @@ - + diff --git a/app/WikiSpot/.idea/runConfigurations.xml b/app/WikiSpot/.idea/runConfigurations.xml new file mode 100644 index 0000000..797acea --- /dev/null +++ b/app/WikiSpot/.idea/runConfigurations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/ic_launcher-playstore.png b/app/WikiSpot/app/src/main/ic_launcher-playstore.png index d39dc90..5ffb030 100644 Binary files a/app/WikiSpot/app/src/main/ic_launcher-playstore.png and b/app/WikiSpot/app/src/main/ic_launcher-playstore.png differ diff --git a/app/WikiSpot/app/src/main/java/com/example/wikispot/adapters/FileViewsAdapter.kt b/app/WikiSpot/app/src/main/java/com/example/wikispot/adapters/FileViewsAdapter.kt index 4155e77..db8b88d 100644 --- a/app/WikiSpot/app/src/main/java/com/example/wikispot/adapters/FileViewsAdapter.kt +++ b/app/WikiSpot/app/src/main/java/com/example/wikispot/adapters/FileViewsAdapter.kt @@ -9,6 +9,8 @@ import android.view.View import android.view.ViewGroup import android.view.animation.Animation import android.view.animation.AnimationUtils +import android.widget.RelativeLayout +import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.content.ContextCompat.startActivity import androidx.core.view.setPadding import androidx.recyclerview.widget.RecyclerView @@ -32,6 +34,7 @@ class FileViewsAdapter(private val context: Context, private val fileViews: Arra var textInfo: String? = null var imgInfo: String? = null var pdfUrl: String? = null + var generalUrl: String? = null var opened = false init { @@ -39,7 +42,9 @@ class FileViewsAdapter(private val context: Context, private val fileViews: Arra if (!opened) { itemView.downloadFileBtn.visibility = View.VISIBLE itemView.downloadFileBtn.startAnimation(fadeIn) - itemView.showFileBtn.startAnimation(rotateOpen) + if (generalUrl == null) { + itemView.showFileBtn.startAnimation(rotateOpen) + } fileView?.let { textInfo?.let { @@ -70,17 +75,18 @@ class FileViewsAdapter(private val context: Context, private val fileViews: Arra pdfUrl?.let { itemView.pdfContent.visibility = View.VISIBLE ServerManagement.serverManager.loadPdfView(itemView.pdfContent, pdfUrl!!, true) - println("current page is: ${itemView.pdfContent.currentPage}") } } } else { - itemView.showFileBtn.startAnimation(rotateClose) - itemView.textContent.textSize = 0F - itemView.textContent.setPadding(0) - + if (generalUrl == null) { + itemView.showFileBtn.startAnimation(rotateClose) + } val downloadBtnVanishActionThread = Thread(DownloadBtnVanishAction()) downloadBtnVanishActionThread.start() + itemView.textContent.textSize = 0F + itemView.textContent.setPadding(0) + itemView.imageContent.visibility = View.GONE itemView.pdfContent.visibility = View.GONE } @@ -109,6 +115,11 @@ class FileViewsAdapter(private val context: Context, private val fileViews: Arra val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(pdfUrl)) startActivity(context, browserIntent, null) } + + generalUrl?.let { + val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(generalUrl)) + startActivity(context, browserIntent, null) + } } } @@ -123,6 +134,20 @@ class FileViewsAdapter(private val context: Context, private val fileViews: Arra fileView.pdfUrl?.let { pdfUrl = it } + fileView.generalUrl?.let { + generalUrl = it + itemView.showFileBtn.visibility = View.INVISIBLE + // setting new margins + + var params = itemView.downloadFileBtn.layoutParams as ConstraintLayout.LayoutParams + params.marginEnd = 24 + itemView.downloadFileBtn.layoutParams = params + + params = itemView.showFileBtn.layoutParams as ConstraintLayout.LayoutParams + params.marginEnd = 0 + itemView.showFileBtn.layoutParams = params + + } itemView.filenameText.text = fileView.filename.replace("_", " ") itemView.fileDescription.text = fileView.fileDescription diff --git a/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/infoFragment.kt b/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/infoFragment.kt index d05e7a3..9f12a3b 100644 --- a/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/infoFragment.kt +++ b/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/infoFragment.kt @@ -41,6 +41,8 @@ class infoFragment : Fragment(R.layout.fragment_info) { updateSensorsRecyclerView() updateFileViewsRecyclerView() + //file_views_recycler_view.isNestedScrollingEnabled = false + try { executeLoadFunction = args.executeLoadFuntion } catch (e: Throwable) { @@ -168,7 +170,7 @@ class infoFragment : Fragment(R.layout.fragment_info) { } // handling images - if ("jpg png".contains(filetype)) { + else if ("jpg png".contains(filetype)) { val fileView = FileView(filetype, filename, fileDescription, null, "$serverId|||||$filename.$filetype") if (!FileViewsSupplier.checkIfContains(fileView)) { FileViewsSupplier.appendFileView(fileView) @@ -177,7 +179,7 @@ class infoFragment : Fragment(R.layout.fragment_info) { } // handling pdf files - if ("pdf".contains(filetype)) { + else if ("pdf".contains(filetype)) { val fileView = FileView(filetype, filename, fileDescription, null, null, "${ServerManagement.baseUrl}files/$serverId/$filename.$filetype") if (!FileViewsSupplier.checkIfContains(fileView)) { FileViewsSupplier.appendFileView(fileView) @@ -185,6 +187,14 @@ class infoFragment : Fragment(R.layout.fragment_info) { } } + + else { + val fileView = FileView(filetype, filename, fileDescription, null, null, null, "${ServerManagement.baseUrl}files/$serverId/$filename.$filetype") + if (!FileViewsSupplier.checkIfContains(fileView)) { + FileViewsSupplier.appendFileView(fileView) + updateFileViewsRecyclerView() + } + } } } catch (e: Throwable) { println("[debug] exception in infoFragment load data request Exception: $e") } } @@ -290,6 +300,7 @@ class infoFragment : Fragment(R.layout.fragment_info) { try { file_views_recycler_view.post { val layoutManager = LinearLayoutManager(context) + layoutManager.orientation = LinearLayoutManager.VERTICAL file_views_recycler_view.layoutManager = layoutManager diff --git a/app/WikiSpot/app/src/main/java/com/example/wikispot/modelsForAdapters/FilesListModel.kt b/app/WikiSpot/app/src/main/java/com/example/wikispot/modelsForAdapters/FilesListModel.kt index de0cea6..7977e73 100644 --- a/app/WikiSpot/app/src/main/java/com/example/wikispot/modelsForAdapters/FilesListModel.kt +++ b/app/WikiSpot/app/src/main/java/com/example/wikispot/modelsForAdapters/FilesListModel.kt @@ -1,7 +1,8 @@ package com.example.wikispot.modelsForAdapters data class FileView(val filetype: String, val filename: String, val fileDescription: String, - var textInfo: String? = null, var imgInfo: String? = null, var pdfUrl: String? = null) + var textInfo: String? = null, var imgInfo: String? = null, var pdfUrl: String? = null, + var generalUrl: String? = null) object FileViewsSupplier { diff --git a/app/WikiSpot/app/src/main/res/drawable/ic_launcher_background.xml b/app/WikiSpot/app/src/main/res/drawable/ic_launcher_background.xml deleted file mode 100644 index 07d5da9..0000000 --- a/app/WikiSpot/app/src/main/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/WikiSpot/app/src/main/res/layout/fragment_info.xml b/app/WikiSpot/app/src/main/res/layout/fragment_info.xml index 3c0b5c7..e4d7e89 100644 --- a/app/WikiSpot/app/src/main/res/layout/fragment_info.xml +++ b/app/WikiSpot/app/src/main/res/layout/fragment_info.xml @@ -1,5 +1,5 @@ - + android:layout_height="wrap_content" + android:nestedScrollingEnabled="false"/> + android:layout_height="wrap_content" + android:nestedScrollingEnabled="false" /> - \ No newline at end of file + \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/layout/fragment_settings.xml b/app/WikiSpot/app/src/main/res/layout/fragment_settings.xml index 762cc62..233e070 100644 --- a/app/WikiSpot/app/src/main/res/layout/fragment_settings.xml +++ b/app/WikiSpot/app/src/main/res/layout/fragment_settings.xml @@ -47,7 +47,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="32dp" - android:text="More colors" + android:text="@string/more_colors" android:background="@drawable/text_background_gradient" android:padding="5dp" android:textColor="?attr/textOnTextBgColor" @@ -64,6 +64,7 @@ android:layout_marginStart="16dp" app:layout_constraintBottom_toBottomOf="@+id/moreColorsSwitchText" app:layout_constraintStart_toEndOf="@+id/moreColorsSwitchText" - app:layout_constraintTop_toTopOf="@+id/moreColorsSwitchText" /> + app:layout_constraintTop_toTopOf="@+id/moreColorsSwitchText" + tools:ignore="UseSwitchCompatOrMaterialXml" /> \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index 7353dbd..036d09b 100644 --- a/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index 7353dbd..036d09b 100644 --- a/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher.png index 8c6e630..87eab67 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png index 1528974..a36a81f 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and b/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_round.png index 6f7a1e6..1ba917c 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher.png index f500abb..7cda595 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png index d697cd1..30b0e2c 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and b/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_round.png index 0f6457a..9bb759f 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 1112784..2596049 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png index b1921be..1ac8ace 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and b/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png index c217eef..172e0ac 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 0b2aa44..87d390d 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png index 1d3038e..00962f3 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and b/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png index a34b3fc..cb196e3 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index e31cc76..5202b90 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png index 7d7964b..ade2531 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and b/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png index 7e7c423..c54ceeb 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/app/WikiSpot/app/src/main/res/values-de-rDE/strings.xml b/app/WikiSpot/app/src/main/res/values-de-rDE/strings.xml index 59c0e27..50243aa 100644 --- a/app/WikiSpot/app/src/main/res/values-de-rDE/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-de-rDE/strings.xml @@ -13,4 +13,5 @@ Anzahl der Personen : Status : Temperatur : + Mehr Farben \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-es-rES/strings.xml b/app/WikiSpot/app/src/main/res/values-es-rES/strings.xml index c6efd0d..4d0dbe3 100644 --- a/app/WikiSpot/app/src/main/res/values-es-rES/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-es-rES/strings.xml @@ -13,4 +13,5 @@ Número de personas: Abierto Cerrado + Mas colores \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-fr-rFR/strings.xml b/app/WikiSpot/app/src/main/res/values-fr-rFR/strings.xml index 055be46..44e58cd 100644 --- a/app/WikiSpot/app/src/main/res/values-fr-rFR/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-fr-rFR/strings.xml @@ -13,4 +13,5 @@ Nombre de personnes : Ouvert Fermé + Plus de couleurs \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-ja-rJP/strings.xml b/app/WikiSpot/app/src/main/res/values-ja-rJP/strings.xml index 17d99cb..0c85fcd 100644 --- a/app/WikiSpot/app/src/main/res/values-ja-rJP/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-ja-rJP/strings.xml @@ -13,4 +13,5 @@ 人々の数 : 状態 : 温度: + より多くの色 \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-ru-rRU/strings.xml b/app/WikiSpot/app/src/main/res/values-ru-rRU/strings.xml index 9527ec0..44a3503 100644 --- a/app/WikiSpot/app/src/main/res/values-ru-rRU/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-ru-rRU/strings.xml @@ -13,4 +13,5 @@ Число людей : Открыть Закрыто + Больше цветов \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-sk-rSK/strings.xml b/app/WikiSpot/app/src/main/res/values-sk-rSK/strings.xml index 5053834..30888c2 100644 --- a/app/WikiSpot/app/src/main/res/values-sk-rSK/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-sk-rSK/strings.xml @@ -14,4 +14,5 @@ Otvorené Zatvorené Teplota : + Viac farieb \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-zh-rCN/strings.xml b/app/WikiSpot/app/src/main/res/values-zh-rCN/strings.xml index c21a3ae..6a191d5 100644 --- a/app/WikiSpot/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-zh-rCN/strings.xml @@ -13,4 +13,5 @@ 人数 : 温度 : 地位 : + 更多颜色 \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values/ic_launcher_background.xml b/app/WikiSpot/app/src/main/res/values/ic_launcher_background.xml index 06ea7bf..4e823a0 100644 --- a/app/WikiSpot/app/src/main/res/values/ic_launcher_background.xml +++ b/app/WikiSpot/app/src/main/res/values/ic_launcher_background.xml @@ -1,4 +1,4 @@ - #84ABFC + #3DDC84 \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values/strings.xml b/app/WikiSpot/app/src/main/res/values/strings.xml index b666206..9b78d59 100644 --- a/app/WikiSpot/app/src/main/res/values/strings.xml +++ b/app/WikiSpot/app/src/main/res/values/strings.xml @@ -17,4 +17,5 @@ Files Dark theme + More colors \ No newline at end of file