mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-15 02:18:04 -04:00
different local file transfer title depending on mode
This commit is contained in:
parent
46de76560f
commit
7e0931f743
@ -106,8 +106,8 @@ class LocalFileTransferFragment : BaseFragment(),
|
||||
setHasOptionsMenu(true)
|
||||
val activity = requireActivity() as CoreMainActivity
|
||||
val filesForTransfer = getFilesForTransfer()
|
||||
|
||||
setupToolbar(view, activity)
|
||||
val isReceiver = filesForTransfer.isEmpty()
|
||||
setupToolbar(view, activity, isReceiver)
|
||||
|
||||
wifiPeerListAdapter = WifiPeerListAdapter(
|
||||
WifiP2pDelegate(wifiDirectManager::sendToDevice)
|
||||
@ -127,9 +127,12 @@ class LocalFileTransferFragment : BaseFragment(),
|
||||
list_peer_devices.setHasFixedSize(true)
|
||||
}
|
||||
|
||||
private fun setupToolbar(view: View, activity: CoreMainActivity) {
|
||||
private fun setupToolbar(view: View, activity: CoreMainActivity, isReceiver: Boolean) {
|
||||
val toolbar: Toolbar = view.findViewById(R.id.toolbar)
|
||||
activity.setSupportActionBar(toolbar)
|
||||
toolbar.title =
|
||||
if (isReceiver) getString(R.string.receive_files_title)
|
||||
else getString(R.string.send_files_title)
|
||||
toolbar.setNavigationIcon(R.drawable.ic_close_white_24dp)
|
||||
toolbar.setNavigationOnClickListener { activity.popNavigationBackstack() }
|
||||
}
|
||||
|
6
app/src/main/res/values-qq/strings.xml
Normal file
6
app/src/main/res/values-qq/strings.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<resources>
|
||||
<string name="send_files_title">The title of an activity used for sending files.</string>
|
||||
<string name="receive_files_title">The titles of an activity used for receiving files.</string>
|
||||
</resources>
|
@ -4,4 +4,6 @@
|
||||
<string name="file_system_does_not_support_4gb">Your file system doesn’t support files over 4GB</string>
|
||||
<string name="detecting_file_system">Detecting if file system can create 4GB files</string>
|
||||
<string name="cannot_open_file">Failed to open file\nPlease try looking for this file in the Device Tab of your Library</string>
|
||||
<string name="send_files_title">Send Files</string>
|
||||
<string name="receive_files_title">Receive Files</string>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user