mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Fixed: Transfer ZIM file freezes on tablet
This commit is contained in:
parent
7212511437
commit
c7d397505e
@ -147,7 +147,6 @@ class LocalFileTransferTest {
|
||||
|
||||
@Test
|
||||
fun showCaseFeature() {
|
||||
if (Build.VERSION.SDK_INT != Build.VERSION_CODES.TIRAMISU) {
|
||||
shouldShowShowCaseFeatureToUser(true, isResetShowCaseId = true)
|
||||
activityScenario = ActivityScenario.launch(KiwixMainActivity::class.java).apply {
|
||||
moveToState(Lifecycle.State.RESUMED)
|
||||
@ -178,7 +177,6 @@ class LocalFileTransferTest {
|
||||
}
|
||||
LeakAssertions.assertNoLeaks()
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testShowCaseFeatureShowOnce() {
|
||||
|
@ -36,7 +36,6 @@ import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.provider.Settings
|
||||
import org.kiwix.kiwixmobile.core.utils.files.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.Menu
|
||||
import android.view.MenuInflater
|
||||
@ -55,9 +54,9 @@ import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import org.kiwix.kiwixmobile.R
|
||||
import org.kiwix.kiwixmobile.core.R.string
|
||||
import org.kiwix.kiwixmobile.core.R.drawable
|
||||
import org.kiwix.kiwixmobile.cachedComponent
|
||||
import org.kiwix.kiwixmobile.core.R.drawable
|
||||
import org.kiwix.kiwixmobile.core.R.string
|
||||
import org.kiwix.kiwixmobile.core.base.BaseActivity
|
||||
import org.kiwix.kiwixmobile.core.base.BaseFragment
|
||||
import org.kiwix.kiwixmobile.core.extensions.ActivityExtensions.popNavigationBackstack
|
||||
@ -69,6 +68,7 @@ import org.kiwix.kiwixmobile.core.navigateToAppSettings
|
||||
import org.kiwix.kiwixmobile.core.utils.SharedPreferenceUtil
|
||||
import org.kiwix.kiwixmobile.core.utils.dialog.AlertDialogShower
|
||||
import org.kiwix.kiwixmobile.core.utils.dialog.KiwixDialog
|
||||
import org.kiwix.kiwixmobile.core.utils.files.Log
|
||||
import org.kiwix.kiwixmobile.databinding.FragmentLocalFileTransferBinding
|
||||
import org.kiwix.kiwixmobile.localFileTransfer.WifiDirectManager.Companion.getDeviceStatus
|
||||
import org.kiwix.kiwixmobile.localFileTransfer.adapter.WifiP2pDelegate
|
||||
@ -193,12 +193,12 @@ class LocalFileTransferFragment :
|
||||
getString(string.got_it)
|
||||
)
|
||||
addSequenceItem(
|
||||
fragmentLocalFileTransferBinding?.listPeerDevices,
|
||||
fragmentLocalFileTransferBinding?.nearbyDeviceShowCaseView,
|
||||
getString(string.nearby_devices_list_message),
|
||||
getString(string.got_it)
|
||||
)
|
||||
addSequenceItem(
|
||||
fragmentLocalFileTransferBinding?.recyclerViewTransferFiles,
|
||||
fragmentLocalFileTransferBinding?.fileTransferShowCaseView,
|
||||
getString(string.transfer_zim_files_list_message),
|
||||
getString(string.got_it)
|
||||
)
|
||||
|
@ -35,15 +35,15 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:contentDescription="@string/device_name"
|
||||
android:gravity="start|center"
|
||||
android:minHeight="@dimen/material_minimum_height_and_width"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:textIsSelectable="true"
|
||||
android:gravity="start|center"
|
||||
android:minHeight="@dimen/material_minimum_height_and_width"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
android:contentDescription="@string/device_name"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -98,6 +98,15 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_available_device" />
|
||||
|
||||
<View
|
||||
android:id="@+id/nearby_device_show_case_view"
|
||||
android:layout_width="@dimen/showcase_view_maximum_width"
|
||||
android:layout_height="10dp"
|
||||
android:layout_margin="50dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_available_device" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar_searching_peers"
|
||||
android:layout_width="wrap_content"
|
||||
@ -138,8 +147,16 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_file_list_boundary" />
|
||||
|
||||
<View
|
||||
android:id="@+id/file_transfer_show_case_view"
|
||||
android:layout_width="@dimen/showcase_view_maximum_width"
|
||||
android:layout_height="10dp"
|
||||
android:layout_margin="50dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_files_for_transfer" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
tools:listitem="@layout/item_transfer_list"
|
||||
android:id="@+id/recycler_view_transfer_files"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
@ -148,6 +165,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_files_for_transfer" />
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_files_for_transfer"
|
||||
tools:listitem="@layout/item_transfer_list" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -26,4 +26,5 @@
|
||||
<dimen name="find_in_page_button_padding">13dp</dimen>
|
||||
<dimen name="donation_popup_bottom_margin">20dp</dimen>
|
||||
<dimen name="maximum_donation_popup_width">400dp</dimen>
|
||||
<dimen name="showcase_view_maximum_width">200dp</dimen>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user