Compare commits
1 Commits
5.0.1-hotf
...
5.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1521bc1223 |
1
.idea/vcs.xml
generated
1
.idea/vcs.xml
generated
@@ -2,6 +2,5 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
<mapping directory="$PROJECT_DIR$/gh-pages" vcs="Git" />
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -21,7 +21,7 @@ android {
|
|||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 59
|
versionCode 59
|
||||||
versionName "5.0.1-hotfix2"
|
versionName "5.0.2"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -71,11 +71,9 @@ val client: OkHttpClient
|
|||||||
|
|
||||||
class Pupil : Application() {
|
class Pupil : Application() {
|
||||||
|
|
||||||
init {
|
|
||||||
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
|
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true)
|
||||||
|
|
||||||
preferences = PreferenceManager.getDefaultSharedPreferences(this)
|
preferences = PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
|
|
||||||
val userID = Preferences["user_id", ""].let { userID ->
|
val userID = Preferences["user_id", ""].let { userID ->
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ package xyz.quaver.pupil.adapters
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
|
import android.util.Log
|
||||||
import android.util.SparseBooleanArray
|
import android.util.SparseBooleanArray
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
@@ -125,6 +126,8 @@ class GalleryBlockAdapter(private val glide: RequestManager, private val galleri
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun bind(galleryID: Int) {
|
fun bind(galleryID: Int) {
|
||||||
|
val time = System.currentTimeMillis()
|
||||||
|
|
||||||
val cache = Cache.getInstance(view.context, galleryID)
|
val cache = Cache.getInstance(view.context, galleryID)
|
||||||
|
|
||||||
val galleryBlock = cache.metadata.galleryBlock ?: return
|
val galleryBlock = cache.metadata.galleryBlock ?: return
|
||||||
@@ -219,13 +222,15 @@ class GalleryBlockAdapter(private val glide: RequestManager, private val galleri
|
|||||||
}
|
}
|
||||||
|
|
||||||
galleryblock_tag_group.removeAllViews()
|
galleryblock_tag_group.removeAllViews()
|
||||||
galleryBlock.relatedTags.forEach {
|
CoroutineScope(Dispatchers.Default).launch {
|
||||||
galleryblock_tag_group.addView(TagChip(context, Tag.parse(it)).apply {
|
galleryBlock.relatedTags.forEach {
|
||||||
setOnClickListener { view ->
|
TagChip(context, Tag.parse(it)).apply {
|
||||||
for (callback in onChipClickedHandler)
|
setOnClickListener { view ->
|
||||||
callback.invoke((view as TagChip).tag)
|
for (callback in onChipClickedHandler)
|
||||||
}
|
callback.invoke((view as TagChip).tag)
|
||||||
})
|
}
|
||||||
|
}.let { launch(Dispatchers.Main) { galleryblock_tag_group.addView(it) } }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
galleryblock_id.text = galleryBlock.id.toString()
|
galleryblock_id.text = galleryBlock.id.toString()
|
||||||
@@ -274,6 +279,7 @@ class GalleryBlockAdapter(private val glide: RequestManager, private val galleri
|
|||||||
galleryblock_tag_group.visibility = View.GONE
|
galleryblock_tag_group.visibility = View.GONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Log.i("PUPILD", "${System.currentTimeMillis() - time}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class NextViewHolder(view: LinearLayout) : RecyclerView.ViewHolder(view)
|
class NextViewHolder(view: LinearLayout) : RecyclerView.ViewHolder(view)
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ import xyz.quaver.hitomi.Reader
|
|||||||
import xyz.quaver.hitomi.getReferer
|
import xyz.quaver.hitomi.getReferer
|
||||||
import xyz.quaver.hitomi.imageUrlFromImage
|
import xyz.quaver.hitomi.imageUrlFromImage
|
||||||
import xyz.quaver.hiyobi.createImgList
|
import xyz.quaver.hiyobi.createImgList
|
||||||
import xyz.quaver.io.util.readBytes
|
|
||||||
import xyz.quaver.pupil.BuildConfig
|
import xyz.quaver.pupil.BuildConfig
|
||||||
import xyz.quaver.pupil.R
|
import xyz.quaver.pupil.R
|
||||||
import xyz.quaver.pupil.services.DownloadService
|
import xyz.quaver.pupil.services.DownloadService
|
||||||
@@ -143,7 +142,7 @@ class ReaderAdapter(private val activity: ReaderActivity,
|
|||||||
|
|
||||||
CoroutineScope(Dispatchers.IO).launch {
|
CoroutineScope(Dispatchers.IO).launch {
|
||||||
glide
|
glide
|
||||||
.load(image.readBytes())
|
.load(image.uri)
|
||||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||||
.skipMemoryCache(true)
|
.skipMemoryCache(true)
|
||||||
.apply {
|
.apply {
|
||||||
|
|||||||
@@ -309,11 +309,25 @@ class DownloadService : Service() {
|
|||||||
|
|
||||||
progress.put(galleryID, MutableList(reader.galleryInfo.files.size) { 0F })
|
progress.put(galleryID, MutableList(reader.galleryInfo.files.size) { 0F })
|
||||||
|
|
||||||
cache.metadata.imageList?.forEachIndexed { index, image ->
|
cache.metadata.imageList?.let {
|
||||||
progress[galleryID]?.set(index, if (image != null) Float.POSITIVE_INFINITY else 0F)
|
if (progress[galleryID]?.size != it.size) {
|
||||||
|
cache.metadata.imageList?.filterNotNull()?.forEach { file ->
|
||||||
|
cache.findFile(file)?.delete()
|
||||||
|
}
|
||||||
|
cache.metadata.imageList = MutableList(reader.galleryInfo.files.size) { null }
|
||||||
|
return@let
|
||||||
|
}
|
||||||
|
|
||||||
|
it.forEachIndexed { index, image ->
|
||||||
|
progress[galleryID]?.set(index, if (image != null) Float.POSITIVE_INFINITY else 0F)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCompleted(galleryID)) {
|
if (isCompleted(galleryID)) {
|
||||||
|
if (DownloadManager.getInstance(this@DownloadService)
|
||||||
|
.getDownloadFolder(galleryID) != null)
|
||||||
|
Cache.getInstance(this@DownloadService, galleryID).moveToDownload()
|
||||||
|
|
||||||
notificationManager.cancel(galleryID)
|
notificationManager.cancel(galleryID)
|
||||||
startId?.let { stopSelf(it) }
|
startId?.let { stopSelf(it) }
|
||||||
return@launch
|
return@launch
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import android.text.InputType
|
|||||||
import android.view.*
|
import android.view.*
|
||||||
import android.widget.*
|
import android.widget.*
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
import androidx.cardview.widget.CardView
|
import androidx.cardview.widget.CardView
|
||||||
import androidx.core.view.GravityCompat
|
import androidx.core.view.GravityCompat
|
||||||
import com.arlib.floatingsearchview.FloatingSearchView
|
import com.arlib.floatingsearchview.FloatingSearchView
|
||||||
@@ -97,7 +98,9 @@ class MainActivity :
|
|||||||
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true)
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
setContentView(R.layout.activity_main)
|
||||||
|
|
||||||
if (intent.action == Intent.ACTION_VIEW) {
|
if (intent.action == Intent.ACTION_VIEW) {
|
||||||
intent.dataString?.let { url ->
|
intent.dataString?.let { url ->
|
||||||
@@ -111,8 +114,6 @@ class MainActivity :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setContentView(R.layout.activity_main)
|
|
||||||
|
|
||||||
if (Preferences["download_folder", ""].isEmpty())
|
if (Preferences["download_folder", ""].isEmpty())
|
||||||
DownloadLocationDialogFragment().show(supportFragmentManager, "Download Location Dialog")
|
DownloadLocationDialogFragment().show(supportFragmentManager, "Download Location Dialog")
|
||||||
|
|
||||||
|
|||||||
@@ -200,24 +200,42 @@ class Cache private constructor(context: Context, val galleryID: Int) : ContextW
|
|||||||
fun moveToDownload() = CoroutineScope(Dispatchers.IO).launch {
|
fun moveToDownload() = CoroutineScope(Dispatchers.IO).launch {
|
||||||
val downloadFolder = downloadFolder ?: return@launch
|
val downloadFolder = downloadFolder ?: return@launch
|
||||||
|
|
||||||
|
if (downloadFolder.getChild(".metadata").exists())
|
||||||
|
return@launch
|
||||||
|
|
||||||
metadata.imageList?.forEach { imageName ->
|
metadata.imageList?.forEach { imageName ->
|
||||||
imageName ?: return@forEach
|
imageName ?: return@forEach
|
||||||
val target = downloadFolder.getChild(imageName)
|
val target = downloadFolder.getChild(imageName)
|
||||||
val source = cacheFolder.getChild(imageName)
|
val source = cacheFolder.getChild(imageName)
|
||||||
|
|
||||||
if (!source.exists())
|
if (!source.exists() || target.exists())
|
||||||
return@forEach
|
return@forEach
|
||||||
|
|
||||||
kotlin.runCatching {
|
kotlin.runCatching {
|
||||||
target.createNewFile()
|
target.createNewFile()
|
||||||
source.readBytes()?.let { target.writeBytes(it) }
|
target.outputStream()?.use { target -> source.inputStream()?.use { source ->
|
||||||
|
source.copyTo(target)
|
||||||
|
} }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val cacheThumbnail = cacheFolder.getChild(".thumbnail")
|
||||||
|
val downloadThumbnail = downloadFolder.getChild(".thumbnail")
|
||||||
|
|
||||||
|
if (cacheThumbnail.exists() && !downloadThumbnail.exists()) {
|
||||||
|
kotlin.runCatching {
|
||||||
|
downloadThumbnail.createNewFile()
|
||||||
|
downloadThumbnail.outputStream()?.use { target -> cacheThumbnail.inputStream()?.use { source ->
|
||||||
|
source.copyTo(target)
|
||||||
|
} }
|
||||||
|
cacheThumbnail.delete()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val cacheMetadata = cacheFolder.getChild(".metadata")
|
val cacheMetadata = cacheFolder.getChild(".metadata")
|
||||||
val downloadMetadata = downloadFolder.getChild(".metadata")
|
val downloadMetadata = downloadFolder.getChild(".metadata")
|
||||||
|
|
||||||
if (cacheMetadata.exists()) {
|
if (cacheMetadata.exists() && !downloadMetadata.exists()) {
|
||||||
kotlin.runCatching {
|
kotlin.runCatching {
|
||||||
downloadMetadata.createNewFile()
|
downloadMetadata.createNewFile()
|
||||||
downloadMetadata.writeText(Json.encodeToString(metadata))
|
downloadMetadata.writeText(Json.encodeToString(metadata))
|
||||||
|
|||||||
@@ -70,6 +70,8 @@
|
|||||||
app:handleHasFixedSize="true"
|
app:handleHasFixedSize="true"
|
||||||
app:handleHeight="72dp"
|
app:handleHeight="72dp"
|
||||||
app:handleWidth="24dp"
|
app:handleWidth="24dp"
|
||||||
|
app:disableTrack="true"
|
||||||
|
app:hideHandleAfter="1000"
|
||||||
app:trackMarginStart="64dp"
|
app:trackMarginStart="64dp"
|
||||||
app:addLastItemPadding="true"
|
app:addLastItemPadding="true"
|
||||||
app:popupDrawable="@color/transparent">
|
app:popupDrawable="@color/transparent">
|
||||||
|
|||||||
@@ -70,6 +70,8 @@
|
|||||||
app:handleHasFixedSize="true"
|
app:handleHasFixedSize="true"
|
||||||
app:handleHeight="72dp"
|
app:handleHeight="72dp"
|
||||||
app:handleWidth="24dp"
|
app:handleWidth="24dp"
|
||||||
|
app:disableTrack="true"
|
||||||
|
app:hideHandleAfter="1000"
|
||||||
app:trackMarginStart="64dp"
|
app:trackMarginStart="64dp"
|
||||||
app:addLastItemPadding="true"
|
app:addLastItemPadding="true"
|
||||||
app:popupDrawable="@color/transparent">
|
app:popupDrawable="@color/transparent">
|
||||||
|
|||||||
@@ -33,6 +33,8 @@
|
|||||||
app:handleDrawable="@drawable/thumb"
|
app:handleDrawable="@drawable/thumb"
|
||||||
app:handleHeight="72dp"
|
app:handleHeight="72dp"
|
||||||
app:handleWidth="24dp"
|
app:handleWidth="24dp"
|
||||||
|
app:disableTrack="true"
|
||||||
|
app:hideHandleAfter="1000"
|
||||||
app:handleHasFixedSize="true"
|
app:handleHasFixedSize="true"
|
||||||
app:addLastItemPadding="true"
|
app:addLastItemPadding="true"
|
||||||
app:popupDrawable="@color/transparent">
|
app:popupDrawable="@color/transparent">
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
app:cardCornerRadius="8dp"
|
app:cardCornerRadius="8dp"
|
||||||
android:clipChildren="true">
|
android:clipChildren="true"
|
||||||
|
tools:ignore="RtlHardcoded">
|
||||||
|
|
||||||
<com.daimajia.swipe.SwipeLayout
|
<com.daimajia.swipe.SwipeLayout
|
||||||
android:id="@+id/galleryblock_swipe_layout"
|
android:id="@+id/galleryblock_swipe_layout"
|
||||||
@@ -70,169 +71,156 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/galleryblock_primary"
|
android:id="@+id/galleryblock_primary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:orientation="vertical"
|
|
||||||
android:foreground="?attr/selectableItemBackground"
|
|
||||||
android:focusable="true"
|
|
||||||
android:clickable="true"
|
|
||||||
tools:ignore="UnusedAttribute">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.core.widget.ContentLoadingProgressBar
|
||||||
|
style="?android:attr/progressBarStyleHorizontal"
|
||||||
|
android:id="@+id/galleryblock_progressbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="4dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
|
|
||||||
<ProgressBar
|
<ImageView
|
||||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
android:id="@+id/galleryblock_progress_complete"
|
||||||
android:id="@+id/galleryblock_progressbar"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="4dp"
|
||||||
android:layout_height="4dp"
|
android:visibility="invisible"
|
||||||
android:visibility="gone"
|
android:scaleType="fitXY"
|
||||||
app:layout_constraintTop_toTopOf="parent"/>
|
android:contentDescription="@string/reader_imageview_description"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/galleryblock_progress_complete"
|
android:id="@+id/galleryblock_thumbnail"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="150dp"
|
||||||
android:layout_height="4dp"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="invisible"
|
android:contentDescription="@string/galleryblock_thumbnail_description"
|
||||||
android:scaleType="fitXY"
|
android:adjustViewBounds="true"
|
||||||
android:contentDescription="@string/reader_imageview_description"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"/>
|
app:layout_constraintTop_toBottomOf="@id/galleryblock_progressbar"/>
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:id="@+id/galleryblock_thumbnail"
|
style="@style/TextAppearance.AppCompat.Headline"
|
||||||
android:layout_width="150dp"
|
android:id="@+id/galleryblock_title"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:contentDescription="@string/galleryblock_thumbnail_description"
|
android:layout_height="wrap_content"
|
||||||
android:adjustViewBounds="true"
|
android:layout_marginTop="8dp"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
android:layout_marginLeft="8dp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/galleryblock_progressbar"
|
app:layout_constraintLeft_toRightOf="@id/galleryblock_thumbnail"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/galleryblock_progressbar"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/TextAppearance.AppCompat.Headline"
|
style="@style/TextAppearance.AppCompat.Medium"
|
||||||
android:id="@+id/galleryblock_title"
|
android:id="@+id/galleryblock_artist"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:layout_marginStart="8dp"
|
app:layout_constraintLeft_toRightOf="@id/galleryblock_thumbnail"
|
||||||
android:layout_marginLeft="8dp"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintLeft_toRightOf="@id/galleryblock_thumbnail"
|
app:layout_constraintTop_toBottomOf="@id/galleryblock_title"/>
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/TextAppearance.AppCompat.Medium"
|
android:id="@+id/galleryblock_series"
|
||||||
android:id="@+id/galleryblock_artist"
|
android:layout_width="0dp"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginLeft="8dp"
|
||||||
android:layout_marginStart="8dp"
|
app:layout_constraintTop_toBottomOf="@id/galleryblock_artist"
|
||||||
android:layout_marginLeft="8dp"
|
app:layout_constraintLeft_toRightOf="@id/galleryblock_thumbnail"
|
||||||
app:layout_constraintLeft_toRightOf="@id/galleryblock_thumbnail"
|
app:layout_constraintRight_toRightOf="parent"/>
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/galleryblock_title"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/galleryblock_series"
|
android:id="@+id/galleryblock_type"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:layout_marginLeft="8dp"
|
app:layout_constraintTop_toBottomOf="@id/galleryblock_series"
|
||||||
app:layout_constraintTop_toBottomOf="@id/galleryblock_artist"
|
app:layout_constraintLeft_toRightOf="@id/galleryblock_thumbnail" />
|
||||||
app:layout_constraintStart_toEndOf="@id/galleryblock_thumbnail"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/galleryblock_type"
|
android:id="@+id/galleryblock_language"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/galleryblock_series"
|
app:layout_constraintTop_toBottomOf="@id/galleryblock_type"
|
||||||
app:layout_constraintStart_toEndOf="@id/galleryblock_thumbnail" />
|
app:layout_constraintBottom_toTopOf="@id/galleryblock_padding"
|
||||||
|
app:layout_constraintLeft_toRightOf="@id/galleryblock_thumbnail" />
|
||||||
<TextView
|
|
||||||
android:id="@+id/galleryblock_language"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginLeft="8dp"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/galleryblock_type"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/galleryblock_padding"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/galleryblock_thumbnail" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/galleryblock_padding"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/galleryblock_language"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/galleryblock_tag_group"/>
|
|
||||||
|
|
||||||
<com.google.android.material.chip.ChipGroup
|
|
||||||
android:id="@+id/galleryblock_tag_group"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="8dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
app:chipSpacing="4dp"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/galleryblock_padding"
|
|
||||||
app:layout_constraintLeft_toRightOf="@id/galleryblock_thumbnail"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:id="@+id/galleryblock_padding"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/galleryblock_language"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/galleryblock_tag_group"/>
|
||||||
|
|
||||||
|
<com.google.android.material.chip.ChipGroup
|
||||||
|
android:id="@+id/galleryblock_tag_group"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
app:chipSpacing="4dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/galleryblock_padding"
|
||||||
|
app:layout_constraintLeft_toRightOf="@id/galleryblock_thumbnail"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"/>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Barrier
|
||||||
|
android:id="@+id/barrier"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:barrierDirection="bottom"
|
||||||
|
app:constraint_referenced_ids="galleryblock_thumbnail,galleryblock_tag_group"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/divider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_margin="8dp"
|
android:background="@color/light_gray"
|
||||||
android:background="@android:color/darker_gray"/>
|
app:layout_constraintTop_toBottomOf="@id/barrier"
|
||||||
|
android:layout_margin="8dp"/>
|
||||||
|
|
||||||
<LinearLayout
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/galleryblock_id"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:paddingRight="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:paddingBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:orientation="horizontal"
|
app:layout_constraintTop_toBottomOf="@id/divider"
|
||||||
android:gravity="center_vertical">
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/galleryblock_id"
|
android:id="@+id/galleryblock_pagecount"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/divider"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintLeft_toRightOf="parent"
|
||||||
|
app:layout_constraintRight_toLeftOf="parent" />
|
||||||
|
|
||||||
<View
|
<ImageView
|
||||||
android:layout_width="0dp"
|
android:id="@+id/galleryblock_favorite"
|
||||||
android:layout_height="1dp"
|
android:contentDescription="@string/app_name"
|
||||||
android:layout_weight="1"/>
|
android:layout_width="32dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
app:srcCompat="@drawable/ic_star_empty"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/divider"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent" />
|
||||||
|
|
||||||
<TextView
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:id="@+id/galleryblock_pagecount"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_weight="1"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/galleryblock_favorite"
|
|
||||||
android:contentDescription="@string/app_name"
|
|
||||||
android:layout_width="32dp"
|
|
||||||
android:layout_height="32dp"
|
|
||||||
app:srcCompat="@drawable/ic_star_empty"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</com.daimajia.swipe.SwipeLayout>
|
</com.daimajia.swipe.SwipeLayout>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user