Material Design 3 (#4637)
I tried to find a balance between going fully M3 and keeping some of the original Tusky feeling. For example, I removed the "allCaps" setting we had on most buttons, which is recommended for M3. On the other hand, I made them less rounded than the M3 default. <img src="https://github.com/user-attachments/assets/9d2485e0-7d1d-42ab-8a4e-c30d044aa5dc" width="320"/> <img src="https://github.com/user-attachments/assets/d65d3c91-afe9-424e-92d7-e0f3e401ea4b" width="320"/> <img src="https://github.com/user-attachments/assets/d5634440-c507-4484-a11e-983f47cbeab7" width="320"/>
This commit is contained in:
parent
a9d6b60291
commit
50ca44a5f6
94 changed files with 575 additions and 487 deletions
|
|
@ -36,6 +36,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
import com.google.android.material.color.MaterialColors;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
import com.keylesspalace.tusky.adapter.AccountSelectionAdapter;
|
||||
import com.keylesspalace.tusky.components.login.LoginActivity;
|
||||
|
|
@ -260,7 +261,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||
);
|
||||
adapter.addAll(accounts);
|
||||
|
||||
new AlertDialog.Builder(this)
|
||||
new MaterialAlertDialogBuilder(this)
|
||||
.setTitle(dialogTitle)
|
||||
.setAdapter(adapter, (dialogInterface, index) -> listener.onAccountSelected(accounts.get(index)))
|
||||
.show();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ package com.keylesspalace.tusky
|
|||
|
||||
import android.content.Intent
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Color
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
|
|
@ -39,6 +38,9 @@ import com.bumptech.glide.load.resource.bitmap.RoundedCorners
|
|||
import com.canhub.cropper.CropImage
|
||||
import com.canhub.cropper.CropImageContract
|
||||
import com.canhub.cropper.options
|
||||
import com.google.android.material.R as materialR
|
||||
import com.google.android.material.color.MaterialColors
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.keylesspalace.tusky.adapter.AccountFieldEditAdapter
|
||||
import com.keylesspalace.tusky.components.instanceinfo.InstanceInfoRepository
|
||||
|
|
@ -125,7 +127,7 @@ class EditProfileActivity : BaseActivity() {
|
|||
|
||||
val plusDrawable = IconicsDrawable(this, GoogleMaterial.Icon.gmd_add).apply {
|
||||
sizeDp = 12
|
||||
colorInt = Color.WHITE
|
||||
colorInt = MaterialColors.getColor(binding.addFieldButton, materialR.attr.colorOnPrimary)
|
||||
}
|
||||
|
||||
binding.addFieldButton.setCompoundDrawablesRelativeWithIntrinsicBounds(
|
||||
|
|
@ -365,7 +367,7 @@ class EditProfileActivity : BaseActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private suspend fun launchSaveDialog() = AlertDialog.Builder(this)
|
||||
private suspend fun launchSaveDialog() = MaterialAlertDialogBuilder(this)
|
||||
.setMessage(getString(R.string.dialog_save_profile_changes_message))
|
||||
.create()
|
||||
.await(R.string.action_save, R.string.action_discard)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ import android.view.ViewGroup
|
|||
import android.widget.PopupMenu
|
||||
import androidx.activity.viewModels
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.widget.doOnTextChanged
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.DiffUtil
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.ListAdapter
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.keylesspalace.tusky.databinding.ActivityListsBinding
|
||||
import com.keylesspalace.tusky.databinding.DialogListBinding
|
||||
|
|
@ -107,10 +107,17 @@ class ListsActivity : BaseActivity() {
|
|||
}
|
||||
|
||||
private fun showlistNameDialog(list: MastoList?) {
|
||||
var selectedReplyPolicyIndex = 0
|
||||
|
||||
val replyPolicies = resources.getStringArray(R.array.list_reply_policies_display)
|
||||
val binding = DialogListBinding.inflate(layoutInflater).apply {
|
||||
replyPolicySpinner.setSelection(MastoList.ReplyPolicy.from(list?.repliesPolicy).ordinal)
|
||||
replyPolicyDropDown.setText(replyPolicies[MastoList.ReplyPolicy.from(list?.repliesPolicy).ordinal])
|
||||
replyPolicyDropDown.setSimpleItems(replyPolicies)
|
||||
replyPolicyDropDown.setOnItemClickListener { _, _, position, _ ->
|
||||
selectedReplyPolicyIndex = position
|
||||
}
|
||||
}
|
||||
val dialog = AlertDialog.Builder(this)
|
||||
val dialog = MaterialAlertDialogBuilder(this)
|
||||
.setView(binding.root)
|
||||
.setPositiveButton(
|
||||
if (list == null) {
|
||||
|
|
@ -123,7 +130,7 @@ class ListsActivity : BaseActivity() {
|
|||
binding.nameText.text.toString(),
|
||||
list?.id,
|
||||
binding.exclusiveCheckbox.isChecked,
|
||||
MastoList.ReplyPolicy.entries[binding.replyPolicySpinner.selectedItemPosition].policy
|
||||
MastoList.ReplyPolicy.entries[selectedReplyPolicyIndex].policy
|
||||
)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
|
|
@ -147,7 +154,7 @@ class ListsActivity : BaseActivity() {
|
|||
}
|
||||
|
||||
private fun showListDeleteDialog(list: MastoList) {
|
||||
AlertDialog.Builder(this)
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setMessage(getString(R.string.dialog_delete_list_warning, list.title))
|
||||
.setPositiveButton(R.string.action_delete) { _, _ ->
|
||||
viewModel.deleteList(list.id)
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ import com.bumptech.glide.request.target.FixedSizeDrawable
|
|||
import com.bumptech.glide.request.transition.Transition
|
||||
import com.google.android.material.R as materialR
|
||||
import com.google.android.material.color.MaterialColors
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import com.google.android.material.tabs.TabLayout.OnTabSelectedListener
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
|
|
@ -822,7 +823,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvider {
|
|||
}
|
||||
|
||||
private fun buildDeveloperToolsDialog(): AlertDialog {
|
||||
return AlertDialog.Builder(this)
|
||||
return MaterialAlertDialogBuilder(this)
|
||||
.setTitle("Developer Tools")
|
||||
.setItems(
|
||||
arrayOf("Create \"Load more\" gap")
|
||||
|
|
@ -1003,7 +1004,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvider {
|
|||
}
|
||||
|
||||
private fun logout() {
|
||||
AlertDialog.Builder(this)
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setTitle(R.string.action_logout)
|
||||
.setMessage(getString(R.string.action_logout_confirm, activeAccount.fullName))
|
||||
.setPositiveButton(android.R.string.ok) { _: DialogInterface?, _: Int ->
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
|||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.transition.TransitionManager
|
||||
import at.connyduck.sparkbutton.helpers.Utils
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.transition.MaterialArcMotion
|
||||
import com.google.android.material.transition.MaterialContainerTransform
|
||||
import com.keylesspalace.tusky.adapter.ItemInteractionListener
|
||||
|
|
@ -238,7 +239,7 @@ class TabPreferenceActivity : BaseActivity(), ItemInteractionListener, ListSelec
|
|||
editText.setText("")
|
||||
frameLayout.addView(editText)
|
||||
|
||||
val dialog = AlertDialog.Builder(this)
|
||||
val dialog = MaterialAlertDialogBuilder(this)
|
||||
.setTitle(R.string.add_hashtag_title)
|
||||
.setView(frameLayout)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ import androidx.activity.viewModels
|
|||
import androidx.annotation.ColorInt
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.Px
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.core.app.ActivityOptionsCompat
|
||||
import androidx.core.graphics.ColorUtils
|
||||
|
|
@ -53,6 +52,7 @@ import com.google.android.material.R as materialR
|
|||
import com.google.android.material.appbar.AppBarLayout
|
||||
import com.google.android.material.chip.Chip
|
||||
import com.google.android.material.color.MaterialColors
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
import com.google.android.material.shape.MaterialShapeDrawable
|
||||
import com.google.android.material.shape.ShapeAppearanceModel
|
||||
|
|
@ -190,9 +190,9 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvide
|
|||
* Load colors and dimensions from resources
|
||||
*/
|
||||
private fun loadResources() {
|
||||
toolbarColor = MaterialColors.getColor(this, materialR.attr.colorSurface, Color.BLACK)
|
||||
toolbarColor = MaterialColors.getColor(binding.accountToolbar, materialR.attr.colorSurface)
|
||||
statusBarColorTransparent = getColor(R.color.transparent_statusbar_background)
|
||||
statusBarColorOpaque = MaterialColors.getColor(this, materialR.attr.colorPrimaryDark, Color.BLACK)
|
||||
statusBarColorOpaque = MaterialColors.getColor(binding.accountToolbar, materialR.attr.colorPrimaryDark)
|
||||
avatarSize = resources.getDimension(R.dimen.account_activity_avatar_size)
|
||||
titleVisibleHeight = resources.getDimensionPixelSize(R.dimen.account_activity_scroll_title_visible_height)
|
||||
}
|
||||
|
|
@ -320,28 +320,13 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvide
|
|||
setDisplayShowTitleEnabled(false)
|
||||
}
|
||||
|
||||
val appBarElevation = resources.getDimension(R.dimen.actionbar_elevation)
|
||||
|
||||
val toolbarBackground = MaterialShapeDrawable.createWithElevationOverlay(
|
||||
this,
|
||||
appBarElevation
|
||||
)
|
||||
toolbarBackground.fillColor = ColorStateList.valueOf(Color.TRANSPARENT)
|
||||
binding.accountToolbar.background = toolbarBackground
|
||||
binding.accountToolbar.setBackgroundColor(Color.TRANSPARENT)
|
||||
|
||||
binding.accountToolbar.setNavigationIcon(R.drawable.ic_arrow_back_with_background)
|
||||
binding.accountToolbar.setOverflowIcon(
|
||||
AppCompatResources.getDrawable(this, R.drawable.ic_more_with_background)
|
||||
)
|
||||
binding.accountToolbar.overflowIcon = AppCompatResources.getDrawable(this, R.drawable.ic_more_with_background)
|
||||
|
||||
binding.accountHeaderInfoContainer.background = MaterialShapeDrawable.createWithElevationOverlay(this, appBarElevation)
|
||||
|
||||
val avatarBackground = MaterialShapeDrawable.createWithElevationOverlay(
|
||||
this,
|
||||
appBarElevation
|
||||
).apply {
|
||||
val avatarBackground = MaterialShapeDrawable().apply {
|
||||
fillColor = ColorStateList.valueOf(toolbarColor)
|
||||
elevation = appBarElevation
|
||||
shapeAppearanceModel = ShapeAppearanceModel.builder()
|
||||
.setAllCornerSizes(resources.getDimension(R.dimen.account_avatar_background_radius))
|
||||
.build()
|
||||
|
|
@ -382,7 +367,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvide
|
|||
toolbarColor
|
||||
) as Int
|
||||
|
||||
toolbarBackground.fillColor = ColorStateList.valueOf(evaluatedToolbarColor)
|
||||
binding.accountToolbar.setBackgroundColor(evaluatedToolbarColor)
|
||||
|
||||
binding.swipeToRefreshLayout.isEnabled = verticalOffset == 0
|
||||
}
|
||||
|
|
@ -874,7 +859,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvide
|
|||
}
|
||||
|
||||
private fun showFollowRequestPendingDialog() {
|
||||
AlertDialog.Builder(this)
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setMessage(R.string.dialog_message_cancel_follow_request)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ -> viewModel.changeFollowState() }
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
|
|
@ -882,7 +867,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvide
|
|||
}
|
||||
|
||||
private fun showUnfollowWarningDialog() {
|
||||
AlertDialog.Builder(this)
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setMessage(R.string.dialog_unfollow_warning)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ -> viewModel.changeFollowState() }
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
|
|
@ -890,7 +875,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvide
|
|||
}
|
||||
|
||||
private fun showFollowWarningDialog() {
|
||||
AlertDialog.Builder(this)
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setMessage(R.string.dialog_follow_warning)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ -> viewModel.changeFollowState() }
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
|
|
@ -901,7 +886,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvide
|
|||
if (blockingDomain) {
|
||||
viewModel.unblockDomain(instance)
|
||||
} else {
|
||||
AlertDialog.Builder(this)
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setMessage(getString(R.string.mute_domain_warning, instance))
|
||||
.setPositiveButton(
|
||||
getString(R.string.mute_domain_warning_dialog_ok)
|
||||
|
|
@ -913,7 +898,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvide
|
|||
|
||||
private fun toggleBlock() {
|
||||
if (viewModel.relationshipData.value?.data?.blocking != true) {
|
||||
AlertDialog.Builder(this)
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setMessage(getString(R.string.dialog_block_warning, loadedAccount?.username))
|
||||
.setPositiveButton(android.R.string.ok) { _, _ -> viewModel.changeBlockState() }
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
|
|
@ -1115,6 +1100,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvide
|
|||
badge.isClickable = false
|
||||
badge.isFocusable = false
|
||||
badge.setEnsureMinTouchTargetSize(false)
|
||||
badge.isCloseIconVisible = false
|
||||
|
||||
// reset some chip defaults so it looks better for our badge usecase
|
||||
badge.iconStartPadding = resources.getDimension(R.dimen.profile_badge_icon_start_padding)
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ import android.util.Log
|
|||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.DiffUtil
|
||||
import androidx.recyclerview.widget.ListAdapter
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.keylesspalace.tusky.ListsActivity
|
||||
import com.keylesspalace.tusky.R
|
||||
|
|
@ -77,7 +77,7 @@ class ListSelectionFragment : DialogFragment() {
|
|||
val adapter = Adapter()
|
||||
binding.listsView.adapter = adapter
|
||||
|
||||
val dialogBuilder = AlertDialog.Builder(context)
|
||||
val dialogBuilder = MaterialAlertDialogBuilder(context)
|
||||
.setView(binding.root)
|
||||
.setTitle(R.string.select_list_title)
|
||||
.setNeutralButton(R.string.select_list_manage) { _, _ ->
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ import android.annotation.SuppressLint
|
|||
import android.graphics.drawable.Drawable
|
||||
import android.os.Build
|
||||
import android.text.SpannableString
|
||||
import android.view.ContextThemeWrapper
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
|
@ -106,9 +105,11 @@ class AnnouncementAdapter(
|
|||
item.reactions.forEachIndexed { i, reaction ->
|
||||
(
|
||||
chips.getChildAt(i)?.takeUnless { it.id == R.id.addReactionChip } as Chip?
|
||||
?: Chip(ContextThemeWrapper(chips.context, com.google.android.material.R.style.Widget_MaterialComponents_Chip_Choice)).apply {
|
||||
?: Chip(chips.context).apply {
|
||||
isCheckable = true
|
||||
checkedIcon = null
|
||||
isCloseIconVisible = false
|
||||
setChipBackgroundColorResource(R.color.selectable_chip_background)
|
||||
chips.addView(this, i)
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
package com.keylesspalace.tusky.components.compose
|
||||
|
||||
import android.Manifest
|
||||
import android.app.ProgressDialog
|
||||
import android.content.ClipData
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
|
|
@ -47,7 +46,6 @@ import androidx.annotation.AttrRes
|
|||
import androidx.annotation.ColorInt
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.annotation.VisibleForTesting
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.content.FileProvider
|
||||
import androidx.core.content.res.use
|
||||
import androidx.core.view.ContentInfoCompat
|
||||
|
|
@ -66,6 +64,7 @@ import com.google.android.material.R as materialR
|
|||
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior.BottomSheetCallback
|
||||
import com.google.android.material.color.MaterialColors
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.keylesspalace.tusky.BaseActivity
|
||||
import com.keylesspalace.tusky.BuildConfig
|
||||
|
|
@ -1319,14 +1318,14 @@ class ComposeActivity :
|
|||
private fun getSaveAsDraftOrDiscardDialog(
|
||||
contentText: String,
|
||||
contentWarning: String
|
||||
): AlertDialog.Builder {
|
||||
): MaterialAlertDialogBuilder {
|
||||
val warning = if (viewModel.media.value.isNotEmpty()) {
|
||||
R.string.compose_save_draft_loses_media
|
||||
} else {
|
||||
R.string.compose_save_draft
|
||||
}
|
||||
|
||||
return AlertDialog.Builder(this)
|
||||
return MaterialAlertDialogBuilder(this)
|
||||
.setMessage(warning)
|
||||
.setPositiveButton(R.string.action_save) { _, _ ->
|
||||
viewModel.stopUploads()
|
||||
|
|
@ -1345,14 +1344,14 @@ class ComposeActivity :
|
|||
private fun getUpdateDraftOrDiscardDialog(
|
||||
contentText: String,
|
||||
contentWarning: String
|
||||
): AlertDialog.Builder {
|
||||
): MaterialAlertDialogBuilder {
|
||||
val warning = if (viewModel.media.value.isNotEmpty()) {
|
||||
R.string.compose_save_draft_loses_media
|
||||
} else {
|
||||
R.string.compose_save_draft
|
||||
}
|
||||
|
||||
return AlertDialog.Builder(this)
|
||||
return MaterialAlertDialogBuilder(this)
|
||||
.setMessage(warning)
|
||||
.setPositiveButton(R.string.action_save) { _, _ ->
|
||||
viewModel.stopUploads()
|
||||
|
|
@ -1368,8 +1367,8 @@ class ComposeActivity :
|
|||
* User is editing a post (scheduled, or posted), and can either go back to editing, or
|
||||
* discard the changes.
|
||||
*/
|
||||
private fun getContinueEditingOrDiscardDialog(): AlertDialog.Builder {
|
||||
return AlertDialog.Builder(this)
|
||||
private fun getContinueEditingOrDiscardDialog(): MaterialAlertDialogBuilder {
|
||||
return MaterialAlertDialogBuilder(this)
|
||||
.setMessage(R.string.compose_unsaved_changes)
|
||||
.setPositiveButton(R.string.action_continue_edit) { _, _ ->
|
||||
// Do nothing, dialog will dismiss, user can continue editing
|
||||
|
|
@ -1384,8 +1383,8 @@ class ComposeActivity :
|
|||
* User is editing an existing draft and making it empty.
|
||||
* The user can either delete the empty draft or go back to editing.
|
||||
*/
|
||||
private fun getDeleteEmptyDraftOrContinueEditing(): AlertDialog.Builder {
|
||||
return AlertDialog.Builder(this)
|
||||
private fun getDeleteEmptyDraftOrContinueEditing(): MaterialAlertDialogBuilder {
|
||||
return MaterialAlertDialogBuilder(this)
|
||||
.setMessage(R.string.compose_delete_draft)
|
||||
.setPositiveButton(R.string.action_delete) { _, _ ->
|
||||
viewModel.deleteDraft()
|
||||
|
|
@ -1404,19 +1403,7 @@ class ComposeActivity :
|
|||
|
||||
private fun saveDraftAndFinish(contentText: String, contentWarning: String) {
|
||||
lifecycleScope.launch {
|
||||
val dialog = if (viewModel.shouldShowSaveDraftDialog()) {
|
||||
ProgressDialog.show(
|
||||
this@ComposeActivity,
|
||||
null,
|
||||
getString(R.string.saving_draft),
|
||||
true,
|
||||
false
|
||||
)
|
||||
} else {
|
||||
null
|
||||
}
|
||||
viewModel.saveDraft(contentText, contentWarning)
|
||||
dialog?.cancel()
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -331,13 +331,6 @@ class ComposeViewModel @Inject constructor(
|
|||
mediaUploader.cancelUploadScope(*_media.value.map { it.localId }.toIntArray())
|
||||
}
|
||||
|
||||
fun shouldShowSaveDraftDialog(): Boolean {
|
||||
// if any of the media files need to be downloaded first it could take a while, so show a loading dialog
|
||||
return _media.value.any { mediaValue ->
|
||||
mediaValue.uri.scheme == "https"
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun saveDraft(content: String, contentWarning: String) {
|
||||
val mediaUris: MutableList<String> = mutableListOf()
|
||||
val mediaDescriptions: MutableList<String?> = mutableListOf()
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ package com.keylesspalace.tusky.components.compose.dialog
|
|||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.WindowManager
|
||||
import android.widget.ArrayAdapter
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.databinding.DialogAddPollBinding
|
||||
import com.keylesspalace.tusky.entity.NewPoll
|
||||
|
|
@ -37,7 +37,7 @@ fun showAddPollDialog(
|
|||
) {
|
||||
val binding = DialogAddPollBinding.inflate(LayoutInflater.from(context))
|
||||
|
||||
val dialog = AlertDialog.Builder(context)
|
||||
val dialog = MaterialAlertDialogBuilder(context)
|
||||
.setIcon(R.drawable.ic_poll_24dp)
|
||||
.setTitle(R.string.create_poll_title)
|
||||
.setView(binding.root)
|
||||
|
|
@ -63,9 +63,8 @@ fun showAddPollDialog(
|
|||
val durationLabels = context.resources.getStringArray(
|
||||
R.array.poll_duration_names
|
||||
).filterIndexed { index, _ -> durations[index] in minDuration..maxDuration }
|
||||
binding.pollDurationSpinner.adapter = ArrayAdapter(context, android.R.layout.simple_spinner_item, durationLabels).apply {
|
||||
setDropDownViewResource(androidx.appcompat.R.layout.support_simple_spinner_dropdown_item)
|
||||
}
|
||||
|
||||
binding.pollDurationDropDown.setSimpleItems(durationLabels.toTypedArray())
|
||||
durations = durations.filter { it in minDuration..maxDuration }
|
||||
|
||||
binding.addChoiceButton.setOnClickListener {
|
||||
|
|
@ -79,23 +78,24 @@ fun showAddPollDialog(
|
|||
|
||||
val secondsInADay = 60 * 60 * 24
|
||||
val desiredDuration = poll?.expiresIn ?: secondsInADay
|
||||
val pollDurationId = durations.indexOfLast {
|
||||
var selectedDurationIndex = durations.indexOfLast {
|
||||
it <= desiredDuration
|
||||
}
|
||||
|
||||
binding.pollDurationSpinner.setSelection(pollDurationId)
|
||||
binding.pollDurationDropDown.setText(durationLabels[selectedDurationIndex], false)
|
||||
binding.pollDurationDropDown.setOnItemClickListener { _, _, position, _ ->
|
||||
selectedDurationIndex = position
|
||||
}
|
||||
|
||||
binding.multipleChoicesCheckBox.isChecked = poll?.multiple ?: false
|
||||
|
||||
dialog.setOnShowListener {
|
||||
val button = dialog.getButton(AlertDialog.BUTTON_POSITIVE)
|
||||
button.setOnClickListener {
|
||||
val selectedPollDurationId = binding.pollDurationSpinner.selectedItemPosition
|
||||
|
||||
onUpdatePoll(
|
||||
NewPoll(
|
||||
options = adapter.pollOptions,
|
||||
expiresIn = durations[selectedPollDurationId],
|
||||
expiresIn = durations[selectedDurationIndex],
|
||||
multiple = binding.multipleChoicesCheckBox.isChecked
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import android.graphics.drawable.Drawable
|
|||
import android.net.Uri
|
||||
import android.view.WindowManager
|
||||
import android.widget.FrameLayout
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
|
|
@ -30,6 +29,7 @@ import com.bumptech.glide.load.engine.GlideException
|
|||
import com.bumptech.glide.load.resource.bitmap.DownsampleStrategy
|
||||
import com.bumptech.glide.request.RequestListener
|
||||
import com.bumptech.glide.request.target.Target
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.keylesspalace.tusky.databinding.DialogFocusBinding
|
||||
import com.keylesspalace.tusky.entity.Attachment.Focus
|
||||
import kotlinx.coroutines.launch
|
||||
|
|
@ -98,7 +98,7 @@ fun <T> T.makeFocusDialog(
|
|||
dialog.dismiss()
|
||||
}
|
||||
|
||||
val dialog = AlertDialog.Builder(this)
|
||||
val dialog = MaterialAlertDialogBuilder(this)
|
||||
.setView(dialogBinding.root)
|
||||
.setPositiveButton(android.R.string.ok, okListener)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import android.view.Menu
|
|||
import android.view.MenuInflater
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.core.view.MenuProvider
|
||||
import androidx.fragment.app.viewModels
|
||||
|
|
@ -35,6 +34,7 @@ import androidx.recyclerview.widget.RecyclerView
|
|||
import androidx.recyclerview.widget.SimpleItemAnimator
|
||||
import at.connyduck.sparkbutton.helpers.Utils
|
||||
import com.google.android.material.color.MaterialColors
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.StatusListActivity
|
||||
import com.keylesspalace.tusky.adapter.StatusBaseViewHolder
|
||||
|
|
@ -370,7 +370,7 @@ class ConversationsFragment :
|
|||
}
|
||||
|
||||
private fun deleteConversation(conversation: ConversationViewData) {
|
||||
AlertDialog.Builder(requireContext())
|
||||
MaterialAlertDialogBuilder(requireContext())
|
||||
.setMessage(R.string.dialog_delete_conversation_warning)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
|
|
|
|||
|
|
@ -3,18 +3,16 @@ package com.keylesspalace.tusky.components.filters
|
|||
import android.content.Context
|
||||
import android.content.DialogInterface.BUTTON_POSITIVE
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.AdapterView
|
||||
import android.widget.ArrayAdapter
|
||||
import androidx.activity.viewModels
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.view.size
|
||||
import androidx.core.widget.doAfterTextChanged
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import at.connyduck.calladapter.networkresult.fold
|
||||
import com.google.android.material.chip.Chip
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.materialswitch.MaterialSwitch
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.google.android.material.switchmaterial.SwitchMaterial
|
||||
import com.keylesspalace.tusky.BaseActivity
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.appstore.EventHub
|
||||
|
|
@ -46,7 +44,7 @@ class EditFilterActivity : BaseActivity() {
|
|||
|
||||
private lateinit var filter: Filter
|
||||
private var originalFilter: Filter? = null
|
||||
private lateinit var contextSwitches: Map<SwitchMaterial, Filter.Kind>
|
||||
private lateinit var contextSwitches: Map<MaterialSwitch, Filter.Kind>
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
|
@ -112,25 +110,14 @@ class EditFilterActivity : BaseActivity() {
|
|||
}
|
||||
)
|
||||
}
|
||||
binding.filterDurationSpinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
||||
override fun onItemSelected(
|
||||
parent: AdapterView<*>?,
|
||||
view: View?,
|
||||
position: Int,
|
||||
id: Long
|
||||
) {
|
||||
viewModel.setDuration(
|
||||
if (originalFilter?.expiresAt == null) {
|
||||
position
|
||||
} else {
|
||||
position - 1
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
override fun onNothingSelected(parent: AdapterView<*>?) {
|
||||
viewModel.setDuration(0)
|
||||
}
|
||||
binding.filterDurationDropDown.onItemClickListener = AdapterView.OnItemClickListener { _, _, position, _ ->
|
||||
viewModel.setDuration(
|
||||
if (originalFilter?.expiresAt == null) {
|
||||
position
|
||||
} else {
|
||||
position - 1
|
||||
}
|
||||
)
|
||||
}
|
||||
validateSaveButton()
|
||||
|
||||
|
|
@ -177,10 +164,13 @@ class EditFilterActivity : BaseActivity() {
|
|||
// Populate the UI from the filter's members
|
||||
private fun loadFilter() {
|
||||
viewModel.load(filter)
|
||||
if (filter.expiresAt != null) {
|
||||
val durationNames = listOf(getString(R.string.duration_no_change)) + resources.getStringArray(R.array.filter_duration_names)
|
||||
binding.filterDurationSpinner.adapter = ArrayAdapter(this, android.R.layout.simple_list_item_1, durationNames)
|
||||
val durationNames = if (filter.expiresAt != null) {
|
||||
arrayOf(getString(R.string.duration_no_change)) + resources.getStringArray(R.array.filter_duration_names)
|
||||
} else {
|
||||
resources.getStringArray(R.array.filter_duration_names)
|
||||
}
|
||||
binding.filterDurationDropDown.setSimpleItems(durationNames)
|
||||
binding.filterDurationDropDown.setText(durationNames[0], false)
|
||||
}
|
||||
|
||||
private fun updateKeywords(newKeywords: List<FilterKeyword>) {
|
||||
|
|
@ -221,7 +211,7 @@ class EditFilterActivity : BaseActivity() {
|
|||
private fun showAddKeywordDialog() {
|
||||
val binding = DialogFilterBinding.inflate(layoutInflater)
|
||||
binding.phraseWholeWord.isChecked = true
|
||||
AlertDialog.Builder(this)
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setTitle(R.string.filter_keyword_addition_title)
|
||||
.setView(binding.root)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
|
|
@ -242,7 +232,7 @@ class EditFilterActivity : BaseActivity() {
|
|||
binding.phraseEditText.setText(keyword.keyword)
|
||||
binding.phraseWholeWord.isChecked = keyword.wholeWord
|
||||
|
||||
AlertDialog.Builder(this)
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setTitle(R.string.filter_edit_keyword_title)
|
||||
.setView(binding.root)
|
||||
.setPositiveButton(R.string.filter_dialog_update_button) { _, _ ->
|
||||
|
|
|
|||
|
|
@ -18,14 +18,14 @@
|
|||
package com.keylesspalace.tusky.components.filters
|
||||
|
||||
import android.app.Activity
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.util.await
|
||||
|
||||
internal suspend fun Activity.showDeleteFilterDialog(filterTitle: String) = AlertDialog.Builder(
|
||||
this
|
||||
)
|
||||
.setMessage(getString(R.string.dialog_delete_filter_text, filterTitle))
|
||||
.setCancelable(true)
|
||||
.create()
|
||||
.await(R.string.dialog_delete_filter_positive_action, android.R.string.cancel)
|
||||
internal suspend fun Activity.showDeleteFilterDialog(filterTitle: String): Int {
|
||||
return MaterialAlertDialogBuilder(this)
|
||||
.setMessage(getString(R.string.dialog_delete_filter_text, filterTitle))
|
||||
.setCancelable(true)
|
||||
.create()
|
||||
.await(R.string.dialog_delete_filter_positive_action, android.R.string.cancel)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import android.os.Bundle
|
|||
import android.util.Log
|
||||
import android.widget.AutoCompleteTextView
|
||||
import androidx.activity.viewModels
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.paging.LoadState
|
||||
|
|
@ -15,6 +14,7 @@ import androidx.recyclerview.widget.DividerItemDecoration
|
|||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.SimpleItemAnimator
|
||||
import at.connyduck.calladapter.networkresult.fold
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.keylesspalace.tusky.BaseActivity
|
||||
import com.keylesspalace.tusky.R
|
||||
|
|
@ -195,7 +195,7 @@ class FollowedTagsActivity :
|
|||
)
|
||||
)
|
||||
|
||||
return AlertDialog.Builder(requireActivity())
|
||||
return MaterialAlertDialogBuilder(requireActivity())
|
||||
.setTitle(R.string.dialog_follow_hashtag_title)
|
||||
.setView(layout)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
|
|
|
|||
|
|
@ -24,11 +24,11 @@ import android.util.Log
|
|||
import android.view.Menu
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.net.toUri
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import at.connyduck.calladapter.networkresult.fold
|
||||
import com.bumptech.glide.Glide
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.keylesspalace.tusky.BaseActivity
|
||||
import com.keylesspalace.tusky.BuildConfig
|
||||
import com.keylesspalace.tusky.MainActivity
|
||||
|
|
@ -110,7 +110,7 @@ class LoginActivity : BaseActivity() {
|
|||
binding.loginButton.setOnClickListener { onLoginClick(true) }
|
||||
|
||||
binding.whatsAnInstanceTextView.setOnClickListener {
|
||||
val dialog = AlertDialog.Builder(this)
|
||||
val dialog = MaterialAlertDialogBuilder(this)
|
||||
.setMessage(R.string.dialog_whats_an_instance)
|
||||
.setPositiveButton(R.string.action_close, null)
|
||||
.show()
|
||||
|
|
|
|||
|
|
@ -32,15 +32,14 @@ import android.webkit.WebView
|
|||
import android.webkit.WebViewClient
|
||||
import androidx.activity.result.contract.ActivityResultContract
|
||||
import androidx.activity.viewModels
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.net.toUri
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.keylesspalace.tusky.BaseActivity
|
||||
import com.keylesspalace.tusky.BuildConfig
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.databinding.ActivityLoginWebviewBinding
|
||||
import com.keylesspalace.tusky.util.getParcelableExtraCompat
|
||||
import com.keylesspalace.tusky.util.hide
|
||||
import com.keylesspalace.tusky.util.viewBinding
|
||||
import com.keylesspalace.tusky.util.visible
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
|
@ -196,7 +195,7 @@ class LoginWebViewActivity : BaseActivity() {
|
|||
viewModel.instanceRules.collect { instanceRules ->
|
||||
binding.loginRules.visible(instanceRules.isNotEmpty())
|
||||
binding.loginRules.setOnClickListener {
|
||||
AlertDialog.Builder(this@LoginWebViewActivity)
|
||||
MaterialAlertDialogBuilder(this@LoginWebViewActivity)
|
||||
.setTitle(getString(R.string.instance_rule_title, data.domain))
|
||||
.setMessage(
|
||||
instanceRules.joinToString(separator = "\n\n") { "• $it" }
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ import android.view.ViewGroup
|
|||
import android.widget.ArrayAdapter
|
||||
import android.widget.ListView
|
||||
import android.widget.PopupWindow
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
import androidx.core.view.MenuProvider
|
||||
import androidx.fragment.app.viewModels
|
||||
|
|
@ -43,6 +42,7 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
|||
import at.connyduck.calladapter.networkresult.onFailure
|
||||
import at.connyduck.sparkbutton.helpers.Utils
|
||||
import com.google.android.material.appbar.AppBarLayout
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.adapter.StatusBaseViewHolder
|
||||
|
|
@ -416,7 +416,7 @@ class NotificationsFragment :
|
|||
}
|
||||
|
||||
private fun confirmClearNotifications() {
|
||||
AlertDialog.Builder(requireContext())
|
||||
MaterialAlertDialogBuilder(requireContext())
|
||||
.setMessage(R.string.notification_clear_text)
|
||||
.setPositiveButton(android.R.string.ok) { _: DialogInterface?, _: Int -> clearNotifications() }
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@ import android.view.Menu
|
|||
import android.view.MenuInflater
|
||||
import android.view.MenuItem
|
||||
import androidx.activity.viewModels
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.view.MenuProvider
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.paging.LoadState
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.google.android.material.color.MaterialColors
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.keylesspalace.tusky.BaseActivity
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.appstore.EventHub
|
||||
|
|
@ -168,7 +168,7 @@ class ScheduledStatusActivity :
|
|||
}
|
||||
|
||||
override fun delete(item: ScheduledStatus) {
|
||||
AlertDialog.Builder(this)
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setMessage(R.string.delete_scheduled_post_warning)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ import android.util.Log
|
|||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.core.app.ActivityOptionsCompat
|
||||
import androidx.core.content.getSystemService
|
||||
|
|
@ -39,6 +38,7 @@ import androidx.recyclerview.widget.DividerItemDecoration
|
|||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import at.connyduck.calladapter.networkresult.fold
|
||||
import at.connyduck.calladapter.networkresult.onFailure
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.ViewMediaActivity
|
||||
|
|
@ -485,7 +485,7 @@ class SearchStatusesFragment : SearchFragment<StatusViewData.Concrete>(), Status
|
|||
}
|
||||
|
||||
private fun onBlock(accountId: String, accountUsername: String) {
|
||||
AlertDialog.Builder(requireContext())
|
||||
MaterialAlertDialogBuilder(requireContext())
|
||||
.setMessage(getString(R.string.dialog_block_warning, accountUsername))
|
||||
.setPositiveButton(android.R.string.ok) { _, _ -> viewModel.blockAccount(accountId) }
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
|
|
@ -555,7 +555,7 @@ class SearchStatusesFragment : SearchFragment<StatusViewData.Concrete>(), Status
|
|||
|
||||
private fun showConfirmDeleteDialog(id: String, position: Int) {
|
||||
context?.let {
|
||||
AlertDialog.Builder(it)
|
||||
MaterialAlertDialogBuilder(it)
|
||||
.setMessage(R.string.dialog_delete_post_warning)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
viewModel.deleteStatusAsync(id)
|
||||
|
|
@ -568,7 +568,7 @@ class SearchStatusesFragment : SearchFragment<StatusViewData.Concrete>(), Status
|
|||
|
||||
private fun showConfirmEditDialog(id: String, position: Int, status: Status) {
|
||||
context?.let { context ->
|
||||
AlertDialog.Builder(context)
|
||||
MaterialAlertDialogBuilder(context)
|
||||
.setMessage(R.string.dialog_redraft_post_warning)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
viewLifecycleOwner.lifecycleScope.launch {
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ import android.content.Context
|
|||
import android.os.Build
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.preference.PreferenceManager
|
||||
import at.connyduck.calladapter.networkresult.onFailure
|
||||
import at.connyduck.calladapter.networkresult.onSuccess
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.components.login.LoginActivity
|
||||
|
|
@ -73,7 +73,7 @@ fun showMigrationNoticeIfNecessary(
|
|||
}
|
||||
|
||||
private fun showMigrationExplanationDialog(context: Context, accountManager: AccountManager) {
|
||||
AlertDialog.Builder(context).apply {
|
||||
MaterialAlertDialogBuilder(context).apply {
|
||||
if (currentAccountNeedsMigration(accountManager)) {
|
||||
setMessage(R.string.dialog_push_notification_migration)
|
||||
setPositiveButton(R.string.title_migration_relogin) { _, _ ->
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class ViewThreadActivity : BottomSheetActivity() {
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(binding.root)
|
||||
setSupportActionBar(binding.toolbar)
|
||||
setSupportActionBar(binding.includedToolbar.toolbar)
|
||||
supportActionBar?.run {
|
||||
setDisplayHomeAsUpEnabled(true)
|
||||
setDisplayShowHomeEnabled(true)
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ package com.keylesspalace.tusky.db
|
|||
import android.content.Context
|
||||
import android.content.DialogInterface
|
||||
import android.util.Log
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.lifecycle.LifecycleCoroutineScope
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.components.drafts.DraftsActivity
|
||||
import com.keylesspalace.tusky.db.dao.DraftDao
|
||||
|
|
@ -61,7 +61,7 @@ class DraftsAlert @Inject constructor(db: AppDatabase) {
|
|||
draftsNeedUserAlert.collect { count ->
|
||||
Log.d(TAG, "User id $activeAccountId changed: Notification-worthy draft count $count")
|
||||
if (count > 0) {
|
||||
AlertDialog.Builder(context)
|
||||
MaterialAlertDialogBuilder(context)
|
||||
.setTitle(R.string.action_post_failed)
|
||||
.setMessage(
|
||||
context.resources.getQuantityString(R.plurals.action_post_failed_detail, count)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ import android.view.View
|
|||
import android.widget.Toast
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.core.app.ActivityOptionsCompat
|
||||
import androidx.core.content.getSystemService
|
||||
|
|
@ -36,6 +35,7 @@ import androidx.fragment.app.Fragment
|
|||
import androidx.lifecycle.lifecycleScope
|
||||
import at.connyduck.calladapter.networkresult.fold
|
||||
import at.connyduck.calladapter.networkresult.onFailure
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.keylesspalace.tusky.BaseActivity
|
||||
import com.keylesspalace.tusky.BottomSheetActivity
|
||||
|
|
@ -383,7 +383,7 @@ abstract class SFragment(@LayoutRes contentLayoutId: Int) : Fragment(contentLayo
|
|||
}
|
||||
|
||||
private fun onBlock(accountId: String, accountUsername: String) {
|
||||
AlertDialog.Builder(requireContext())
|
||||
MaterialAlertDialogBuilder(requireContext())
|
||||
.setMessage(getString(R.string.dialog_block_warning, accountUsername))
|
||||
.setPositiveButton(android.R.string.ok) { _: DialogInterface?, _: Int ->
|
||||
lifecycleScope.launch {
|
||||
|
|
@ -428,7 +428,7 @@ abstract class SFragment(@LayoutRes contentLayoutId: Int) : Fragment(contentLayo
|
|||
}
|
||||
|
||||
private fun showConfirmDeleteDialog(id: String, position: Int) {
|
||||
AlertDialog.Builder(requireActivity())
|
||||
MaterialAlertDialogBuilder(requireActivity())
|
||||
.setMessage(R.string.dialog_delete_post_warning)
|
||||
.setPositiveButton(android.R.string.ok) { _: DialogInterface?, _: Int ->
|
||||
viewLifecycleOwner.lifecycleScope.launch {
|
||||
|
|
@ -452,7 +452,7 @@ abstract class SFragment(@LayoutRes contentLayoutId: Int) : Fragment(contentLayo
|
|||
private fun showConfirmEditDialog(id: String, position: Int, status: Status) {
|
||||
val context = context ?: return
|
||||
|
||||
AlertDialog.Builder(context)
|
||||
MaterialAlertDialogBuilder(context)
|
||||
.setMessage(R.string.dialog_redraft_post_warning)
|
||||
.setPositiveButton(android.R.string.ok) { _: DialogInterface?, _: Int ->
|
||||
viewLifecycleOwner.lifecycleScope.launch {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import androidx.preference.Preference
|
|||
import androidx.preference.PreferenceCategory
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
import androidx.preference.PreferenceScreen
|
||||
import androidx.preference.SwitchPreference
|
||||
import androidx.preference.SwitchPreferenceCompat
|
||||
import com.keylesspalace.tusky.view.SliderPreference
|
||||
import de.c1710.filemojicompat_ui.views.picker.preference.EmojiPickerPreference
|
||||
|
||||
|
|
@ -56,9 +56,9 @@ inline fun PreferenceParent.sliderPreference(
|
|||
}
|
||||
|
||||
inline fun PreferenceParent.switchPreference(
|
||||
builder: SwitchPreference.() -> Unit
|
||||
): SwitchPreference {
|
||||
val pref = SwitchPreference(context)
|
||||
builder: SwitchPreferenceCompat.() -> Unit
|
||||
): SwitchPreferenceCompat {
|
||||
val pref = SwitchPreferenceCompat(context)
|
||||
builder(pref)
|
||||
addPref(pref)
|
||||
return pref
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ import android.view.View
|
|||
import android.view.accessibility.AccessibilityEvent
|
||||
import android.view.accessibility.AccessibilityManager
|
||||
import android.widget.ArrayAdapter
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.view.AccessibilityDelegateCompat
|
||||
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat
|
||||
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat.AccessibilityActionCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.adapter.StatusBaseViewHolder
|
||||
import com.keylesspalace.tusky.entity.Status.Companion.MAX_MEDIA_ATTACHMENTS
|
||||
|
|
@ -174,7 +174,7 @@ class ListStatusAccessibilityDelegate(
|
|||
val status = getStatus(host) as? StatusViewData.Concrete ?: return
|
||||
val links = getLinks(status).toList()
|
||||
val textLinks = links.map { item -> item.link }
|
||||
AlertDialog.Builder(host.context)
|
||||
MaterialAlertDialogBuilder(host.context)
|
||||
.setTitle(R.string.title_links_dialog)
|
||||
.setAdapter(
|
||||
ArrayAdapter(
|
||||
|
|
@ -191,7 +191,7 @@ class ListStatusAccessibilityDelegate(
|
|||
val status = getStatus(host) as? StatusViewData.Concrete ?: return
|
||||
val mentions = status.actionable.mentions
|
||||
val stringMentions = mentions.map { it.username }
|
||||
AlertDialog.Builder(host.context)
|
||||
MaterialAlertDialogBuilder(host.context)
|
||||
.setTitle(R.string.title_mentions_dialog)
|
||||
.setAdapter(
|
||||
ArrayAdapter<CharSequence>(
|
||||
|
|
@ -209,7 +209,7 @@ class ListStatusAccessibilityDelegate(
|
|||
private fun showHashtagsDialog(host: View) {
|
||||
val status = getStatus(host) as? StatusViewData.Concrete ?: return
|
||||
val tags = getHashtags(status).map { it.subSequence(1, it.length) }.toList()
|
||||
AlertDialog.Builder(host.context)
|
||||
MaterialAlertDialogBuilder(host.context)
|
||||
.setTitle(R.string.title_hashtags_dialog)
|
||||
.setAdapter(
|
||||
ArrayAdapter(
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
package com.keylesspalace.tusky.view
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.content.res.ColorStateList
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.core.content.res.use
|
||||
|
|
@ -32,19 +32,13 @@ class LicenseCard
|
|||
@JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
defStyleAttr: Int = R.attr.licenseCardStyle
|
||||
) : MaterialCardView(context, attrs, defStyleAttr) {
|
||||
|
||||
init {
|
||||
val binding = CardLicenseBinding.inflate(LayoutInflater.from(context), this)
|
||||
|
||||
setCardBackgroundColor(
|
||||
MaterialColors.getColor(
|
||||
context,
|
||||
materialR.attr.colorSurface,
|
||||
Color.BLACK
|
||||
)
|
||||
)
|
||||
setStrokeColor(ColorStateList.valueOf(MaterialColors.getColor(this, materialR.attr.colorOutline)))
|
||||
|
||||
val (name, license, link) = context.theme.obtainStyledAttributes(
|
||||
attrs,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
package com.keylesspalace.tusky.view
|
||||
|
||||
import android.app.Activity
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.databinding.DialogMuteAccountBinding
|
||||
|
||||
|
|
@ -16,17 +16,26 @@ fun showMuteAccountDialog(
|
|||
binding.warning.text = activity.getString(R.string.dialog_mute_warning, accountUsername)
|
||||
binding.checkbox.isChecked = true
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
val durationLabels = activity.resources.getStringArray(R.array.mute_duration_names)
|
||||
binding.durationDropDown.setSimpleItems(durationLabels)
|
||||
|
||||
var selectedDurationIndex = 0
|
||||
binding.durationDropDown.setOnItemClickListener { _, _, position, _ ->
|
||||
selectedDurationIndex = position
|
||||
}
|
||||
binding.durationDropDown.setText(durationLabels[selectedDurationIndex], false)
|
||||
|
||||
MaterialAlertDialogBuilder(activity)
|
||||
.setView(binding.root)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
val durationValues = activity.resources.getIntArray(R.array.mute_duration_values)
|
||||
|
||||
// workaround to make indefinite muting work with Mastodon 3.3.0
|
||||
// https://github.com/tuskyapp/Tusky/issues/2107
|
||||
val duration = if (binding.duration.selectedItemPosition == 0) {
|
||||
val duration = if (selectedDurationIndex == 0) {
|
||||
null
|
||||
} else {
|
||||
durationValues[binding.duration.selectedItemPosition]
|
||||
durationValues[selectedDurationIndex]
|
||||
}
|
||||
|
||||
onOk(binding.checkbox.isChecked, duration)
|
||||
|
|
|
|||
11
app/src/main/res/color/selectable_chip_background.xml
Normal file
11
app/src/main/res/color/selectable_chip_background.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Disabled -->
|
||||
<item android:color="@android:color/transparent" android:state_enabled="false"/>
|
||||
|
||||
<!-- Selected -->
|
||||
<item android:color="?attr/colorPrimary" android:alpha="0.4" android:state_selected="true"/>
|
||||
<item android:color="?attr/colorPrimary" android:alpha="0.4" android:state_checked="true"/>
|
||||
|
||||
<!-- Not selected -->
|
||||
<item android:color="?attr/colorSurface" />
|
||||
</selector>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="8dp" />
|
||||
<corners android:radius="16dp" />
|
||||
<solid android:color="?android:attr/colorBackground" />
|
||||
</shape>
|
||||
</shape>
|
||||
|
|
|
|||
|
|
@ -59,10 +59,11 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/textReported"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progressMute"
|
||||
style="?android:attr/progressBarStyleSmall"
|
||||
style="@style/Widget.Material3.CircularProgressIndicator.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/buttonMute"
|
||||
app:layout_constraintEnd_toEndOf="@id/buttonMute"
|
||||
|
|
@ -82,9 +83,9 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/buttonMute"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progressBlock"
|
||||
style="?android:attr/progressBarStyleSmall"
|
||||
style="@style/Widget.Material3.CircularProgressIndicator.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@id/buttonBlock"
|
||||
|
|
@ -106,4 +107,4 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/buttonBlock"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -12,13 +12,14 @@
|
|||
android:layout_gravity="center_horizontal"
|
||||
android:background="?android:attr/colorBackground">
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.keylesspalace.tusky.view.TuskySwipeRefreshLayout
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@
|
|||
android:id="@+id/appBarOptions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorSurface"
|
||||
app:elevation="0dp">
|
||||
app:liftOnScroll="false">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/topButtonsLayout"
|
||||
|
|
@ -61,13 +60,6 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?android:attr/listDivider"
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<com.keylesspalace.tusky.view.TuskySwipeRefreshLayout
|
||||
|
|
@ -98,9 +90,10 @@
|
|||
</FrameLayout>
|
||||
</com.keylesspalace.tusky.view.TuskySwipeRefreshLayout>
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
</LinearLayout>
|
||||
</com.keylesspalace.tusky.view.TuskySwipeRefreshLayout>
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/initialProgressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -57,14 +57,14 @@
|
|||
android:id="@+id/deviceInfoTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginStart="@dimen/text_content_margin"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="@dimen/text_content_margin"
|
||||
android:lineSpacingMultiplier="1.1"
|
||||
android:text="@string/about_device_info_title"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textIsSelectable="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/versionTextView"
|
||||
|
|
@ -118,8 +118,8 @@
|
|||
style="@style/TuskyImageButton"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:contentDescription="@string/about_copy"
|
||||
android:layout_marginEnd="@dimen/text_content_margin"
|
||||
android:contentDescription="@string/about_copy"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/accountInfo"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/ic_content_copy_24" />
|
||||
|
|
@ -178,12 +178,11 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="@dimen/text_content_margin"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:maxWidth="320dp"
|
||||
android:text="@string/about_tusky_account"
|
||||
android:textAllCaps="false"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginEnd="@dimen/text_content_margin"
|
||||
app:layout_constraintEnd_toStartOf="@+id/aboutLicensesButton"
|
||||
app:layout_constraintStart_toStartOf="@+id/aboutBugsFeaturesInfoTextView"
|
||||
app:layout_constraintTop_toBottomOf="@id/aboutBugsFeaturesInfoTextView" />
|
||||
|
|
@ -193,13 +192,12 @@
|
|||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/text_content_margin"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:maxWidth="320dp"
|
||||
android:text="@string/title_licenses"
|
||||
android:textAlignment="center"
|
||||
android:textAllCaps="false"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginEnd="@dimen/text_content_margin"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/tuskyProfileButton"
|
||||
app:layout_constraintTop_toTopOf="@+id/tuskyProfileButton" />
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
android:id="@+id/accountAppBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="@dimen/actionbar_elevation">
|
||||
app:liftOnScroll="false">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:id="@+id/collapsingToolbar"
|
||||
|
|
@ -165,6 +165,7 @@
|
|||
app:chipMinHeight="@dimen/profile_badge_min_height"
|
||||
app:chipStrokeColor="?android:attr/textColorTertiary"
|
||||
app:chipStrokeWidth="@dimen/profile_badge_stroke_width"
|
||||
app:closeIconEnabled="false"
|
||||
app:ensureMinTouchTargetSize="false"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/accountUsernameTextView"
|
||||
|
|
@ -189,7 +190,7 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/accountNoteTextInputLayout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.Dense"
|
||||
style="@style/TuskyTextInput"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
|
|
@ -424,7 +425,7 @@
|
|||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- top margin equal to statusbar size will be set programmatically -->
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/accountToolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -441,7 +442,6 @@
|
|||
style="@style/TuskyTabAppearance"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorSurface"
|
||||
app:tabGravity="center"
|
||||
app:tabMode="scrollable" />
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@
|
|||
android:id="@+id/includedToolbar"
|
||||
layout="@layout/toolbar_basic" />
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true" />
|
||||
|
||||
<com.keylesspalace.tusky.view.TuskySwipeRefreshLayout
|
||||
android:id="@+id/swipeRefreshLayout"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
android:textStyle="bold"
|
||||
app:tooltipText="@string/description_post_language" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/atButton"
|
||||
style="@style/TuskyImageButton"
|
||||
android:layout_width="40dp"
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
android:textSize="?attr/status_text_large"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/hashButton"
|
||||
style="@style/TuskyImageButton"
|
||||
android:layout_width="40dp"
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
android:textSize="?attr/status_text_large"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageButton
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/descriptionMissingWarningButton"
|
||||
style="@style/TuskyImageButton"
|
||||
android:layout_width="40dp"
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
app:tint="@color/tusky_orange_light"
|
||||
app:tooltipText="@string/hint_media_description_missing"
|
||||
android:visibility="invisible" />
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/composeMainScrollView"
|
||||
|
|
@ -311,7 +311,6 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:contentDescription="@string/action_toggle_visibility"
|
||||
android:padding="4dp"
|
||||
app:tint="?android:attr/textColorTertiary"
|
||||
app:tooltipText="@string/action_toggle_visibility"
|
||||
tools:src="@drawable/ic_public_24dp" />
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
|
|
@ -51,15 +52,18 @@
|
|||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/actionChip"
|
||||
style="@style/Widget.MaterialComponents.Chip.Action"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checkable="false"
|
||||
android:text="@string/action_add"
|
||||
android:textColor="?attr/colorOnPrimary"
|
||||
app:chipBackgroundColor="?attr/colorPrimary"
|
||||
app:chipIcon="@drawable/ic_plus_24dp"
|
||||
app:chipIconEnabled="true"
|
||||
app:chipIconTint="?attr/colorOnPrimary"
|
||||
app:chipSurfaceColor="?attr/colorPrimary" />
|
||||
app:chipStrokeWidth="0dp"
|
||||
app:closeIconEnabled="false" />
|
||||
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
|
||||
<TextView
|
||||
|
|
@ -88,22 +92,24 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:minHeight="48dp"
|
||||
android:text="@string/filter_description_hide" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.TitleSmall"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/filterDurationInputLayout"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/label_duration"
|
||||
android:textColor="?attr/colorAccent" />
|
||||
android:hint="@string/label_expires_after">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/filterDurationSpinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:entries="@array/filter_duration_names"
|
||||
android:minHeight="48dp" />
|
||||
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||
android:id="@+id/filterDurationDropDown"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.TitleSmall"
|
||||
|
|
@ -113,35 +119,35 @@
|
|||
android:text="@string/label_filter_context"
|
||||
android:textColor="?attr/colorAccent" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/filter_context_home"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="48dp"
|
||||
android:text="@string/title_home" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/filter_context_notifications"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="48dp"
|
||||
android:text="@string/title_notifications" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/filter_context_public"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="48dp"
|
||||
android:text="@string/pref_title_public_filter_keywords" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/filter_context_thread"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="48dp"
|
||||
android:text="@string/pref_title_thread_filter_keywords" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/filter_context_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -158,18 +164,19 @@
|
|||
|
||||
<Button
|
||||
android:id="@+id/filter_delete_button"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
style="@style/TuskyButton.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/action_delete" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/filter_save_button"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
style="@style/TuskyButton.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/action_save" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -155,15 +155,14 @@
|
|||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:drawablePadding="6dp"
|
||||
android:text="@string/profile_metadata_add"
|
||||
android:textColor="#fff" />
|
||||
android:text="@string/profile_metadata_add" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/saveProgressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -38,10 +38,11 @@
|
|||
</FrameLayout>
|
||||
</com.keylesspalace.tusky.view.TuskySwipeRefreshLayout>
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
|
|
|
|||
|
|
@ -28,11 +28,12 @@
|
|||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/followedTagsProgressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:visibility="gone" />
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://kotlinlang.org/"
|
||||
license:name="Kotlin" />
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://developer.android.com/jetpack/androidx"
|
||||
license:name="AndroidX" />
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://github.com/material-components/material-components-android"
|
||||
license:name="Material Components for Android" />
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://square.github.io/okhttp/"
|
||||
license:name="OkHttp" />
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://github.com/google/conscrypt"
|
||||
license:name="Conscrypt" />
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://square.github.io/retrofit/"
|
||||
license:name="Retrofit" />
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://github.com/square/moshi"
|
||||
license:name="Moshi" />
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://bumptech.github.io/glide/"
|
||||
license:name="Glide" />
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://dagger.dev/"
|
||||
license:name="Dagger 2" />
|
||||
|
|
@ -129,7 +129,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://github.com/mikepenz/MaterialDrawer"
|
||||
license:name="MaterialDrawer" />
|
||||
|
|
@ -139,7 +139,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://github.com/connyduck/SparkButton"
|
||||
license:name="SparkButton" />
|
||||
|
|
@ -149,7 +149,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://github.com/chrisbanes/PhotoView"
|
||||
license:name="PhotoView" />
|
||||
|
|
@ -159,7 +159,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://github.com/CanHub/Android-Image-Cropper"
|
||||
license:name="Android Image Cropper" />
|
||||
|
|
@ -169,7 +169,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://github.com/penfeizhou/APNG4Android"
|
||||
license:name="APNG4Android" />
|
||||
|
|
@ -179,7 +179,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_apache_2"
|
||||
license:link="https://github.com/C1710/FileMojiCompat"
|
||||
license:name="FileMojiCompat" />
|
||||
|
|
@ -189,7 +189,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_cc_by_4"
|
||||
license:link="https://twemoji.twitter.com/"
|
||||
license:name="Twemoji" />
|
||||
|
|
@ -199,7 +199,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_cc_by_4"
|
||||
license:link="https://github.com/c1710/blobmoji"
|
||||
license:name="Blobmoji" />
|
||||
|
|
@ -209,7 +209,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
license:license="@string/license_cc_by_sa_4"
|
||||
license:link="https://github.com/tuskyapp/artwork"
|
||||
license:name="Tusky elephant artwork" />
|
||||
|
|
|
|||
|
|
@ -42,10 +42,11 @@
|
|||
</FrameLayout>
|
||||
</com.keylesspalace.tusky.view.TuskySwipeRefreshLayout>
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
|
|
|
|||
|
|
@ -78,9 +78,10 @@
|
|||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<TextView
|
||||
|
|
@ -94,7 +95,7 @@
|
|||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
|
|
@ -102,4 +103,4 @@
|
|||
android:background="@android:color/transparent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -7,19 +7,22 @@
|
|||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
app:liftOnScroll="false">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/loginToolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/loginProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<LinearLayout
|
||||
|
|
@ -49,4 +52,4 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
|||
|
|
@ -5,31 +5,30 @@
|
|||
android:id="@+id/mainDrawerLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="com.keylesspalace.tusky.MainActivity">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/mainCoordinatorLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.keylesspalace.tusky.MainActivity">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="@dimen/actionbar_elevation"
|
||||
app:elevationOverlayEnabled="false">
|
||||
app:liftOnScroll="false">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/mainToolbar"
|
||||
style="@style/Widget.AppCompat.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:navigationContentDescription="@string/action_open_drawer" />
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/topNav"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
|
|
@ -46,7 +45,8 @@
|
|||
app:tabGravity="fill"
|
||||
app:tabMaxWidth="0dp"
|
||||
app:tabMode="scrollable" />
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
|
@ -61,12 +61,15 @@
|
|||
<com.google.android.material.bottomappbar.BottomAppBar
|
||||
android:id="@+id/bottomNav"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="58dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:backgroundTint="?attr/colorSurface"
|
||||
app:contentInsetStart="0dp"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:fabAlignmentMode="end"
|
||||
app:navigationContentDescription="@string/action_open_drawer">
|
||||
app:menuAlignmentMode="auto"
|
||||
app:navigationContentDescription="@string/action_open_drawer"
|
||||
app:paddingBottomSystemWindowInsets="false">
|
||||
|
||||
<com.keylesspalace.tusky.view.AdaptiveTabLayout
|
||||
android:id="@+id/bottomTabLayout"
|
||||
|
|
@ -75,7 +78,8 @@
|
|||
android:layout_height="?attr/actionBarSize"
|
||||
app:tabGravity="fill"
|
||||
app:tabIndicatorGravity="top"
|
||||
app:tabMode="scrollable" />
|
||||
app:tabMode="scrollable"
|
||||
app:tabPaddingTop="0dp" />
|
||||
|
||||
</com.google.android.material.bottomappbar.BottomAppBar>
|
||||
|
||||
|
|
@ -87,16 +91,17 @@
|
|||
android:contentDescription="@string/action_compose"
|
||||
app:layout_anchor="@id/viewPager"
|
||||
app:layout_anchorGravity="bottom|end"
|
||||
app:tint="?attr/colorOnPrimary"
|
||||
app:srcCompat="@drawable/ic_create_24dp" />
|
||||
app:srcCompat="@drawable/ic_create_24dp"
|
||||
app:tint="?attr/colorOnPrimary" />
|
||||
|
||||
<include layout="@layout/item_status_bottom_sheet" />
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
|||
|
|
@ -15,12 +15,13 @@
|
|||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
|
|
|||
|
|
@ -9,17 +9,16 @@
|
|||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="@dimen/actionbar_elevation"
|
||||
app:layout_collapseMode="pin">
|
||||
app:layout_collapseMode="pin"
|
||||
app:liftOnScroll="false">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:elevation="@dimen/actionbar_elevation"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:layout_scrollFlags="scroll|snap|enterAlways"
|
||||
app:navigationIcon="?attr/homeAsUpIndicator" />
|
||||
app:layout_scrollFlags="scroll|snap|enterAlways" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:visibility="invisible"
|
||||
app:strokeWidth="0dp"
|
||||
app:cardBackgroundColor="?attr/colorSurface"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
|
|
@ -19,12 +19,12 @@
|
|||
android:theme="@style/ViewMediaActivity.AppBarLayout"
|
||||
app:titleTextColor="@color/white" />
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBarShare"
|
||||
style="?android:attr/progressBarStyleLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone" />
|
||||
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
|
|
|||
|
|
@ -6,22 +6,9 @@
|
|||
android:layout_height="match_parent"
|
||||
tools:context="com.keylesspalace.tusky.components.viewthread.ViewThreadActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="@dimen/actionbar_elevation"
|
||||
app:elevationOverlayEnabled="false">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Widget.AppCompat.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
<include
|
||||
android:id="@+id/includedToolbar"
|
||||
layout="@layout/toolbar_basic" />
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fragment_container"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/licenseCardName"
|
||||
|
|
|
|||
|
|
@ -25,22 +25,31 @@
|
|||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/add_poll_choice"
|
||||
app:layout_constraintEnd_toStartOf="@id/pollDurationSpinner"
|
||||
app:layout_constraintBottom_toBottomOf="@id/pollDurationInputLayout"
|
||||
app:layout_constraintEnd_toStartOf="@id/pollDurationInputLayout"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/pollChoices" />
|
||||
app:layout_constraintTop_toTopOf="@id/pollDurationInputLayout" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
android:id="@+id/pollDurationSpinner"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/pollDurationInputLayout"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/addChoiceButton"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/addChoiceButton"
|
||||
app:layout_constraintTop_toTopOf="@id/addChoiceButton" />
|
||||
app:layout_constraintTop_toBottomOf="@id/pollChoices">
|
||||
|
||||
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||
android:id="@+id/pollDurationDropDown"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/multipleChoicesCheckBox"
|
||||
|
|
|
|||
|
|
@ -1,64 +1,56 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingRight="20dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/nameText"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/nameTextLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="0dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:inputType="text"
|
||||
android:hint="@string/hint_list_name"
|
||||
android:importantForAutofill="no"
|
||||
/>
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<CheckBox
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/nameText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="text" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/exclusiveCheckbox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/nameText"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/list_exclusive_label"
|
||||
/>
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/nameTextLayout" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/replyPolicyLabel"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/replyPolicyInputLayout"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/exclusiveCheckbox"
|
||||
android:layout_marginTop="16dp"
|
||||
android:hint="@string/list_reply_policy_label"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="0dp"
|
||||
android:text="@string/list_reply_policy_label"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/exclusiveCheckbox">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/replyPolicySpinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/replyPolicyLabel"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="0dp"
|
||||
android:entries="@array/list_reply_policies_display"
|
||||
/>
|
||||
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||
android:id="@+id/replyPolicyDropDown"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -1,37 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp">
|
||||
|
||||
<TextView android:id="@+id/warning"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:paddingBottom="20dp"
|
||||
tools:text="@string/dialog_mute_warning"/>
|
||||
|
||||
<CheckBox android:id="@+id/checkbox"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:textColor="@color/textColorTertiary"
|
||||
app:buttonTint="@color/compound_button_color"
|
||||
android:text="@string/dialog_mute_hide_notifications"/>
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingRight="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/warning"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="20dp"
|
||||
android:text="@string/label_duration" />
|
||||
android:paddingBottom="20dp"
|
||||
tools:text="@string/dialog_mute_warning" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/duration"
|
||||
android:entries="@array/mute_duration_names"
|
||||
<CheckBox
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/dialog_mute_hide_notifications"
|
||||
android:textColor="@color/textColorTertiary"
|
||||
app:buttonTint="@color/compound_button_color" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/durationInputLayout"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:hint="@string/label_duration">
|
||||
|
||||
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||
android:id="@+id/durationDropDown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
|
|
|
|||
|
|
@ -5,20 +5,21 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true"
|
||||
android:visibility="gone"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/listsView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
android:visibility="gone"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.keylesspalace.tusky.view.BackgroundMessageView
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@
|
|||
android:layout_height="0dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="@id/checkMark"
|
||||
app:srcCompat="@drawable/ic_check_24dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/checkMark"
|
||||
app:layout_constraintHeight_percent="0.3"
|
||||
app:layout_constraintStart_toStartOf="@id/checkMark"
|
||||
app:layout_constraintTop_toTopOf="@id/checkMark"
|
||||
app:layout_constraintWidth_percent="0.22"
|
||||
app:srcCompat="@drawable/ic_check_24dp"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
|
|
@ -58,11 +58,12 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/textReported"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressMute"
|
||||
style="?android:attr/progressBarStyleSmall"
|
||||
style="@style/Widget.Material3.CircularProgressIndicator.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintBottom_toBottomOf="@id/buttonMute"
|
||||
app:layout_constraintEnd_toEndOf="@id/buttonMute"
|
||||
app:layout_constraintStart_toStartOf="@id/buttonMute"
|
||||
|
|
@ -81,11 +82,12 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/buttonMute"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBlock"
|
||||
style="?android:attr/progressBarStyleSmall"
|
||||
style="@style/Widget.Material3.CircularProgressIndicator.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintBottom_toBottomOf="@id/buttonBlock"
|
||||
app:layout_constraintEnd_toEndOf="@id/buttonBlock"
|
||||
app:layout_constraintStart_toStartOf="@id/buttonBlock"
|
||||
|
|
@ -105,4 +107,4 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/buttonBlock"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -35,12 +35,12 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:lineSpacingMultiplier="1.1"
|
||||
android:text="@string/report_description_1"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="?attr/status_text_small"
|
||||
app:layout_constraintEnd_toEndOf="@id/guideEnd"
|
||||
app:layout_constraintStart_toStartOf="@id/guideBegin"
|
||||
android:lineSpacingMultiplier="1.1"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
|
|
@ -70,10 +70,10 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:lineSpacingMultiplier="1.1"
|
||||
android:text="@string/report_description_remote_instance"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="?attr/status_text_small"
|
||||
android:lineSpacingMultiplier="1.1"
|
||||
app:layout_constraintEnd_toEndOf="@id/guideEnd"
|
||||
app:layout_constraintStart_toStartOf="@id/guideBegin"
|
||||
app:layout_constraintTop_toBottomOf="@id/layoutAdditionalInfo" />
|
||||
|
|
@ -91,11 +91,12 @@
|
|||
app:layout_constraintStart_toStartOf="@id/guideBegin"
|
||||
app:layout_constraintTop_toBottomOf="@id/reportDescriptionRemoteInstance" />
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="48dp"
|
||||
android:indeterminate="true"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
@ -107,7 +108,6 @@
|
|||
|
||||
<Button
|
||||
android:id="@+id/buttonBack"
|
||||
tools:ignore="BackButton"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -115,7 +115,8 @@
|
|||
android:text="@string/button_back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/buttonReport" />
|
||||
app:layout_constraintEnd_toStartOf="@id/buttonReport"
|
||||
tools:ignore="BackButton" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonReport"
|
||||
|
|
@ -127,4 +128,4 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -18,26 +18,23 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
</com.keylesspalace.tusky.view.TuskySwipeRefreshLayout>
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progressBarTop"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintTop_toTopOf="@id/swipeRefreshLayout" />
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progressBarBottom"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintBottom_toBottomOf="@id/swipeRefreshLayout" />
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBarLoading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
</com.keylesspalace.tusky.view.TuskySwipeRefreshLayout>
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/searchProgressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -37,9 +37,8 @@
|
|||
android:text="@string/search_no_results"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progressBarBottom"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@
|
|||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:clipToPadding="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false" />
|
||||
|
||||
<com.keylesspalace.tusky.view.BackgroundMessageView
|
||||
android:id="@+id/statusView"
|
||||
|
|
@ -29,10 +29,11 @@
|
|||
</FrameLayout>
|
||||
</com.keylesspalace.tusky.view.TuskySwipeRefreshLayout>
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
|
|
|
|||
|
|
@ -25,8 +25,7 @@
|
|||
android:id="@+id/appBarOptions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorSurface"
|
||||
app:elevation="0dp">
|
||||
app:liftOnScroll="false">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/topButtonsLayout"
|
||||
|
|
@ -54,13 +53,6 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?android:attr/listDivider"
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<com.keylesspalace.tusky.view.TuskySwipeRefreshLayout
|
||||
|
|
@ -90,10 +82,11 @@
|
|||
|
||||
</com.keylesspalace.tusky.view.TuskySwipeRefreshLayout>
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
|||
|
|
@ -31,10 +31,11 @@
|
|||
</FrameLayout>
|
||||
</com.keylesspalace.tusky.view.TuskySwipeRefreshLayout>
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
</com.keylesspalace.tusky.view.TuskySwipeRefreshLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/initialProgressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -12,13 +12,14 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
</com.keylesspalace.tusky.view.TuskySwipeRefreshLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/initialProgressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -12,15 +12,15 @@
|
|||
android:id="@+id/videoView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
app:hide_on_touch="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:use_controller="false"
|
||||
app:show_previous_button="false"
|
||||
app:show_next_button="false"
|
||||
app:show_previous_button="false"
|
||||
app:show_timeout="0"
|
||||
app:hide_on_touch="false" />
|
||||
app:use_controller="false" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/mediaDescriptionScrollView"
|
||||
|
|
@ -46,10 +46,11 @@
|
|||
|
||||
</ScrollView>
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
|
|
|
|||
|
|
@ -27,16 +27,16 @@
|
|||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/addReactionChip"
|
||||
style="@style/Widget.MaterialComponents.Chip.Action"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checkable="false"
|
||||
android:contentDescription="@string/action_add_reaction"
|
||||
android:textColor="?attr/colorOnPrimary"
|
||||
app:chipEndPadding="4dp"
|
||||
app:chipBackgroundColor="?attr/colorPrimary"
|
||||
app:chipIcon="@drawable/ic_plus_24dp"
|
||||
app:chipIconTint="?attr/colorOnPrimary"
|
||||
app:chipSurfaceColor="?attr/colorPrimary"
|
||||
app:chipStrokeWidth="0dp"
|
||||
app:closeIconEnabled="false"
|
||||
app:textEndPadding="0dp"
|
||||
app:textStartPadding="0dp" />
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,6 @@
|
|||
android:paddingTop="4dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
|
|
@ -184,7 +183,6 @@
|
|||
android:paddingTop="4dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
app:strokeColor="?android:textColorTertiary"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
|
@ -54,4 +55,4 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp">
|
||||
|
||||
<ProgressBar
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true" />
|
||||
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@
|
|||
app:srcCompat="@drawable/ic_clear_24dp"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/muted_user_mute_notifications"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -84,6 +84,6 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/muted_user_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/muted_user_username"
|
||||
app:switchPadding="4dp" />
|
||||
app:switchPadding="8dp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -5,19 +5,23 @@
|
|||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/errorMsg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
<ProgressBar
|
||||
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:indeterminate="true"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/retryButton"
|
||||
style="@style/TuskyButton.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/action_retry"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -22,11 +22,13 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<androidx.core.widget.ContentLoadingProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error_msg"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
|
|
@ -35,6 +37,7 @@
|
|||
android:layout_gravity="center"
|
||||
android:textAlignment="center"
|
||||
tools:text="@string/socket_timeout_exception"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/retry_button"
|
||||
style="@style/TuskyButton.Outlined"
|
||||
|
|
@ -42,4 +45,5 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/action_retry"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@
|
|||
android:paddingTop="4dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/guideBegin"
|
||||
|
|
@ -74,7 +73,6 @@
|
|||
android:paddingTop="4dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/guideBegin"
|
||||
|
|
|
|||
|
|
@ -164,7 +164,6 @@
|
|||
android:paddingTop="4dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/post_content_warning_show_more"
|
||||
android:textOn="@string/post_content_warning_show_less"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
|
|
@ -273,7 +272,6 @@
|
|||
android:paddingTop="4dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
|
|
|
|||
|
|
@ -141,7 +141,6 @@
|
|||
android:paddingTop="4dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="?attr/status_text_large"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/status_content_warning_description"
|
||||
|
|
|
|||
|
|
@ -121,7 +121,6 @@
|
|||
android:paddingTop="4dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:layout_constraintStart_toEndOf="@id/notification_status_avatar"
|
||||
app:layout_constraintTop_toBottomOf="@id/notification_content_warning_description"
|
||||
|
|
@ -154,7 +153,6 @@
|
|||
android:paddingTop="4dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toEndOf="@id/notification_status_avatar"
|
||||
|
|
|
|||
|
|
@ -65,15 +65,17 @@
|
|||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/actionChip"
|
||||
style="@style/Widget.MaterialComponents.Chip.Action"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checkable="false"
|
||||
android:text="@string/add_hashtag_title"
|
||||
android:textColor="?attr/colorOnPrimary"
|
||||
app:chipBackgroundColor="?attr/colorPrimary"
|
||||
app:chipIcon="@drawable/ic_plus_24dp"
|
||||
app:chipIconEnabled="true"
|
||||
app:chipIconTint="?attr/colorOnPrimary"
|
||||
app:chipSurfaceColor="?attr/colorPrimary" />
|
||||
app:chipStrokeWidth="0dp"
|
||||
app:closeIconEnabled="false" />
|
||||
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||
|
|
@ -111,7 +112,9 @@
|
|||
android:paddingEnd="@dimen/preference_seekbar_padding_horizontal"
|
||||
android:paddingTop="@dimen/preference_seekbar_padding_vertical"
|
||||
android:paddingBottom="@dimen/preference_seekbar_padding_vertical"
|
||||
android:background="@null"/>
|
||||
android:background="@null"
|
||||
app:trackColorActive="?attr/colorPrimary"
|
||||
app:trackColorInactive="?attr/colorSurface"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/increment"
|
||||
|
|
|
|||
9
app/src/main/res/layout/preference_material_switch.xml
Normal file
9
app/src/main/res/layout/preference_material_switch.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Derived from https://github.com/androidx/androidx/blob/8cb282cc/preference/preference/res/layout/preference_widget_switch_compat.xml -->
|
||||
<com.google.android.material.materialswitch.MaterialSwitch xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/switchWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:focusable="false" />
|
||||
|
|
@ -1,16 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.appbar.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="@dimen/actionbar_elevation"
|
||||
app:layout_collapseMode="pin">
|
||||
app:liftOnScroll="false">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize" />
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
<color name="colorBackground">@color/tusky_grey_20</color>
|
||||
<color name="windowBackground">@color/tusky_grey_10</color>
|
||||
|
||||
<color name="colorSecondaryContainer">@color/tusky_grey_blue_dark</color>
|
||||
|
||||
<color name="textColorPrimary">@color/white</color>
|
||||
<color name="textColorSecondary">@color/tusky_grey_90</color>
|
||||
<color name="textColorTertiary">@color/tusky_grey_70</color>
|
||||
|
|
@ -19,7 +21,7 @@
|
|||
|
||||
<color name="colorBackgroundAccent">@color/tusky_grey_30</color>
|
||||
<color name="colorBackgroundHighlight">@color/tusky_grey_50</color>
|
||||
<color name="dividerColor">@color/tusky_grey_30</color>
|
||||
<color name="dividerColor">@color/tusky_grey_40</color>
|
||||
<color name="dividerColorOther">@color/tusky_grey_10</color>
|
||||
|
||||
<color name="favoriteButtonActiveColor">@color/tusky_orange</color>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
<attr name="android:text"/>
|
||||
</declare-styleable>
|
||||
|
||||
<attr name="licenseCardStyle" format="reference" />
|
||||
|
||||
<declare-styleable name="LicenseCard">
|
||||
<attr name="name" format="string|reference" />
|
||||
<attr name="license" format="string|reference" />
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@
|
|||
<color name="tusky_grey_90">#d9e1e8</color>
|
||||
<color name="tusky_grey_95">#ebeff4</color>
|
||||
|
||||
<color name="tusky_grey_blue_light">#94bada</color>
|
||||
<color name="tusky_grey_blue_dark">#305879</color>
|
||||
|
||||
<color name="transparent_tusky_blue">#8c2b90d9</color>
|
||||
<color name="transparent_black">#8f000000</color>
|
||||
<color name="header_background_filter_dark">#44000000</color>
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@
|
|||
<dimen name="compose_activity_scrollview_height">-1px</dimen> <!-- match_parent -->
|
||||
<dimen name="timeline_width">-1px</dimen> <!-- match_parent -->
|
||||
|
||||
<dimen name="actionbar_elevation">4dp</dimen>
|
||||
|
||||
<item name="wrap_content" format="integer" type="dimen">-2</item>
|
||||
|
||||
<dimen name="preference_icon_size">20dp</dimen>
|
||||
|
|
|
|||
|
|
@ -90,8 +90,8 @@
|
|||
<string name="post_media_hidden_title">Media hidden</string>
|
||||
<string name="post_media_alt">ALT</string>
|
||||
<string name="post_sensitive_media_directions">Click to view</string>
|
||||
<string name="post_content_warning_show_more">Show More</string>
|
||||
<string name="post_content_warning_show_less">Show Less</string>
|
||||
<string name="post_content_warning_show_more">Show more</string>
|
||||
<string name="post_content_warning_show_less">Show less</string>
|
||||
<string name="post_content_show_more">Expand</string>
|
||||
<string name="post_content_show_less">Collapse</string>
|
||||
<string name="post_edited">Edited %1$s</string>
|
||||
|
|
@ -458,7 +458,7 @@
|
|||
<string name="pref_title_alway_open_spoiler">Always expand posts marked with content warnings</string>
|
||||
<string name="title_media">Media</string>
|
||||
<string name="replying_to">Replying to @%1$s</string>
|
||||
<string name="load_more_placeholder_text">load more</string>
|
||||
<string name="load_more_placeholder_text">Load more</string>
|
||||
|
||||
<string name="pref_title_public_filter_keywords">Public timelines</string>
|
||||
<string name="pref_title_thread_filter_keywords">Conversations</string>
|
||||
|
|
@ -480,9 +480,9 @@
|
|||
<string name="error_create_list">Could not create list</string>
|
||||
<string name="error_rename_list">Could not update list</string>
|
||||
<string name="error_delete_list">Could not delete list</string>
|
||||
<string name="action_create_list">Create a list</string>
|
||||
<string name="action_rename_list">Update the list</string>
|
||||
<string name="action_delete_list">Delete the list</string>
|
||||
<string name="action_create_list">Create list</string>
|
||||
<string name="action_rename_list">Update list</string>
|
||||
<string name="action_delete_list">Delete list</string>
|
||||
<string name="hint_search_people_list">Search for people you follow</string>
|
||||
<string name="action_add_to_list">Add account to the list</string>
|
||||
<string name="action_remove_from_list">Remove account from the list</string>
|
||||
|
|
@ -699,6 +699,7 @@
|
|||
|
||||
<string name="create_poll_title">Poll</string>
|
||||
<string name="label_duration">Duration</string>
|
||||
<string name="label_expires_after">Expires after</string>
|
||||
<string name="duration_indefinite">Indefinite</string>
|
||||
<string name="duration_5_min">5 minutes</string>
|
||||
<string name="duration_30_min">30 minutes</string>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
<style name="TuskyDialogActivityTheme" parent="@style/TuskyTheme" />
|
||||
|
||||
<style name="TuskyBaseTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<style name="TuskyBaseTheme" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Provide default text sizes. These are overwritten in BaseActivity, but
|
||||
if they are missing then the Android Studio layout preview crashes
|
||||
with java.lang.reflect.InvocationTargetException -->
|
||||
|
|
@ -53,7 +53,20 @@
|
|||
<item name="colorSecondary">@color/colorSecondary</item>
|
||||
<item name="colorOnSecondary">@color/white</item>
|
||||
|
||||
<item name="colorPrimaryContainer">@color/colorPrimary</item>
|
||||
<item name="colorOnPrimaryContainer">@color/colorOnPrimary</item>
|
||||
|
||||
<item name="colorSurface">@color/colorSurface</item>
|
||||
<item name="colorSurfaceVariant">@color/colorSurface</item>
|
||||
|
||||
<item name="colorSurfaceContainerLowest">@color/colorSurface</item>
|
||||
<item name="colorSurfaceContainerLow">@color/colorSurface</item>
|
||||
<item name="colorSurfaceContainer">@color/colorSurface</item>
|
||||
<item name="colorSurfaceContainerHigh">@color/colorSurface</item>
|
||||
<item name="colorSurfaceContainerHighest">@color/colorSurface</item>
|
||||
|
||||
<!-- used for e.g. selected menu items -->
|
||||
<item name="colorSecondaryContainer">@color/colorSecondaryContainer</item>
|
||||
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
|
||||
|
|
@ -67,6 +80,8 @@
|
|||
<item name="android:textColorTertiary">@color/textColorTertiary</item>
|
||||
|
||||
<item name="iconColor">@color/iconColor</item>
|
||||
<item name="colorOutline">@color/iconColor</item>
|
||||
<item name="colorOutlineVariant">@color/dividerColor</item>
|
||||
|
||||
<item name="android:listDivider">@drawable/status_divider</item>
|
||||
<item name="dividerColor">@color/dividerColor</item>
|
||||
|
|
@ -76,18 +91,24 @@
|
|||
<item name="materialDrawerStyle">@style/TuskyDrawerStyle</item>
|
||||
<item name="materialDrawerHeaderStyle">@style/TuskyDrawerHeaderStyle</item>
|
||||
|
||||
<item name="alertDialogTheme">@style/TuskyDialog</item>
|
||||
<item name="snackbarButtonStyle">@style/TuskyButton.TextButton</item>
|
||||
<item name="appBarLayoutStyle">@style/Widget.MaterialComponents.AppBarLayout.Surface</item>
|
||||
|
||||
<!-- for dialogs created with MaterialALertDialogBuilder -->
|
||||
<item name="materialAlertDialogTheme">@style/TuskyDialogOverlay</item>
|
||||
<!-- for dialogs opened from preferences -->
|
||||
<item name="alertDialogTheme">@style/TuskyDialogOverlay</item>
|
||||
<item name="dialogCornerRadius">16dp</item>
|
||||
|
||||
<item name="minTouchTargetSize">32dp</item> <!-- this affects RadioButton size -->
|
||||
<item name="elevationOverlayEnabled">false</item> <!-- disable the automatic tinting of surfaces with elevation in dark mode -->
|
||||
|
||||
<item name="swipeRefreshLayoutProgressSpinnerBackgroundColor">?attr/colorSurface</item>
|
||||
|
||||
<item name="chipStyle">@style/Widget.MaterialComponents.Chip.Choice</item>
|
||||
<item name="chipStyle">@style/Widget.Material3.Chip.Filter</item>
|
||||
|
||||
<item name="preferenceTheme">@style/TuskyPreferenceTheme</item>
|
||||
|
||||
<item name="licenseCardStyle">@style/Widget.Material3.CardView.Filled</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyBlackThemeBase" parent="TuskyBaseTheme">
|
||||
|
|
@ -113,24 +134,35 @@
|
|||
<item name="android:colorControlNormal">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyDialog" parent="@style/ThemeOverlay.MaterialComponents.Dialog.Alert">
|
||||
<item name="android:letterSpacing">0</item>
|
||||
<item name="dialogCornerRadius">8dp</item>
|
||||
<item name="android:colorBackground">@color/colorBackground</item>
|
||||
<style name="TuskyDialogOverlay" parent="@style/ThemeOverlay.Material3.MaterialAlertDialog">
|
||||
<item name="alertDialogStyle">@style/TuskyDialog</item>
|
||||
<item name="android:background">@color/colorBackground</item>
|
||||
<item name="android:backgroundDimAmount">0.5</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyDialogFragmentStyle" parent="@style/ThemeOverlay.MaterialComponents.Dialog">
|
||||
<style name="TuskyDialog" parent="@style/MaterialAlertDialog.Material3">
|
||||
<item name="shapeAppearance">@style/ShapeAppearance.Material3.Corner.Large</item>
|
||||
<item name="backgroundTint">@color/colorBackground</item>
|
||||
<item name="buttonBarNeutralButtonStyle">@style/TuskyButton.TextButton</item>
|
||||
<item name="buttonBarPositiveButtonStyle">@style/TuskyButton.TextButton</item>
|
||||
<item name="buttonBarNegativeButtonStyle">@style/TuskyButton.TextButton</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyDialogFragmentStyle" parent="@style/ThemeOverlay.Material3.Dialog">
|
||||
<item name="dialogCornerRadius">8dp</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyTabAppearance" parent="Widget.MaterialComponents.TabLayout">
|
||||
<item name="tabTextAppearance">?android:attr/textAppearanceButton</item>
|
||||
<item name="android:textAllCaps">true</item>
|
||||
<item name="tabIndicatorHeight">3dp</item>
|
||||
<style name="TuskyTabAppearance" parent="Widget.Material3.TabLayout">
|
||||
<item name="tabIndicatorHeight">4dp</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyPreferenceTheme" parent="@style/PreferenceThemeOverlay.v14.Material">
|
||||
<style name="TuskyPreferenceTheme" parent="@style/PreferenceThemeOverlay">
|
||||
<item name="android:tint">?iconColor</item>
|
||||
<item name="switchPreferenceCompatStyle">@style/TuskySwitchPreference</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskySwitchPreference" parent="@style/Preference.SwitchPreferenceCompat.Material">
|
||||
<item name="widgetLayout">@layout/preference_material_switch</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyImageButton" parent="@style/Widget.MaterialComponents.Button.UnelevatedButton">
|
||||
|
|
@ -138,17 +170,17 @@
|
|||
<item name="android:background">?attr/selectableItemBackgroundBorderless</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyButton" parent="Widget.MaterialComponents.Button">
|
||||
<item name="android:letterSpacing">0</item>
|
||||
<style name="TuskyButton" parent="Widget.Material3.Button">
|
||||
<item name="shapeAppearance">@style/ShapeAppearance.Material3.Corner.Small</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyButton.Outlined" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
||||
<style name="TuskyButton.Outlined" parent="Widget.Material3.Button.OutlinedButton">
|
||||
<item name="strokeColor">?attr/colorBackgroundAccent</item>
|
||||
<item name="android:letterSpacing">0</item>
|
||||
<item name="shapeAppearance">@style/ShapeAppearance.Material3.Corner.Small</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyButton.TextButton" parent="Widget.MaterialComponents.Button.TextButton">
|
||||
<item name="android:letterSpacing">0</item>
|
||||
<style name="TuskyButton.TextButton" parent="Widget.Material3.Button.TextButton">
|
||||
<item name="shapeAppearance">@style/ShapeAppearance.Material3.Corner.Small</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyTextInput" parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense">
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
<color name="colorBackground">@color/white</color>
|
||||
<color name="windowBackground">@color/tusky_grey_80</color>
|
||||
|
||||
<color name="colorSecondaryContainer">@color/tusky_grey_blue_light</color>
|
||||
|
||||
<color name="textColorPrimary">@color/tusky_grey_10</color>
|
||||
<color name="textColorSecondary">@color/tusky_grey_20</color>
|
||||
<color name="textColorTertiary">@color/tusky_grey_30</color>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ hilt = "2.52"
|
|||
kotlin = "2.0.20"
|
||||
image-cropper = "4.3.2"
|
||||
material = "1.12.0"
|
||||
material-drawer = "8.4.5"
|
||||
material-drawer = "9.0.2"
|
||||
material-typeface = "4.0.0.3-kotlin"
|
||||
mockito-inline = "5.2.0"
|
||||
mockito-kotlin = "5.4.0"
|
||||
|
|
|
|||
|
|
@ -6808,6 +6808,14 @@
|
|||
<sha256 value="117e399cf545f3199bb536bb60a1f816cba55a4ad05440d60dbdffdb5bf4572d" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.mikepenz" name="fastadapter" version="5.7.0">
|
||||
<artifact name="fastadapter-5.7.0.aar">
|
||||
<sha256 value="6b871bcf1ea046c5530cb594a44d535d9ba5858876ebcb6a818ef7db7b532a5b" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
<artifact name="fastadapter-5.7.0.module">
|
||||
<sha256 value="6c08f903bedb28d92b0c62cc83045f10ff6ced2215958b3c3528d96384bc5e22" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.mikepenz" name="fastadapter-extensions-expandable" version="5.5.1">
|
||||
<artifact name="fastadapter-extensions-expandable-5.5.1.aar">
|
||||
<sha256 value="833755911f4721e0c8fd8644211e178df00256e7e179ed71b9a2a2811fd7b734" origin="Generated by Gradle"/>
|
||||
|
|
@ -6816,6 +6824,14 @@
|
|||
<sha256 value="01b3ced001e936a98864e7c76fa7c845bdc90af1e3cbb0e6d96d6976552f36df" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.mikepenz" name="fastadapter-extensions-expandable" version="5.7.0">
|
||||
<artifact name="fastadapter-extensions-expandable-5.7.0.aar">
|
||||
<sha256 value="6f20a76b2f8d7d92f6d755f39d7cac8d9d43d3ccf052b33acaf4de6c88469433" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
<artifact name="fastadapter-extensions-expandable-5.7.0.module">
|
||||
<sha256 value="7fa0dfcaa973c2e5b523cba35a55d65b8ac6280d8394656d5c140bae49f50d88" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.mikepenz" name="google-material-typeface" version="4.0.0.3-kotlin">
|
||||
<artifact name="google-material-typeface-4.0.0.3-kotlin-sources.jar">
|
||||
<sha256 value="a91846450b6dc24b835c5cdbee71905f57fc9ba0eb44627ebce081d20842a1e1" origin="Generated by Gradle"/>
|
||||
|
|
@ -6835,6 +6851,14 @@
|
|||
<sha256 value="19b08bd366faf91237209e498cf294079501f7f71c7b1720cd12deee04afc5aa" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.mikepenz" name="iconics-core" version="5.4.0">
|
||||
<artifact name="iconics-core-5.4.0.aar">
|
||||
<sha256 value="2ae469c3731dba7c7ba210688c603fe8732eb3d65d0f005de1f2907c0acefc86" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
<artifact name="iconics-core-5.4.0.module">
|
||||
<sha256 value="bf025470faecf3c5c3dc0c39e222519b9fc9eac286b99c13a6ab82fda4bc645a" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.mikepenz" name="iconics-typeface-api" version="5.3.2">
|
||||
<artifact name="iconics-typeface-api-5.3.2.aar">
|
||||
<sha256 value="2c492dba56b8d3cad3527f46175e7e5967bde99207afd7556d18755e46556ad8" origin="Generated by Gradle"/>
|
||||
|
|
@ -6843,6 +6867,14 @@
|
|||
<sha256 value="f7aca8af9f3257ec0fdadddc854b537f5c970bdeab5e8a6d4db27075bca8b0f1" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.mikepenz" name="iconics-typeface-api" version="5.4.0">
|
||||
<artifact name="iconics-typeface-api-5.4.0.aar">
|
||||
<sha256 value="2c359993e0999ab1d5727a81a8bf0aecb1176ff6b9cfaf4cecfa02abf816b4be" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
<artifact name="iconics-typeface-api-5.4.0.module">
|
||||
<sha256 value="5d188beccb313f101b16652635ea6946c50ca44a921e5da376d13a874f29102f" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.mikepenz" name="iconics-typeface-api" version="5.5.0-b01">
|
||||
<artifact name="iconics-typeface-api-5.5.0-b01.aar">
|
||||
<sha256 value="258b2b1daee3fc1ea3d114ae48fb2005c8e58f5b6e61c1d91daf0c2ce654fc0d" origin="Generated by Gradle"/>
|
||||
|
|
@ -6859,6 +6891,14 @@
|
|||
<sha256 value="05d34eb0f3ba784b985a6d205c9952a1f4afc19c1ec16a9bdaa34066b10b94d6" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.mikepenz" name="materialdrawer" version="9.0.2">
|
||||
<artifact name="materialdrawer-9.0.2.aar">
|
||||
<sha256 value="0a37cc680f8c77e660d76453524dd4fee3e4e01c38be2edffcf44f5c0e09fd85" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
<artifact name="materialdrawer-9.0.2.module">
|
||||
<sha256 value="785ec480ceb0bee8b03cf2fa4e8dbc8133b56ad0a9187a6f8d320398120b1063" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.mikepenz" name="materialdrawer-iconics" version="8.4.5">
|
||||
<artifact name="materialdrawer-iconics-8.4.5.aar">
|
||||
<sha256 value="4619cd9ba3df5a51241d5b50c227378b0512d591107330f0f8a20d6c5e86492a" origin="Generated by Gradle"/>
|
||||
|
|
@ -6867,6 +6907,14 @@
|
|||
<sha256 value="824509161c2fc38f0ff06b58ead89a36c3af73ddfe7ac514cbfa1d0f726003df" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.mikepenz" name="materialdrawer-iconics" version="9.0.2">
|
||||
<artifact name="materialdrawer-iconics-9.0.2.aar">
|
||||
<sha256 value="1151b35bef0759a4b523c1b9be3db7a8ff0a37ae115d07c06a314c119427d936" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
<artifact name="materialdrawer-iconics-9.0.2.module">
|
||||
<sha256 value="679890c4ee64b5763f57afa3551c19dcd2b520450d026503f8f77cf2bccef204" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="com.pinterest.ktlint" name="ktlint-cli" version="1.0.1">
|
||||
<artifact name="ktlint-cli-1.0.1.jar">
|
||||
<sha256 value="81889a9cab5da042aea48869b170299fec7d6f66773aa7d5245b8b8ccb8d0c89" origin="Generated by Gradle"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue