Merge pull request #7814 from thunderbird/change-icons-to-use-drawable-reference
Change icons to use drawable reference
This commit is contained in:
commit
eb01bc569c
41 changed files with 136 additions and 770 deletions
|
@ -5,6 +5,6 @@
|
|||
android:id="@+id/done"
|
||||
android:title="@string/unread_widget_action_done"
|
||||
app:showAsAction="always"
|
||||
android:icon="?attr/iconActionSave"
|
||||
android:icon="@drawable/ic_floppy"
|
||||
/>
|
||||
</menu>
|
||||
</menu>
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
{
|
||||
"data": [
|
||||
{
|
||||
"name": "Inbox",
|
||||
"icon": "?attr/iconFolderInbox"
|
||||
},
|
||||
{
|
||||
"name": "Outbox",
|
||||
"icon": "?attr/iconFolderOutbox"
|
||||
},
|
||||
{
|
||||
"name": "Archive",
|
||||
"icon": "?attr/iconFolderArchive"
|
||||
},
|
||||
{
|
||||
"name": "Drafts",
|
||||
"icon": "?attr/iconFolderDrafts"
|
||||
},
|
||||
{
|
||||
"name": "Sent",
|
||||
"icon": "?attr/iconFolderSent"
|
||||
},
|
||||
{
|
||||
"name": "Spam",
|
||||
"icon": "?attr/iconFolderSpam"
|
||||
},
|
||||
{
|
||||
"name": "Trash",
|
||||
"icon": "?attr/iconFolderTrash"
|
||||
},
|
||||
{
|
||||
"name": "Regular folder",
|
||||
"icon": "?attr/iconFolder"
|
||||
},
|
||||
{
|
||||
"name": "Another folder",
|
||||
"icon": "?attr/iconFolder"
|
||||
},
|
||||
{
|
||||
"name": "And yet another folder",
|
||||
"icon": "?attr/iconFolder"
|
||||
},
|
||||
{
|
||||
"name": "Folder",
|
||||
"icon": "?attr/iconFolder"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -7,7 +7,6 @@ import android.graphics.PorterDuff
|
|||
import android.graphics.drawable.Drawable
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.util.TypedValue
|
||||
import android.widget.ImageView
|
||||
import androidx.core.view.GravityCompat
|
||||
import androidx.drawerlayout.widget.DrawerLayout
|
||||
|
@ -71,6 +70,7 @@ class K9Drawer(private val parent: MessageList, savedInstanceState: Bundle?) : K
|
|||
private val resources: Resources by inject()
|
||||
private val messagingController: MessagingController by inject()
|
||||
private val accountImageLoader: AccountImageLoader by inject()
|
||||
private val folderIconProvider: FolderIconProvider by inject()
|
||||
|
||||
private val drawer: DrawerLayout = parent.findViewById(R.id.drawerLayout)
|
||||
private val sliderView: MaterialDrawerSliderView = parent.findViewById(R.id.material_drawer_slider)
|
||||
|
@ -79,7 +79,6 @@ class K9Drawer(private val parent: MessageList, savedInstanceState: Bundle?) : K
|
|||
dividerBelowHeader = false
|
||||
displayBadgesOnCurrentProfileImage = false
|
||||
}
|
||||
private val folderIconProvider: FolderIconProvider = FolderIconProvider(parent.theme)
|
||||
private val swipeRefreshLayout: SwipeRefreshLayout
|
||||
|
||||
private val userFolderDrawerIds = ArrayList<Long>()
|
||||
|
@ -288,22 +287,13 @@ class K9Drawer(private val parent: MessageList, savedInstanceState: Bundle?) : K
|
|||
sliderView.addStickyFooterItem(
|
||||
PrimaryDrawerItem().apply {
|
||||
nameRes = R.string.preferences_action
|
||||
iconRes = getResId(R.attr.iconActionSettings)
|
||||
iconRes = R.drawable.ic_cog
|
||||
identifier = DRAWER_ID_PREFERENCES
|
||||
isSelectable = false
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
private fun getResId(resAttribute: Int): Int {
|
||||
val typedValue = TypedValue()
|
||||
val found = parent.theme.resolveAttribute(resAttribute, typedValue, true)
|
||||
if (!found) {
|
||||
throw AssertionError("Couldn't find resource with attribute $resAttribute")
|
||||
}
|
||||
return typedValue.resourceId
|
||||
}
|
||||
|
||||
private fun getFolderDisplayName(folder: Folder): String {
|
||||
return folderNameFormatter.displayName(folder)
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.fsck.k9.ui
|
|||
|
||||
import android.content.res.Resources.Theme
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.util.TypedValue
|
||||
|
||||
fun Theme.resolveColorAttribute(attrId: Int): Int {
|
||||
|
@ -42,17 +41,6 @@ fun Theme.resolveColorAttribute(colorAttrId: Int, alphaFractionAttrId: Int, back
|
|||
return Color.rgb(red.toInt(), green.toInt(), blue.toInt())
|
||||
}
|
||||
|
||||
fun Theme.resolveDrawableAttribute(attrId: Int): Drawable {
|
||||
val typedValue = TypedValue()
|
||||
|
||||
val found = resolveAttribute(attrId, typedValue, true)
|
||||
if (!found) {
|
||||
throw IllegalStateException("Couldn't resolve attribute ($attrId)")
|
||||
}
|
||||
|
||||
return getDrawable(typedValue.resourceId)
|
||||
}
|
||||
|
||||
fun Theme.getIntArray(attrId: Int): IntArray {
|
||||
val typedValue = TypedValue()
|
||||
|
||||
|
|
|
@ -1,39 +1,17 @@
|
|||
package com.fsck.k9.ui.folders
|
||||
|
||||
import android.content.res.Resources
|
||||
import android.util.TypedValue
|
||||
import com.fsck.k9.mailstore.FolderType
|
||||
import com.fsck.k9.ui.R
|
||||
|
||||
class FolderIconProvider(private val theme: Resources.Theme) {
|
||||
private val iconFolderInboxResId: Int
|
||||
private val iconFolderOutboxResId: Int
|
||||
private val iconFolderSentResId: Int
|
||||
private val iconFolderTrashResId: Int
|
||||
private val iconFolderDraftsResId: Int
|
||||
private val iconFolderArchiveResId: Int
|
||||
private val iconFolderSpamResId: Int
|
||||
var iconFolderResId: Int
|
||||
|
||||
init {
|
||||
iconFolderInboxResId = getResId(R.attr.iconFolderInbox)
|
||||
iconFolderOutboxResId = getResId(R.attr.iconFolderOutbox)
|
||||
iconFolderSentResId = getResId(R.attr.iconFolderSent)
|
||||
iconFolderTrashResId = getResId(R.attr.iconFolderTrash)
|
||||
iconFolderDraftsResId = getResId(R.attr.iconFolderDrafts)
|
||||
iconFolderArchiveResId = getResId(R.attr.iconFolderArchive)
|
||||
iconFolderSpamResId = getResId(R.attr.iconFolderSpam)
|
||||
iconFolderResId = getResId(R.attr.iconFolder)
|
||||
}
|
||||
|
||||
private fun getResId(resAttribute: Int): Int {
|
||||
val typedValue = TypedValue()
|
||||
val found = theme.resolveAttribute(resAttribute, typedValue, true)
|
||||
if (!found) {
|
||||
throw AssertionError("Couldn't find resource with attribute $resAttribute")
|
||||
}
|
||||
return typedValue.resourceId
|
||||
}
|
||||
class FolderIconProvider {
|
||||
private val iconFolderInboxResId: Int = R.drawable.ic_inbox
|
||||
private val iconFolderOutboxResId: Int = R.drawable.ic_outbox
|
||||
private val iconFolderSentResId: Int = R.drawable.ic_send
|
||||
private val iconFolderTrashResId: Int = R.drawable.ic_trash_can
|
||||
private val iconFolderDraftsResId: Int = R.drawable.ic_drafts_folder
|
||||
private val iconFolderArchiveResId: Int = R.drawable.ic_archive
|
||||
private val iconFolderSpamResId: Int = R.drawable.ic_alert_octagon
|
||||
var iconFolderResId: Int = R.drawable.ic_folder
|
||||
|
||||
fun getFolderIcon(type: FolderType): Int = when (type) {
|
||||
FolderType.INBOX -> iconFolderInboxResId
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package com.fsck.k9.ui.folders
|
||||
|
||||
import android.content.res.Resources.Theme
|
||||
import org.koin.androidx.viewmodel.dsl.viewModel
|
||||
import org.koin.dsl.module
|
||||
|
||||
val foldersUiModule = module {
|
||||
factory { FolderNameFormatter(resources = get()) }
|
||||
viewModel { FoldersViewModel(folderRepository = get(), messageCountsProvider = get()) }
|
||||
factory { (theme: Theme) -> FolderIconProvider(theme) }
|
||||
factory { FolderIconProvider() }
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ import com.fsck.k9.mail.Address
|
|||
import com.fsck.k9.ui.R
|
||||
import com.fsck.k9.ui.helper.RelativeDateTimeFormatter
|
||||
import com.fsck.k9.ui.resolveColorAttribute
|
||||
import com.fsck.k9.ui.resolveDrawableAttribute
|
||||
import kotlin.math.max
|
||||
|
||||
private const val FOOTER_ID = 1L
|
||||
|
@ -51,9 +50,10 @@ class MessageListAdapter internal constructor(
|
|||
private val relativeDateTimeFormatter: RelativeDateTimeFormatter,
|
||||
) : RecyclerView.Adapter<MessageListViewHolder>() {
|
||||
|
||||
private val forwardedIcon: Drawable = theme.resolveDrawableAttribute(R.attr.messageListForwarded)
|
||||
private val answeredIcon: Drawable = theme.resolveDrawableAttribute(R.attr.messageListAnswered)
|
||||
private val forwardedAnsweredIcon: Drawable = theme.resolveDrawableAttribute(R.attr.messageListAnsweredForwarded)
|
||||
private val forwardedIcon: Drawable = ResourcesCompat.getDrawable(res, R.drawable.ic_messagelist_forwarded, theme)!!
|
||||
private val answeredIcon: Drawable = ResourcesCompat.getDrawable(res, R.drawable.ic_messagelist_answered, theme)!!
|
||||
private val forwardedAnsweredIcon: Drawable = ResourcesCompat
|
||||
.getDrawable(res, R.drawable.ic_messagelist_answered_forwarded, theme)!!
|
||||
private val unreadTextColor: Int = theme.resolveColorAttribute(R.attr.messageListUnreadTextColor)
|
||||
private val readTextColor: Int = theme.resolveColorAttribute(R.attr.messageListReadTextColor)
|
||||
private val previewTextColor: Int = theme.resolveColorAttribute(R.attr.messageListPreviewTextColor)
|
||||
|
@ -317,11 +317,13 @@ class MessageListAdapter internal constructor(
|
|||
textViewMarginTop = compactTextViewMarginTop
|
||||
lineSpacingMultiplier = compactLineSpacingMultiplier
|
||||
}
|
||||
|
||||
UiDensity.Default -> {
|
||||
verticalPadding = defaultVerticalPadding
|
||||
textViewMarginTop = defaultTextViewMarginTop
|
||||
lineSpacingMultiplier = defaultLineSpacingMultiplier
|
||||
}
|
||||
|
||||
UiDensity.Relaxed -> {
|
||||
verticalPadding = relaxedVerticalPadding
|
||||
textViewMarginTop = relaxedTextViewMarginTop
|
||||
|
@ -349,9 +351,11 @@ class MessageListAdapter internal constructor(
|
|||
val messageListItem = getItem(position)
|
||||
bindMessageViewHolder(holder as MessageViewHolder, messageListItem)
|
||||
}
|
||||
|
||||
TYPE_FOOTER -> {
|
||||
bindFooterViewHolder(holder as FooterViewHolder)
|
||||
}
|
||||
|
||||
else -> {
|
||||
error("Unsupported type: $viewType")
|
||||
}
|
||||
|
|
|
@ -2,24 +2,24 @@ package com.fsck.k9.ui.messagelist
|
|||
|
||||
import android.content.res.Resources.Theme
|
||||
import android.graphics.drawable.Drawable
|
||||
import androidx.annotation.AttrRes
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import com.fsck.k9.SwipeAction
|
||||
import com.fsck.k9.ui.R
|
||||
import com.fsck.k9.ui.resolveColorAttribute
|
||||
import com.fsck.k9.ui.resolveDrawableAttribute
|
||||
|
||||
class SwipeResourceProvider(val theme: Theme) {
|
||||
val iconTint = theme.resolveColorAttribute(R.attr.messageListSwipeIconTint)
|
||||
|
||||
private val selectIcon = theme.loadDrawable(R.attr.messageListSwipeSelectIcon)
|
||||
private val markAsReadIcon = theme.loadDrawable(R.attr.messageListSwipeMarkAsReadIcon)
|
||||
private val markAsUnreadIcon = theme.loadDrawable(R.attr.messageListSwipeMarkAsUnreadIcon)
|
||||
private val addStarIcon = theme.loadDrawable(R.attr.messageListSwipeAddStarIcon)
|
||||
private val removeStarIcon = theme.loadDrawable(R.attr.messageListSwipeRemoveStarIcon)
|
||||
private val archiveIcon = theme.loadDrawable(R.attr.messageListSwipeArchiveIcon)
|
||||
private val deleteIcon = theme.loadDrawable(R.attr.messageListSwipeDeleteIcon)
|
||||
private val spamIcon = theme.loadDrawable(R.attr.messageListSwipeSpamIcon)
|
||||
private val moveIcon = theme.loadDrawable(R.attr.messageListSwipeMoveIcon)
|
||||
private val selectIcon = theme.loadDrawable(R.drawable.ic_check_circle)
|
||||
private val markAsReadIcon = theme.loadDrawable(R.drawable.ic_opened_envelope)
|
||||
private val markAsUnreadIcon = theme.loadDrawable(R.drawable.ic_mark_new)
|
||||
private val addStarIcon = theme.loadDrawable(R.drawable.ic_star)
|
||||
private val removeStarIcon = theme.loadDrawable(R.drawable.ic_star_outline)
|
||||
private val archiveIcon = theme.loadDrawable(R.drawable.ic_archive)
|
||||
private val deleteIcon = theme.loadDrawable(R.drawable.ic_trash_can)
|
||||
private val spamIcon = theme.loadDrawable(R.drawable.ic_alert_octagon)
|
||||
private val moveIcon = theme.loadDrawable(R.drawable.ic_move_to_folder)
|
||||
|
||||
private val noActionColor = theme.resolveColorAttribute(R.attr.messageListSwipeDisabledBackgroundColor)
|
||||
private val selectColor = theme.resolveColorAttribute(R.attr.messageListSwipeSelectBackgroundColor)
|
||||
|
@ -81,6 +81,6 @@ class SwipeResourceProvider(val theme: Theme) {
|
|||
}
|
||||
}
|
||||
|
||||
private fun Theme.loadDrawable(@AttrRes attributeId: Int): Drawable {
|
||||
return resolveDrawableAttribute(attributeId).mutate()
|
||||
private fun Theme.loadDrawable(@DrawableRes drawableResId: Int): Drawable {
|
||||
return ResourcesCompat.getDrawable(resources, drawableResId, this)!!
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ import android.view.ViewGroup
|
|||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.Toast
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.withStyledAttributes
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.setFragmentResultListener
|
||||
|
@ -240,16 +240,14 @@ class MessageViewFragment :
|
|||
menu.findItem(R.id.toggle_unread).setTitle(R.string.mark_as_read_action)
|
||||
}
|
||||
|
||||
val drawableAttr = if (isMessageRead) {
|
||||
intArrayOf(R.attr.iconActionMarkAsUnread)
|
||||
val drawableId = if (isMessageRead) {
|
||||
R.drawable.ic_mark_new
|
||||
} else {
|
||||
intArrayOf(R.attr.iconActionMarkAsRead)
|
||||
R.drawable.ic_opened_envelope
|
||||
}
|
||||
|
||||
val toolbarContext = requireActivity().findViewById<View>(R.id.toolbar).context
|
||||
toolbarContext.withStyledAttributes(attrs = drawableAttr) {
|
||||
menu.findItem(R.id.toggle_unread).icon = getDrawable(0)
|
||||
}
|
||||
val drawable = ContextCompat.getDrawable(requireContext(), drawableId)
|
||||
menu.findItem(R.id.toggle_unread).icon = drawable
|
||||
}
|
||||
|
||||
if (isMoveCapable) {
|
||||
|
@ -588,9 +586,11 @@ class MessageViewFragment :
|
|||
MessageDetailsFragment.ACTION_SEARCH_KEYS -> {
|
||||
messageCryptoPresenter.onClickSearchKey()
|
||||
}
|
||||
|
||||
MessageDetailsFragment.ACTION_SHOW_WARNING -> {
|
||||
messageCryptoPresenter.onClickShowCryptoWarningDetails()
|
||||
}
|
||||
|
||||
else -> {
|
||||
error("Unsupported action: $action")
|
||||
}
|
||||
|
@ -691,6 +691,7 @@ class MessageViewFragment :
|
|||
cancelText,
|
||||
)
|
||||
}
|
||||
|
||||
R.id.dialog_confirm_spam -> {
|
||||
val title = getString(R.string.dialog_confirm_spam_title)
|
||||
val message = resources.getQuantityString(R.plurals.dialog_confirm_spam_message, 1)
|
||||
|
@ -704,6 +705,7 @@ class MessageViewFragment :
|
|||
cancelText,
|
||||
)
|
||||
}
|
||||
|
||||
R.id.dialog_attachment_progress -> {
|
||||
val currentAttachmentViewInfo = checkNotNull(this.currentAttachmentViewInfo)
|
||||
|
||||
|
@ -711,6 +713,7 @@ class MessageViewFragment :
|
|||
val size = currentAttachmentViewInfo.size
|
||||
AttachmentDownloadDialogFragment.newInstance(size, message)
|
||||
}
|
||||
|
||||
else -> {
|
||||
throw RuntimeException("Called showDialog(int) with unknown dialog id.")
|
||||
}
|
||||
|
@ -787,9 +790,11 @@ class MessageViewFragment :
|
|||
putExtra(MessageCompose.EXTRA_ACCOUNT, messageReference.accountUuid)
|
||||
}
|
||||
}
|
||||
|
||||
is HttpsUnsubscribeUri -> {
|
||||
Intent(Intent.ACTION_VIEW, unsubscribeUri.uri)
|
||||
}
|
||||
|
||||
else -> error("Unknown UnsubscribeUri - $unsubscribeUri")
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.fsck.k9.ui.settings
|
||||
|
||||
import android.util.TypedValue
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.IdRes
|
||||
import com.fsck.k9.ui.R
|
||||
import com.mikepenz.fastadapter.FastAdapter
|
||||
|
@ -13,7 +13,7 @@ internal class SettingsActionItem(
|
|||
override var identifier: Long,
|
||||
val text: String,
|
||||
@IdRes val navigationAction: Int,
|
||||
val icon: Int,
|
||||
@DrawableRes val icon: Int,
|
||||
) : AbstractItem<SettingsActionItem.ViewHolder>() {
|
||||
override val type = R.id.settings_list_action_item
|
||||
|
||||
|
@ -27,10 +27,7 @@ internal class SettingsActionItem(
|
|||
|
||||
override fun bindView(item: SettingsActionItem, payloads: List<Any>) {
|
||||
text.text = item.text
|
||||
|
||||
val outValue = TypedValue()
|
||||
icon.context.theme.resolveAttribute(item.icon, outValue, true)
|
||||
icon.setImageResource(outValue.resourceId)
|
||||
icon.setImageResource(item.icon)
|
||||
}
|
||||
|
||||
override fun unbindView(item: SettingsActionItem) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import android.view.LayoutInflater
|
|||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Toast
|
||||
import androidx.annotation.AttrRes
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.navigation.fragment.findNavController
|
||||
|
@ -87,7 +87,7 @@ class SettingsListFragment : Fragment(), ItemTouchCallback {
|
|||
addAction(
|
||||
text = getString(R.string.general_settings_title),
|
||||
navigationAction = R.id.action_settingsListScreen_to_generalSettingsScreen,
|
||||
icon = R.attr.iconSettingsGeneral,
|
||||
icon = R.drawable.ic_cog,
|
||||
)
|
||||
|
||||
addSection(title = getString(R.string.accounts_title)) {
|
||||
|
@ -99,7 +99,7 @@ class SettingsListFragment : Fragment(), ItemTouchCallback {
|
|||
addAction(
|
||||
text = getString(R.string.add_account_action),
|
||||
navigationAction = R.id.action_settingsListScreen_to_addAccountScreen,
|
||||
icon = R.attr.iconSettingsAccountAdd,
|
||||
icon = R.drawable.ic_account_plus,
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -107,13 +107,13 @@ class SettingsListFragment : Fragment(), ItemTouchCallback {
|
|||
addAction(
|
||||
text = getString(R.string.settings_export_title),
|
||||
navigationAction = R.id.action_settingsListScreen_to_settingsExportScreen,
|
||||
icon = R.attr.iconSettingsExport,
|
||||
icon = R.drawable.ic_export,
|
||||
)
|
||||
|
||||
addAction(
|
||||
text = getString(SettingsImportR.string.settings_import_title),
|
||||
navigationAction = R.id.action_settingsListScreen_to_settingsImportScreen,
|
||||
icon = R.attr.iconSettingsImport,
|
||||
icon = R.drawable.ic_import,
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -121,19 +121,19 @@ class SettingsListFragment : Fragment(), ItemTouchCallback {
|
|||
addAction(
|
||||
text = getString(R.string.about_action),
|
||||
navigationAction = R.id.action_settingsListScreen_to_aboutScreen,
|
||||
icon = R.attr.iconSettingsAbout,
|
||||
icon = R.drawable.ic_info,
|
||||
)
|
||||
|
||||
addUrlAction(
|
||||
text = getString(R.string.user_manual_title),
|
||||
url = getString(R.string.user_manual_url),
|
||||
icon = R.attr.iconUserManual,
|
||||
icon = R.drawable.ic_open_book,
|
||||
)
|
||||
|
||||
addUrlAction(
|
||||
text = getString(R.string.get_help_title),
|
||||
url = getString(R.string.user_forum_url),
|
||||
icon = R.attr.iconHelp,
|
||||
icon = R.drawable.ic_help,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -176,12 +176,12 @@ class SettingsListFragment : Fragment(), ItemTouchCallback {
|
|||
private val settingsList = mutableListOf<GenericItem>()
|
||||
private var itemId = 0L
|
||||
|
||||
fun addAction(text: String, @IdRes navigationAction: Int, @AttrRes icon: Int) {
|
||||
fun addAction(text: String, @IdRes navigationAction: Int, @DrawableRes icon: Int) {
|
||||
itemId++
|
||||
settingsList.add(SettingsActionItem(itemId, text, navigationAction, icon))
|
||||
}
|
||||
|
||||
fun addUrlAction(text: String, url: String, @AttrRes icon: Int) {
|
||||
fun addUrlAction(text: String, url: String, @DrawableRes icon: Int) {
|
||||
itemId++
|
||||
settingsList.add(UrlActionItem(itemId, text, url, icon))
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.fsck.k9.ui.settings
|
||||
|
||||
import android.util.TypedValue
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.DrawableRes
|
||||
import com.fsck.k9.ui.R
|
||||
import com.mikepenz.fastadapter.FastAdapter
|
||||
import com.mikepenz.fastadapter.items.AbstractItem
|
||||
|
@ -12,7 +12,7 @@ internal class UrlActionItem(
|
|||
override var identifier: Long,
|
||||
val text: String,
|
||||
val url: String,
|
||||
val icon: Int,
|
||||
@DrawableRes val icon: Int,
|
||||
) : AbstractItem<UrlActionItem.ViewHolder>() {
|
||||
override val type = R.id.settings_list_url_item
|
||||
|
||||
|
@ -26,10 +26,7 @@ internal class UrlActionItem(
|
|||
|
||||
override fun bindView(item: UrlActionItem, payloads: List<Any>) {
|
||||
text.text = item.text
|
||||
|
||||
val outValue = TypedValue()
|
||||
icon.context.theme.resolveAttribute(item.icon, outValue, true)
|
||||
icon.setImageResource(outValue.resourceId)
|
||||
icon.setImageResource(item.icon)
|
||||
}
|
||||
|
||||
override fun unbindView(item: UrlActionItem) {
|
||||
|
|
|
@ -1,255 +0,0 @@
|
|||
package com.fsck.k9.view;
|
||||
|
||||
import com.fsck.k9.ui.R;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources.Theme;
|
||||
import android.content.res.TypedArray;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.animation.AlphaAnimation;
|
||||
import android.view.animation.Animation;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
* Class representing a LinearLayout that can fold and hide it's content when
|
||||
* pressed To use just add the following to your xml layout
|
||||
* <pre>{@code
|
||||
*<com.fsck.k9.view.FoldableLinearLayout
|
||||
* android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
* custom:foldedLabel="@string/TEXT_TO_DISPLAY_WHEN_FOLDED"
|
||||
* custom:unFoldedLabel="@string/TEXT_TO_DISPLAY_WHEN_UNFOLDED">
|
||||
* <include layout="@layout/ELEMENTS_TO_BE_FOLDED"/>
|
||||
*</com.fsck.k9.view.FoldableLinearLayout>}
|
||||
* </pre>
|
||||
*/
|
||||
public class FoldableLinearLayout extends LinearLayout {
|
||||
|
||||
private ImageView mFoldableIcon;
|
||||
|
||||
// Start with the view folded
|
||||
private boolean mIsFolded = true;
|
||||
private boolean mHasMigrated = false;
|
||||
private Integer mShortAnimationDuration = null;
|
||||
private TextView mFoldableTextView = null;
|
||||
private LinearLayout mFoldableContainer = null;
|
||||
private View mFoldableLayout = null;
|
||||
private String mFoldedLabel;
|
||||
private String mUnFoldedLabel;
|
||||
private int mIconActionCollapseId;
|
||||
private int mIconActionExpandId;
|
||||
|
||||
public FoldableLinearLayout(Context context) {
|
||||
super(context);
|
||||
processAttributes(context, null);
|
||||
}
|
||||
|
||||
public FoldableLinearLayout(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
processAttributes(context, attrs);
|
||||
}
|
||||
|
||||
public FoldableLinearLayout(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs);
|
||||
processAttributes(context, attrs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load given attributes to inner variables,
|
||||
*
|
||||
* @param context
|
||||
* @param attrs
|
||||
*/
|
||||
private void processAttributes(Context context, AttributeSet attrs) {
|
||||
Theme theme = context.getTheme();
|
||||
TypedValue outValue = new TypedValue();
|
||||
boolean found = theme.resolveAttribute(R.attr.iconActionCollapse, outValue, true);
|
||||
if (found) {
|
||||
mIconActionCollapseId = outValue.resourceId;
|
||||
}
|
||||
found = theme.resolveAttribute(R.attr.iconActionExpand, outValue, true);
|
||||
if (found) {
|
||||
mIconActionExpandId = outValue.resourceId;
|
||||
}
|
||||
if (attrs != null) {
|
||||
TypedArray a = context.obtainStyledAttributes(attrs,
|
||||
R.styleable.FoldableLinearLayout, 0, 0);
|
||||
mFoldedLabel = a.getString(R.styleable.FoldableLinearLayout_foldedLabel);
|
||||
mUnFoldedLabel = a.getString(R.styleable.FoldableLinearLayout_unFoldedLabel);
|
||||
a.recycle();
|
||||
}
|
||||
// If any attribute isn't found then set a default one
|
||||
mFoldedLabel = (mFoldedLabel == null) ? "No text!" : mFoldedLabel;
|
||||
mUnFoldedLabel = (mUnFoldedLabel == null) ? "No text!" : mUnFoldedLabel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFinishInflate() {
|
||||
// if the migration has already happened
|
||||
// there is no need to move any children
|
||||
if (!mHasMigrated) {
|
||||
migrateChildrenToContainer();
|
||||
mHasMigrated = true;
|
||||
}
|
||||
initialiseInnerViews();
|
||||
super.onFinishInflate();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Parcelable onSaveInstanceState() {
|
||||
Parcelable superState = super.onSaveInstanceState();
|
||||
SavedState savedState = new SavedState(superState);
|
||||
savedState.mFolded = mIsFolded;
|
||||
return savedState;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRestoreInstanceState(Parcelable state) {
|
||||
if (state instanceof SavedState) {
|
||||
SavedState savedState = (SavedState) state;
|
||||
super.onRestoreInstanceState(savedState.getSuperState());
|
||||
mIsFolded = savedState.mFolded;
|
||||
updateFoldedState(mIsFolded, false);
|
||||
} else {
|
||||
super.onRestoreInstanceState(state);
|
||||
}
|
||||
}
|
||||
|
||||
public static class SavedState extends BaseSavedState {
|
||||
|
||||
public static final Parcelable.Creator<SavedState> CREATOR =
|
||||
new Parcelable.Creator<FoldableLinearLayout.SavedState>() {
|
||||
|
||||
@Override
|
||||
public SavedState createFromParcel(Parcel source) {
|
||||
return new SavedState(source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SavedState[] newArray(int size) {
|
||||
return new SavedState[size];
|
||||
}
|
||||
};
|
||||
|
||||
private boolean mFolded;
|
||||
|
||||
private SavedState(Parcel parcel) {
|
||||
super(parcel);
|
||||
mFolded = (parcel.readInt() == 1);
|
||||
}
|
||||
|
||||
private SavedState(Parcelable superState) {
|
||||
super(superState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
dest.writeInt(mFolded ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrates Child views as declared in xml to the inner foldableContainer
|
||||
*/
|
||||
private void migrateChildrenToContainer() {
|
||||
// Collect children of FoldableLinearLayout as declared in XML
|
||||
int childNum = getChildCount();
|
||||
View[] children = new View[childNum];
|
||||
for (int i = 0; i < childNum; i++) {
|
||||
children[i] = getChildAt(i);
|
||||
}
|
||||
if (children[0].getId() == R.id.foldableControl) {
|
||||
}
|
||||
// remove all of them from FoldableLinearLayout
|
||||
detachAllViewsFromParent();
|
||||
// Inflate the inner foldable_linearlayout.xml
|
||||
LayoutInflater inflator = (LayoutInflater) getContext().getSystemService(
|
||||
Context.LAYOUT_INFLATER_SERVICE);
|
||||
mFoldableLayout = inflator.inflate(R.layout.foldable_linearlayout, this, true);
|
||||
mFoldableContainer = mFoldableLayout.findViewById(R.id.foldableContainer);
|
||||
// Push previously collected children into foldableContainer.
|
||||
for (int i = 0; i < childNum; i++) {
|
||||
addView(children[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private void initialiseInnerViews() {
|
||||
mFoldableIcon = mFoldableLayout.findViewById(R.id.foldableIcon);
|
||||
mFoldableTextView = mFoldableLayout.findViewById(R.id.foldableText);
|
||||
mFoldableTextView.setText(mFoldedLabel);
|
||||
// retrieve and cache the system's short animation time
|
||||
mShortAnimationDuration = getResources().getInteger(android.R.integer.config_shortAnimTime);
|
||||
LinearLayout foldableControl = mFoldableLayout
|
||||
.findViewById(R.id.foldableControl);
|
||||
foldableControl.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
mIsFolded = !mIsFolded;
|
||||
updateFoldedState(mIsFolded, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void updateFoldedState(boolean newStateIsFolded, boolean animate) {
|
||||
if (newStateIsFolded) {
|
||||
mFoldableIcon.setImageResource(mIconActionExpandId);
|
||||
if (animate) {
|
||||
AlphaAnimation animation = new AlphaAnimation(1f, 0f);
|
||||
animation.setDuration(mShortAnimationDuration);
|
||||
animation.setAnimationListener(new Animation.AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
/*
|
||||
* Make sure that at the end the container is
|
||||
* completely invisible. GONE is not used in
|
||||
* order to prevent parent views from jumping
|
||||
* around as they re-center themselves
|
||||
* vertically.
|
||||
*/
|
||||
mFoldableContainer.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation animation) {
|
||||
}
|
||||
});
|
||||
mFoldableContainer.startAnimation(animation);
|
||||
} else {
|
||||
mFoldableContainer.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
mFoldableTextView.setText(mFoldedLabel);
|
||||
} else {
|
||||
mFoldableIcon.setImageResource(mIconActionCollapseId);
|
||||
mFoldableContainer.setVisibility(View.VISIBLE);
|
||||
if (animate) {
|
||||
AlphaAnimation animation = new AlphaAnimation(0f, 1f);
|
||||
animation.setDuration(mShortAnimationDuration);
|
||||
mFoldableContainer.startAnimation(animation);
|
||||
}
|
||||
mFoldableTextView.setText(mUnFoldedLabel);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds provided child view to foldableContainer View
|
||||
*
|
||||
* @param child
|
||||
*/
|
||||
@Override
|
||||
public void addView(View child) {
|
||||
if (mFoldableContainer != null) {
|
||||
mFoldableContainer.addView(child);
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 979 B |
Binary file not shown.
Before Width: | Height: | Size: 705 B |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
|
@ -21,7 +21,7 @@
|
|||
android:layout_height="40dp"
|
||||
android:contentDescription="@string/account_settings_action"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="?attr/iconSettingsAccount" />
|
||||
app:srcCompat="@drawable/ic_account" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
<?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_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context="com.fsck.k9.view.FoldableLinearLayout">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/foldableControl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:orientation="horizontal"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/foldableIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="10dp"
|
||||
app:srcCompat="?attr/iconActionExpand" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/foldableText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text=""
|
||||
android:textColor="?android:attr/textColorTertiary" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/foldableContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</LinearLayout>
|
|
@ -1,6 +1,5 @@
|
|||
<?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:id="@+id/folder_list_item_layout"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -18,7 +17,7 @@
|
|||
android:layout_height="24dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
tools:srcCompat="@sample/folders.json/data/icon" />
|
||||
tools:srcCompat="@drawable/ic_inbox"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/folder_name"
|
||||
|
@ -30,6 +29,6 @@
|
|||
android:paddingBottom="12dp"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
tools:text="@sample/folders.json/data/name" />
|
||||
tools:text="Inbox" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@null"
|
||||
app:srcCompat="?attr/iconAboutVersion" />
|
||||
app:srcCompat="@drawable/ic_info" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -88,7 +88,7 @@
|
|||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@null"
|
||||
app:srcCompat="?attr/iconAboutAuthors" />
|
||||
app:srcCompat="@drawable/ic_people" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -128,7 +128,7 @@
|
|||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@null"
|
||||
app:srcCompat="?attr/iconAboutSourceCode" />
|
||||
app:srcCompat="@drawable/ic_code" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -168,7 +168,7 @@
|
|||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@null"
|
||||
app:srcCompat="?attr/iconAboutLicense" />
|
||||
app:srcCompat="@drawable/ic_description" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -218,7 +218,7 @@
|
|||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@null"
|
||||
app:srcCompat="?attr/iconAboutWebsite" />
|
||||
app:srcCompat="@drawable/ic_link" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -258,7 +258,7 @@
|
|||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@null"
|
||||
app:srcCompat="?attr/iconUserForum" />
|
||||
app:srcCompat="@drawable/ic_forum" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -298,7 +298,7 @@
|
|||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@null"
|
||||
app:srcCompat="?attr/iconAboutFediverse" />
|
||||
app:srcCompat="@drawable/ic_mastodon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
android:layout_marginBottom="8dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/remove_attachment_action"
|
||||
app:srcCompat="?attr/iconActionCancel"
|
||||
app:srcCompat="@drawable/ic_clear"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/progressBar"
|
||||
|
|
|
@ -181,7 +181,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:padding="6dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:srcCompat="?attr/iconActionExpand" />
|
||||
app:srcCompat="@drawable/ic_chevron_down" />
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -299,7 +299,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:padding="6dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:srcCompat="?attr/iconActionExpand"
|
||||
app:srcCompat="@drawable/ic_chevron_down"
|
||||
android:id="@+id/recipient_expander"
|
||||
/>
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
android:paddingHorizontal="12dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/menu_overflow"
|
||||
app:layout_constraintTop_toTopOf="@+id/menu_overflow"
|
||||
app:srcCompat="?attr/messageDetailsAddContactIcon" />
|
||||
app:srcCompat="@drawable/ic_person_add" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/menu_overflow"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
android:layout_margin="@dimen/floatingActionButtonMargin"
|
||||
android:contentDescription="@string/compose_action"
|
||||
app:layout_behavior="com.fsck.k9.ui.fab.HideFabOnScrollBehavior"
|
||||
app:srcCompat="?attr/iconActionCompose"
|
||||
app:srcCompat="@drawable/ic_pencil"
|
||||
/>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toEndOf="@+id/account_color_chip"
|
||||
app:layout_constraintTop_toTopOf="@+id/top_guideline"
|
||||
app:srcCompat="?attr/messageListAnswered" />
|
||||
app:srcCompat="@drawable/ic_messagelist_answered" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subject"
|
||||
|
@ -119,7 +119,7 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/date"
|
||||
app:layout_constraintTop_toTopOf="@+id/top_guideline"
|
||||
app:srcCompat="?attr/messageListAttachment" />
|
||||
app:srcCompat="@drawable/ic_messagelist_attachment" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
android:layout_marginBottom="8dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/remove_attachment_action"
|
||||
app:srcCompat="?attr/iconActionSaveAttachment"
|
||||
app:srcCompat="@drawable/ic_download"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/attachment_preview" />
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
android:layout_marginBottom="8dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/locked_attach_unlock"
|
||||
app:srcCompat="?attr/unencryptedAttachmentUnlock"
|
||||
app:srcCompat="@drawable/ic_visibility"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/locked_name"
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
app:srcCompat="?attr/iconActionNextStatus"
|
||||
app:srcCompat="@drawable/ic_chevron_right"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
android:padding="8dp"
|
||||
android:id="@+id/alternate_remove"
|
||||
android:background="?android:selectableItemBackground"
|
||||
app:srcCompat="?attr/iconActionCancel"
|
||||
app:srcCompat="@drawable/ic_clear"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
android:layout_height="40dp"
|
||||
android:contentDescription="@string/account_settings_action"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="?attr/iconActionSettings" />
|
||||
app:srcCompat="@drawable/ic_cog" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<item
|
||||
android:id="@+id/filter_folders"
|
||||
android:icon="?attr/iconActionSearchFolder"
|
||||
android:icon="@drawable/ic_folder_magnify"
|
||||
android:title="@string/filter_folders_action"
|
||||
app:actionViewClass="androidx.appcompat.widget.SearchView"
|
||||
app:showAsAction="collapseActionView|ifRoom" />
|
||||
|
@ -22,7 +22,7 @@
|
|||
android:title="@string/folder_list_display_mode_not_second_class" />
|
||||
<item
|
||||
android:id="@+id/list_folders"
|
||||
android:icon="?attr/iconActionRefresh"
|
||||
android:icon="@drawable/ic_refresh"
|
||||
android:title="@string/refresh_folders_action" />
|
||||
|
||||
</menu>
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/filter_folders"
|
||||
android:icon="?attr/iconActionSearchFolder"
|
||||
android:icon="@drawable/ic_folder_magnify"
|
||||
android:title="@string/filter_folders_action"
|
||||
app:showAsAction="collapseActionView|ifRoom"
|
||||
app:actionViewClass="androidx.appcompat.widget.SearchView"/>
|
||||
<item
|
||||
android:icon="?attr/iconFolder"
|
||||
android:icon="@drawable/ic_inbox"
|
||||
android:title="@string/folder_list_display_mode_label">
|
||||
<menu>
|
||||
<item
|
||||
|
@ -27,6 +27,6 @@
|
|||
</item>
|
||||
<item
|
||||
android:id="@+id/list_folders"
|
||||
android:icon="?attr/iconActionRefresh"
|
||||
android:icon="@drawable/ic_refresh"
|
||||
android:title="@string/refresh_folders_action"/>
|
||||
</menu>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<item
|
||||
android:id="@+id/search"
|
||||
android:title="@string/search_action"
|
||||
android:icon="?attr/iconActionSearch"
|
||||
android:icon="@drawable/ic_magnify"
|
||||
app:showAsAction="collapseActionView|ifRoom"
|
||||
app:actionViewClass="com.bytehamster.lib.preferencesearch.SearchPreferenceActionView" />
|
||||
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<item
|
||||
android:id="@+id/new_identity"
|
||||
android:title="@string/new_identity_action"
|
||||
android:icon="?attr/iconActionAdd"
|
||||
android:icon="@drawable/ic_plus"
|
||||
/>
|
||||
</menu>
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
<item
|
||||
android:id="@+id/add_attachment"
|
||||
android:title="@string/add_attachment_action"
|
||||
android:icon="?attr/iconActionAddAttachment"
|
||||
android:icon="@drawable/ic_attachment"
|
||||
app:showAsAction="always"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/send"
|
||||
android:title="@string/send_action"
|
||||
android:icon="?attr/iconActionSend"
|
||||
android:icon="@drawable/ic_send"
|
||||
app:showAsAction="always"
|
||||
/>
|
||||
<item
|
||||
|
@ -20,17 +20,17 @@
|
|||
<item
|
||||
android:id="@+id/save"
|
||||
android:title="@string/save_draft_action"
|
||||
android:icon="?attr/iconActionSave"
|
||||
android:icon="@drawable/ic_floppy"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/discard"
|
||||
android:title="@string/discard_action"
|
||||
android:icon="?attr/iconActionCancel"
|
||||
android:icon="@drawable/ic_clear"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/read_receipt"
|
||||
android:title="@string/read_receipt"
|
||||
android:icon="?attr/iconActionRequestReadReceipt"
|
||||
android:icon="@drawable/ic_action_request_read_receipt_light"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/openpgp_encrypt_enable"
|
||||
|
|
|
@ -5,31 +5,31 @@
|
|||
android:id="@+id/delete"
|
||||
android:title="@string/delete_action"
|
||||
app:showAsAction="always"
|
||||
android:icon="?attr/iconActionDelete"
|
||||
android:icon="@drawable/ic_trash_can"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/mark_as_read"
|
||||
android:title="@string/mark_as_read_action"
|
||||
app:showAsAction="always"
|
||||
android:icon="?attr/iconActionMarkAsRead"
|
||||
android:icon="@drawable/ic_opened_envelope"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/mark_as_unread"
|
||||
android:title="@string/mark_as_unread_action"
|
||||
app:showAsAction="always"
|
||||
android:icon="?attr/iconActionMarkAsUnread"
|
||||
android:icon="@drawable/ic_mark_new"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/archive"
|
||||
android:title="@string/archive_action"
|
||||
app:showAsAction="always"
|
||||
android:icon="?attr/iconActionArchive"
|
||||
android:icon="@drawable/ic_archive"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/move"
|
||||
android:title="@string/move_action"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="?attr/iconActionMove"
|
||||
android:icon="@drawable/ic_move_to_folder"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/move_to_drafts"
|
||||
|
@ -40,29 +40,29 @@
|
|||
<item
|
||||
android:id="@+id/copy"
|
||||
android:title="@string/copy_action"
|
||||
android:icon="?attr/iconActionCopy"
|
||||
android:icon="@drawable/ic_content_copy"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/flag"
|
||||
android:title="@string/flag_action"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="?attr/iconActionFlag"
|
||||
android:icon="@drawable/ic_star"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/unflag"
|
||||
android:title="@string/unflag_action"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="?attr/iconActionUnflag"
|
||||
android:icon="@drawable/ic_star_outline"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/spam"
|
||||
android:title="@string/spam_action"
|
||||
app:showAsAction="ifRoom"
|
||||
android:icon="?attr/iconActionSpam"
|
||||
android:icon="@drawable/ic_alert_octagon"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/select_all"
|
||||
android:icon="?attr/iconActionSelectAll"
|
||||
android:icon="@drawable/ic_select_all"
|
||||
app:showAsAction="never"
|
||||
android:title="@string/batch_select_all"
|
||||
/>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<!-- MessageList -->
|
||||
<item
|
||||
android:id="@+id/search"
|
||||
android:icon="?attr/iconActionSearch"
|
||||
android:icon="@drawable/ic_magnify"
|
||||
android:title="@string/search_action"
|
||||
app:actionViewClass="androidx.appcompat.widget.SearchView"
|
||||
app:showAsAction="always" />
|
||||
|
@ -19,7 +19,7 @@
|
|||
<!-- MessageList -->
|
||||
<item
|
||||
android:id="@+id/search_remote"
|
||||
android:icon="?attr/iconActionRemoteSearch"
|
||||
android:icon="@drawable/ic_magnify_cloud"
|
||||
android:title="@string/action_remote_search"
|
||||
android:visible="false"
|
||||
app:showAsAction="always" />
|
||||
|
@ -27,7 +27,7 @@
|
|||
<!-- MessageView -->
|
||||
<item
|
||||
android:id="@+id/archive"
|
||||
android:icon="?attr/iconActionArchive"
|
||||
android:icon="@drawable/ic_archive"
|
||||
android:title="@string/archive_action"
|
||||
android:visible="false"
|
||||
app:showAsAction="always" />
|
||||
|
@ -35,7 +35,7 @@
|
|||
<!-- MessageView -->
|
||||
<item
|
||||
android:id="@+id/delete"
|
||||
android:icon="?attr/iconActionDelete"
|
||||
android:icon="@drawable/ic_trash_can"
|
||||
android:title="@string/delete_action"
|
||||
android:visible="false"
|
||||
app:showAsAction="always" />
|
||||
|
@ -43,7 +43,7 @@
|
|||
<!-- MessageView -->
|
||||
<item
|
||||
android:id="@+id/toggle_unread"
|
||||
android:icon="?attr/iconActionMarkAsUnread"
|
||||
android:icon="@drawable/ic_mark_new"
|
||||
android:title="@string/mark_as_unread_action"
|
||||
android:visible="false"
|
||||
app:showAsAction="always" />
|
||||
|
@ -51,7 +51,7 @@
|
|||
<!-- MessageView -->
|
||||
<item
|
||||
android:id="@+id/spam"
|
||||
android:icon="?attr/iconActionSpam"
|
||||
android:icon="@drawable/ic_alert_octagon"
|
||||
android:title="@string/spam_action"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
@ -59,7 +59,7 @@
|
|||
<!-- MessageView -->
|
||||
<item
|
||||
android:id="@+id/move"
|
||||
android:icon="?attr/iconActionMove"
|
||||
android:icon="@drawable/ic_move_to_folder"
|
||||
android:title="@string/move_action"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
@ -67,7 +67,7 @@
|
|||
<!-- MessageView -->
|
||||
<item
|
||||
android:id="@+id/copy"
|
||||
android:icon="?attr/iconActionCopy"
|
||||
android:icon="@drawable/ic_content_copy"
|
||||
android:title="@string/copy_action"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
@ -121,14 +121,14 @@
|
|||
<!-- always -->
|
||||
<item
|
||||
android:id="@+id/compose"
|
||||
android:icon="?attr/iconActionCompose"
|
||||
android:icon="@drawable/ic_pencil"
|
||||
android:title="@string/compose_action"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<!-- MessageList -->
|
||||
<item
|
||||
android:id="@+id/set_sort"
|
||||
android:icon="?attr/iconActionSort"
|
||||
android:icon="@drawable/ic_sort"
|
||||
android:title="@string/sort_by"
|
||||
app:showAsAction="ifRoom">
|
||||
<menu>
|
||||
|
@ -159,7 +159,7 @@
|
|||
<!-- MessageList -->
|
||||
<item
|
||||
android:id="@+id/select_all"
|
||||
android:icon="?attr/iconActionSelectAll"
|
||||
android:icon="@drawable/ic_select_all"
|
||||
android:title="@string/batch_select_all"
|
||||
app:showAsAction="never" />
|
||||
|
||||
|
@ -172,7 +172,7 @@
|
|||
<!-- MessageList -->
|
||||
<item
|
||||
android:id="@+id/send_messages"
|
||||
android:icon="?attr/iconActionUpload"
|
||||
android:icon="@drawable/ic_file_upload"
|
||||
android:title="@string/send_messages_action"
|
||||
app:showAsAction="never" />
|
||||
|
||||
|
|
|
@ -2,62 +2,6 @@
|
|||
<resources>
|
||||
|
||||
<declare-styleable name="K9Styles">
|
||||
<attr name="iconUnifiedInbox" format="reference" />
|
||||
<attr name="iconFolder" format="reference" />
|
||||
<attr name="iconFolderInbox" format="reference" />
|
||||
<attr name="iconFolderOutbox" format="reference" />
|
||||
<attr name="iconFolderArchive" format="reference" />
|
||||
<attr name="iconFolderDrafts" format="reference" />
|
||||
<attr name="iconFolderSent" format="reference" />
|
||||
<attr name="iconFolderSpam" format="reference" />
|
||||
<attr name="iconFolderTrash" format="reference" />
|
||||
<attr name="iconActionAddAttachment" format="reference" />
|
||||
<attr name="iconActionArchive" format="reference" />
|
||||
<attr name="iconActionCompose" format="reference" />
|
||||
<attr name="iconActionDelete" format="reference" />
|
||||
<attr name="iconActionMove" format="reference" />
|
||||
<attr name="iconActionCopy" format="reference" />
|
||||
<attr name="iconActionNextStatus" format="reference" />
|
||||
<attr name="iconActionRefresh" format="reference" />
|
||||
<attr name="iconActionSearch" format="reference" />
|
||||
<attr name="iconActionSearchFolder" format="reference" />
|
||||
<attr name="iconActionSend" format="reference" />
|
||||
<attr name="iconActionSettings" format="reference" />
|
||||
<attr name="iconActionSort" format="reference" />
|
||||
<attr name="iconActionSpam" format="reference" />
|
||||
<attr name="iconActionFlag" format="reference" />
|
||||
<attr name="iconActionUnflag" format="reference" />
|
||||
<attr name="iconActionMarkAsRead" format="reference" />
|
||||
<attr name="iconActionMarkAsUnread" format="reference" />
|
||||
<attr name="iconActionRemoteSearch" format="reference" />
|
||||
<attr name="iconActionAdd" format="reference" />
|
||||
<attr name="iconActionImportExport" format="reference" />
|
||||
<attr name="iconActionUpload" format="reference" />
|
||||
<attr name="iconActionSelectAll" format="reference" />
|
||||
<attr name="iconActionSave" format="reference" />
|
||||
<attr name="iconActionSaveAttachment" format="reference" />
|
||||
<attr name="iconActionCancel" format="reference" />
|
||||
<attr name="iconActionRequestReadReceipt" format="reference" />
|
||||
<attr name="iconActionExpand" format="reference" />
|
||||
<attr name="iconActionCollapse" format="reference" />
|
||||
<attr name="iconPreferencesDisplay" format="reference" />
|
||||
<attr name="iconPreferencesInteraction" format="reference" />
|
||||
<attr name="iconPreferencesNotifications" format="reference" />
|
||||
<attr name="iconPreferencesNetwork" format="reference" />
|
||||
<attr name="iconPreferencesPrivacy" format="reference" />
|
||||
<attr name="iconPreferencesDebug" format="reference" />
|
||||
<attr name="iconPreferencesFolders" format="reference" />
|
||||
<attr name="iconPreferencesCrypto" format="reference" />
|
||||
<attr name="iconPreferencesFetchMail" format="reference" />
|
||||
<attr name="iconPreferencesSearch" format="reference" />
|
||||
<attr name="iconPreferencesReadMail" format="reference" />
|
||||
<attr name="iconPreferencesCompose" format="reference" />
|
||||
<attr name="iconSettingsAbout" format="reference" />
|
||||
<attr name="iconSettingsGeneral" format="reference" />
|
||||
<attr name="iconSettingsAccount" format="reference" />
|
||||
<attr name="iconSettingsAccountAdd" format="reference" />
|
||||
<attr name="iconSettingsExport" format="reference" />
|
||||
<attr name="iconSettingsImport" format="reference" />
|
||||
<attr name="textColorPrimaryRecipientDropdown" format="reference" />
|
||||
<attr name="textColorSecondaryRecipientDropdown" format="reference" />
|
||||
<attr name="backgroundColorChooseAccountHeader" format="color" />
|
||||
|
@ -77,30 +21,16 @@
|
|||
<attr name="messageListPreviewTextColor" format="reference|color"/>
|
||||
<attr name="messageListDividerColor" format="reference|color"/>
|
||||
<attr name="messageListStateIconTint" format="reference|color"/>
|
||||
<attr name="messageListAttachment" format="reference"/>
|
||||
<attr name="messageListAnswered" format="reference"/>
|
||||
<attr name="messageListForwarded" format="reference"/>
|
||||
<attr name="messageListAnsweredForwarded" format="reference"/>
|
||||
<attr name="messageListSwipeIconTint" format="reference|color"/>
|
||||
<attr name="messageListSwipeDisabledBackgroundColor" format="reference|color"/>
|
||||
<attr name="messageListSwipeSelectIcon" format="reference"/>
|
||||
<attr name="messageListSwipeSelectBackgroundColor" format="reference|color"/>
|
||||
<attr name="messageListSwipeMarkAsReadIcon" format="reference"/>
|
||||
<attr name="messageListSwipeMarkAsUnreadIcon" format="reference"/>
|
||||
<attr name="messageListSwipeToggleReadBackgroundColor" format="reference|color"/>
|
||||
<attr name="messageListSwipeAddStarIcon" format="reference"/>
|
||||
<attr name="messageListSwipeRemoveStarIcon" format="reference"/>
|
||||
<attr name="messageListSwipeToggleStarBackgroundColor" format="reference|color"/>
|
||||
<attr name="messageListSwipeArchiveIcon" format="reference"/>
|
||||
<attr name="messageListSwipeArchiveBackgroundColor" format="reference|color"/>
|
||||
<attr name="messageListSwipeDeleteIcon" format="reference"/>
|
||||
<attr name="messageListSwipeDeleteBackgroundColor" format="reference|color"/>
|
||||
<attr name="messageListSwipeSpamIcon" format="reference"/>
|
||||
<attr name="messageListSwipeSpamBackgroundColor" format="reference|color"/>
|
||||
<attr name="messageListSwipeMoveIcon" format="reference"/>
|
||||
<attr name="messageListSwipeMoveBackgroundColor" format="reference|color"/>
|
||||
<attr name="messageStarColor" format="color"/>
|
||||
<attr name="messageDetailsAddContactIcon" format="reference"/>
|
||||
<attr name="messageDetailsDividerColor" format="reference|color"/>
|
||||
<attr name="composerBackgroundColor" format="color"/>
|
||||
<attr name="contactPictureFallbackDefaultBackgroundColor" format="reference|color"/>
|
||||
|
@ -110,17 +40,6 @@
|
|||
<attr name="tintColorBulletPointNeutral" format="reference|color"/>
|
||||
<attr name="tintColorBulletPointNegative" format="reference|color"/>
|
||||
|
||||
<attr name="iconAboutVersion" format="reference"/>
|
||||
<attr name="iconAboutAuthors" format="reference"/>
|
||||
<attr name="iconAboutSourceCode" format="reference"/>
|
||||
<attr name="iconAboutLicense" format="reference"/>
|
||||
<attr name="iconAboutWebsite" format="reference"/>
|
||||
<attr name="iconAboutFediverse" format="reference"/>
|
||||
<attr name="iconUserForum" format="reference"/>
|
||||
<attr name="iconUserManual" format="reference"/>
|
||||
<attr name="iconHelp" format="reference"/>
|
||||
|
||||
<attr name="unencryptedAttachmentUnlock" format="reference|color" />
|
||||
<attr name="openpgp_black" format="reference|color" />
|
||||
<attr name="openpgp_orange" format="reference|color" />
|
||||
<attr name="openpgp_red" format="reference|color" />
|
||||
|
@ -130,11 +49,6 @@
|
|||
<attr name="openpgp_dark_grey" format="reference|color" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="FoldableLinearLayout">
|
||||
<attr name="foldedLabel" format="string" />
|
||||
<attr name="unFoldedLabel" format="string" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="LinearViewAnimator">
|
||||
<attr name="downInAnimation" format="reference" />
|
||||
<attr name="downOutAnimation" format="reference" />
|
||||
|
|
|
@ -66,62 +66,7 @@
|
|||
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
|
||||
|
||||
<item name="iconUnifiedInbox">@drawable/ic_inbox_multiple</item>
|
||||
<item name="iconFolder">@drawable/ic_folder</item>
|
||||
<item name="iconFolderInbox">@drawable/ic_inbox</item>
|
||||
<item name="iconFolderOutbox">@drawable/ic_outbox</item>
|
||||
<item name="iconFolderArchive">@drawable/ic_archive</item>
|
||||
<item name="iconFolderDrafts">@drawable/ic_drafts_folder</item>
|
||||
<item name="iconFolderSent">@drawable/ic_send</item>
|
||||
<item name="iconFolderSpam">@drawable/ic_alert_octagon</item>
|
||||
<item name="iconFolderTrash">@drawable/ic_trash_can</item>
|
||||
<item name="iconActionAddAttachment">@drawable/ic_attachment</item>
|
||||
<item name="iconActionArchive">@drawable/ic_archive</item>
|
||||
<item name="iconActionCompose">@drawable/ic_pencil</item>
|
||||
<item name="iconActionDelete">@drawable/ic_trash_can</item>
|
||||
<item name="iconActionMove">@drawable/ic_move_to_folder</item>
|
||||
<item name="iconActionCopy">@drawable/ic_content_copy</item>
|
||||
<item name="iconActionNextStatus">@drawable/ic_chevron_right</item>
|
||||
<item name="iconActionRefresh">@drawable/ic_refresh</item>
|
||||
<item name="iconActionSearch">@drawable/ic_magnify</item>
|
||||
<item name="iconActionSearchFolder">@drawable/ic_folder_magnify</item>
|
||||
<item name="iconActionSend">@drawable/ic_send</item>
|
||||
<item name="iconActionSettings">@drawable/ic_cog</item>
|
||||
<item name="iconActionSort">@drawable/ic_sort</item>
|
||||
<item name="iconActionSpam">@drawable/ic_alert_octagon</item>
|
||||
<item name="iconActionFlag">@drawable/ic_star</item>
|
||||
<item name="iconActionUnflag">@drawable/ic_star_outline</item>
|
||||
<item name="iconActionMarkAsRead">@drawable/ic_opened_envelope</item>
|
||||
<item name="iconActionMarkAsUnread">@drawable/ic_mark_new</item>
|
||||
<item name="iconActionRemoteSearch">@drawable/ic_magnify_cloud</item>
|
||||
<item name="iconActionAdd">@drawable/ic_plus</item>
|
||||
<item name="iconActionImportExport">@drawable/ic_arrow_up_down</item>
|
||||
<item name="iconActionUpload">@drawable/ic_file_upload</item>
|
||||
<item name="iconActionSelectAll">@drawable/ic_select_all</item>
|
||||
<item name="iconActionSave">@drawable/ic_floppy</item>
|
||||
<item name="iconActionSaveAttachment">@drawable/ic_download</item>
|
||||
<item name="iconActionCancel">@drawable/ic_clear</item>
|
||||
<item name="iconActionRequestReadReceipt">@drawable/ic_action_request_read_receipt_light</item>
|
||||
<item name="iconActionExpand">@drawable/ic_chevron_down</item>
|
||||
<item name="iconActionCollapse">@drawable/ic_chevron_up</item>
|
||||
<item name="iconPreferencesDisplay">@drawable/ic_tv</item>
|
||||
<item name="iconPreferencesInteraction">@drawable/ic_touch</item>
|
||||
<item name="iconPreferencesNotifications">@drawable/ic_notifications</item>
|
||||
<item name="iconPreferencesNetwork">@drawable/ic_arrow_up_down</item>
|
||||
<item name="iconPreferencesPrivacy">@drawable/ic_shield</item>
|
||||
<item name="iconPreferencesDebug">@drawable/ic_bug</item>
|
||||
<item name="iconPreferencesFolders">@drawable/ic_folder</item>
|
||||
<item name="iconPreferencesSearch">@drawable/ic_magnify</item>
|
||||
<item name="iconPreferencesCrypto">@drawable/ic_preferences_crypto</item>
|
||||
<item name="iconPreferencesFetchMail">@drawable/ic_preferences_check_mail</item>
|
||||
<item name="iconPreferencesReadMail">@drawable/ic_opened_envelope</item>
|
||||
<item name="iconPreferencesCompose">@drawable/ic_pencil</item>
|
||||
<item name="iconSettingsAbout">@drawable/ic_info</item>
|
||||
<item name="iconSettingsGeneral">@drawable/ic_cog</item>
|
||||
<item name="iconSettingsAccount">@drawable/ic_account</item>
|
||||
<item name="iconSettingsAccountAdd">@drawable/ic_account_plus</item>
|
||||
<item name="iconSettingsExport">@drawable/ic_export</item>
|
||||
<item name="iconSettingsImport">@drawable/ic_import</item>
|
||||
// TODO: Remove iconSettingsImportStatus as soon icons are migrated to icon module
|
||||
<item name="iconSettingsImportStatus">@drawable/ic_import_status</item>
|
||||
|
||||
<item name="textColorPrimaryRecipientDropdown">@android:color/primary_text_light</item>
|
||||
|
@ -143,32 +88,18 @@
|
|||
<item name="messageListPreviewTextColor">#ff444444</item>
|
||||
<item name="messageListDividerColor">#ffcccccc</item>
|
||||
<item name="messageListStateIconTint">#bbbbbb</item>
|
||||
<item name="messageListAttachment">@drawable/ic_messagelist_attachment</item>
|
||||
<item name="messageListAnswered">@drawable/ic_messagelist_answered</item>
|
||||
<item name="messageListForwarded">@drawable/ic_messagelist_forwarded</item>
|
||||
<item name="messageListAnsweredForwarded">@drawable/ic_messagelist_answered_forwarded</item>
|
||||
|
||||
<item name="messageListSwipeIconTint">#ffffff</item>
|
||||
<item name="messageListSwipeDisabledBackgroundColor">@color/material_gray_200</item>
|
||||
<item name="messageListSwipeSelectIcon">@drawable/ic_check_circle</item>
|
||||
<item name="messageListSwipeSelectBackgroundColor">@color/material_blue_600</item>
|
||||
<item name="messageListSwipeMarkAsReadIcon">?attr/iconActionMarkAsRead</item>
|
||||
<item name="messageListSwipeMarkAsUnreadIcon">?attr/iconActionMarkAsUnread</item>
|
||||
<item name="messageListSwipeToggleReadBackgroundColor">@color/material_blue_600</item>
|
||||
<item name="messageListSwipeAddStarIcon">?attr/iconActionFlag</item>
|
||||
<item name="messageListSwipeRemoveStarIcon">?attr/iconActionUnflag</item>
|
||||
<item name="messageListSwipeToggleStarBackgroundColor">@color/material_orange_600</item>
|
||||
<item name="messageListSwipeArchiveIcon">?attr/iconActionArchive</item>
|
||||
<item name="messageListSwipeArchiveBackgroundColor">@color/material_green_600</item>
|
||||
<item name="messageListSwipeDeleteIcon">?attr/iconActionDelete</item>
|
||||
<item name="messageListSwipeDeleteBackgroundColor">@color/material_red_600</item>
|
||||
<item name="messageListSwipeSpamIcon">?attr/iconActionSpam</item>
|
||||
<item name="messageListSwipeSpamBackgroundColor">@color/material_red_700</item>
|
||||
<item name="messageListSwipeMoveIcon">?attr/iconActionMove</item>
|
||||
<item name="messageListSwipeMoveBackgroundColor">@color/material_purple_500</item>
|
||||
|
||||
<item name="messageStarColor">#fbbc04</item>
|
||||
<item name="messageDetailsAddContactIcon">@drawable/ic_person_add</item>
|
||||
<item name="messageDetailsDividerColor">#ffcccccc</item>
|
||||
<item name="contactPictureFallbackDefaultBackgroundColor">#ffababab</item>
|
||||
<item name="contactPictureFallbackBackgroundColors">@array/contact_picture_fallback_background_colors_light</item>
|
||||
|
@ -178,17 +109,6 @@
|
|||
<item name="tintColorBulletPointNegative">#dd2222</item>
|
||||
<item name="tintColorBulletPointNeutral">#888</item>
|
||||
|
||||
<item name="iconAboutVersion">@drawable/ic_info</item>
|
||||
<item name="iconAboutAuthors">@drawable/ic_people</item>
|
||||
<item name="iconAboutSourceCode">@drawable/ic_code</item>
|
||||
<item name="iconAboutLicense">@drawable/ic_description</item>
|
||||
<item name="iconAboutWebsite">@drawable/ic_link</item>
|
||||
<item name="iconUserForum">@drawable/ic_forum</item>
|
||||
<item name="iconUserManual">@drawable/ic_open_book</item>
|
||||
<item name="iconHelp">@drawable/ic_help</item>
|
||||
<item name="iconAboutFediverse">@drawable/ic_mastodon</item>
|
||||
|
||||
<item name="unencryptedAttachmentUnlock">@drawable/ic_visibility</item>
|
||||
<item name="openpgp_black">#000</item>
|
||||
<item name="openpgp_orange">#FF8800</item>
|
||||
<item name="openpgp_red">#CC0000</item>
|
||||
|
@ -268,62 +188,7 @@
|
|||
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
|
||||
|
||||
<item name="iconUnifiedInbox">@drawable/ic_inbox_multiple</item>
|
||||
<item name="iconFolder">@drawable/ic_folder</item>
|
||||
<item name="iconFolderInbox">@drawable/ic_inbox</item>
|
||||
<item name="iconFolderOutbox">@drawable/ic_outbox</item>
|
||||
<item name="iconFolderArchive">@drawable/ic_archive</item>
|
||||
<item name="iconFolderDrafts">@drawable/ic_drafts_folder</item>
|
||||
<item name="iconFolderSent">@drawable/ic_send</item>
|
||||
<item name="iconFolderSpam">@drawable/ic_alert_octagon</item>
|
||||
<item name="iconFolderTrash">@drawable/ic_trash_can</item>
|
||||
<item name="iconActionAddAttachment">@drawable/ic_attachment</item>
|
||||
<item name="iconActionArchive">@drawable/ic_archive</item>
|
||||
<item name="iconActionCompose">@drawable/ic_pencil</item>
|
||||
<item name="iconActionDelete">@drawable/ic_trash_can</item>
|
||||
<item name="iconActionMove">@drawable/ic_folder</item>
|
||||
<item name="iconActionCopy">@drawable/ic_content_copy</item>
|
||||
<item name="iconActionNextStatus">@drawable/ic_chevron_right</item>
|
||||
<item name="iconActionRefresh">@drawable/ic_refresh</item>
|
||||
<item name="iconActionSearch">@drawable/ic_magnify</item>
|
||||
<item name="iconActionSearchFolder">@drawable/ic_folder_magnify</item>
|
||||
<item name="iconActionSend">@drawable/ic_send</item>
|
||||
<item name="iconActionSettings">@drawable/ic_cog</item>
|
||||
<item name="iconActionSort">@drawable/ic_sort</item>
|
||||
<item name="iconActionSpam">@drawable/ic_alert_octagon</item>
|
||||
<item name="iconActionFlag">@drawable/ic_star</item>
|
||||
<item name="iconActionUnflag">@drawable/ic_star_outline</item>
|
||||
<item name="iconActionMarkAsRead">@drawable/ic_opened_envelope</item>
|
||||
<item name="iconActionMarkAsUnread">@drawable/ic_mark_new</item>
|
||||
<item name="iconActionRemoteSearch">@drawable/ic_magnify_cloud</item>
|
||||
<item name="iconActionAdd">@drawable/ic_plus</item>
|
||||
<item name="iconActionImportExport">@drawable/ic_arrow_up_down</item>
|
||||
<item name="iconActionUpload">@drawable/ic_file_upload</item>
|
||||
<item name="iconActionSelectAll">@drawable/ic_select_all</item>
|
||||
<item name="iconActionSave">@drawable/ic_floppy</item>
|
||||
<item name="iconActionSaveAttachment">@drawable/ic_download</item>
|
||||
<item name="iconActionCancel">@drawable/ic_clear</item>
|
||||
<item name="iconActionRequestReadReceipt">@drawable/ic_action_request_read_receipt_dark</item>
|
||||
<item name="iconActionExpand">@drawable/ic_chevron_down</item>
|
||||
<item name="iconActionCollapse">@drawable/ic_chevron_up</item>
|
||||
<item name="iconPreferencesDisplay">@drawable/ic_tv</item>
|
||||
<item name="iconPreferencesInteraction">@drawable/ic_touch</item>
|
||||
<item name="iconPreferencesNotifications">@drawable/ic_notifications</item>
|
||||
<item name="iconPreferencesNetwork">@drawable/ic_arrow_up_down</item>
|
||||
<item name="iconPreferencesPrivacy">@drawable/ic_shield</item>
|
||||
<item name="iconPreferencesDebug">@drawable/ic_bug</item>
|
||||
<item name="iconPreferencesFolders">@drawable/ic_folder</item>
|
||||
<item name="iconPreferencesSearch">@drawable/ic_magnify</item>
|
||||
<item name="iconPreferencesCrypto">@drawable/ic_preferences_crypto</item>
|
||||
<item name="iconPreferencesFetchMail">@drawable/ic_preferences_check_mail</item>
|
||||
<item name="iconPreferencesReadMail">@drawable/ic_opened_envelope</item>
|
||||
<item name="iconPreferencesCompose">@drawable/ic_pencil</item>
|
||||
<item name="iconSettingsAbout">@drawable/ic_info</item>
|
||||
<item name="iconSettingsGeneral">@drawable/ic_cog</item>
|
||||
<item name="iconSettingsAccount">@drawable/ic_account</item>
|
||||
<item name="iconSettingsAccountAdd">@drawable/ic_account_plus</item>
|
||||
<item name="iconSettingsExport">@drawable/ic_export</item>
|
||||
<item name="iconSettingsImport">@drawable/ic_import</item>
|
||||
// TODO: Remove iconSettingsImportStatus as soon icons are migrated to icon module
|
||||
<item name="iconSettingsImportStatus">@drawable/ic_import_status</item>
|
||||
|
||||
<item name="textColorPrimaryRecipientDropdown">@android:color/primary_text_dark</item>
|
||||
|
@ -344,32 +209,18 @@
|
|||
<item name="messageListPreviewTextColor">#ffaaaaaa</item>
|
||||
<item name="messageListDividerColor">#ff333333</item>
|
||||
<item name="messageListStateIconTint">#777777</item>
|
||||
<item name="messageListAttachment">@drawable/ic_messagelist_attachment</item>
|
||||
<item name="messageListAnswered">@drawable/ic_messagelist_answered</item>
|
||||
<item name="messageListForwarded">@drawable/ic_messagelist_forwarded</item>
|
||||
<item name="messageListAnsweredForwarded">@drawable/ic_messagelist_answered_forwarded</item>
|
||||
|
||||
<item name="messageListSwipeIconTint">#ffffff</item>
|
||||
<item name="messageListSwipeDisabledBackgroundColor">@color/material_gray_900</item>
|
||||
<item name="messageListSwipeSelectIcon">@drawable/ic_check_circle</item>
|
||||
<item name="messageListSwipeSelectBackgroundColor">@color/material_blue_700</item>
|
||||
<item name="messageListSwipeMarkAsReadIcon">?attr/iconActionMarkAsRead</item>
|
||||
<item name="messageListSwipeMarkAsUnreadIcon">?attr/iconActionMarkAsUnread</item>
|
||||
<item name="messageListSwipeToggleReadBackgroundColor">@color/material_blue_700</item>
|
||||
<item name="messageListSwipeAddStarIcon">?attr/iconActionFlag</item>
|
||||
<item name="messageListSwipeRemoveStarIcon">?attr/iconActionUnflag</item>
|
||||
<item name="messageListSwipeToggleStarBackgroundColor">@color/material_orange_700</item>
|
||||
<item name="messageListSwipeArchiveIcon">?attr/iconActionArchive</item>
|
||||
<item name="messageListSwipeArchiveBackgroundColor">@color/material_green_700</item>
|
||||
<item name="messageListSwipeDeleteIcon">?attr/iconActionDelete</item>
|
||||
<item name="messageListSwipeDeleteBackgroundColor">@color/material_red_700</item>
|
||||
<item name="messageListSwipeSpamIcon">?attr/iconActionSpam</item>
|
||||
<item name="messageListSwipeSpamBackgroundColor">@color/material_red_800</item>
|
||||
<item name="messageListSwipeMoveIcon">?attr/iconActionMove</item>
|
||||
<item name="messageListSwipeMoveBackgroundColor">@color/material_purple_600</item>
|
||||
|
||||
<item name="messageStarColor">#fdd663</item>
|
||||
<item name="messageDetailsAddContactIcon">@drawable/ic_person_add</item>
|
||||
<item name="messageDetailsDividerColor">#ff555555</item>
|
||||
<item name="contactTokenBackgroundColor">#313131</item>
|
||||
<item name="contactPictureFallbackDefaultBackgroundColor">#ff606060</item>
|
||||
|
@ -379,17 +230,6 @@
|
|||
<item name="tintColorBulletPointNegative">#dd2222</item>
|
||||
<item name="tintColorBulletPointNeutral">#bbb</item>
|
||||
|
||||
<item name="iconAboutVersion">@drawable/ic_info</item>
|
||||
<item name="iconAboutAuthors">@drawable/ic_people</item>
|
||||
<item name="iconAboutSourceCode">@drawable/ic_code</item>
|
||||
<item name="iconAboutLicense">@drawable/ic_description</item>
|
||||
<item name="iconAboutWebsite">@drawable/ic_link</item>
|
||||
<item name="iconUserForum">@drawable/ic_forum</item>
|
||||
<item name="iconUserManual">@drawable/ic_open_book</item>
|
||||
<item name="iconHelp">@drawable/ic_help</item>
|
||||
<item name="iconAboutFediverse">@drawable/ic_mastodon</item>
|
||||
|
||||
<item name="unencryptedAttachmentUnlock">@drawable/ic_visibility</item>
|
||||
<item name="openpgp_black">#fff</item>
|
||||
<item name="openpgp_orange">#ee7700</item>
|
||||
<item name="openpgp_red">#CC0000</item>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
android:title="@string/account_settings_title_fmt">
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="?attr/iconSettingsGeneral"
|
||||
android:icon="@drawable/ic_cog"
|
||||
android:key="account_settings"
|
||||
android:title="@string/account_settings_general_title">
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
|||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="?attr/iconPreferencesReadMail"
|
||||
android:icon="@drawable/ic_opened_envelope"
|
||||
android:key="reading_mail"
|
||||
android:title="@string/account_settings_reading_mail">
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
|||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="?attr/iconPreferencesFetchMail"
|
||||
android:icon="@drawable/ic_preferences_check_mail"
|
||||
android:key="incoming_prefs"
|
||||
android:title="@string/account_settings_sync">
|
||||
|
||||
|
@ -152,7 +152,7 @@
|
|||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="?attr/iconPreferencesCompose"
|
||||
android:icon="@drawable/ic_pencil"
|
||||
android:key="composing"
|
||||
android:title="@string/account_settings_composition">
|
||||
|
||||
|
@ -228,7 +228,7 @@
|
|||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="?attr/iconPreferencesFolders"
|
||||
android:icon="@drawable/ic_folder"
|
||||
android:key="folders"
|
||||
android:title="@string/account_settings_folders">
|
||||
|
||||
|
@ -293,7 +293,7 @@
|
|||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="?attr/iconPreferencesNotifications"
|
||||
android:icon="@drawable/ic_notifications"
|
||||
android:key="notifications"
|
||||
android:title="@string/notifications_title">
|
||||
|
||||
|
@ -378,7 +378,7 @@
|
|||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="?attr/iconPreferencesSearch"
|
||||
android:icon="@drawable/ic_magnify"
|
||||
android:key="search"
|
||||
android:title="@string/account_settings_search">
|
||||
|
||||
|
@ -393,7 +393,7 @@
|
|||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="?attr/iconPreferencesCrypto"
|
||||
android:icon="@drawable/ic_preferences_crypto"
|
||||
android:key="openpgp"
|
||||
android:title="@string/account_settings_crypto">
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
search:ignore="true">
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="?attr/iconPreferencesDisplay"
|
||||
android:icon="@drawable/ic_tv"
|
||||
android:key="display_preferences"
|
||||
android:title="@string/display_preferences"
|
||||
search:ignore="true">
|
||||
|
@ -305,7 +305,7 @@
|
|||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="?attr/iconPreferencesInteraction"
|
||||
android:icon="@drawable/ic_touch"
|
||||
android:key="interaction_preferences"
|
||||
android:title="@string/interaction_preferences"
|
||||
search:ignore="true">
|
||||
|
@ -364,7 +364,7 @@
|
|||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="?attr/iconPreferencesNotifications"
|
||||
android:icon="@drawable/ic_notifications"
|
||||
android:key="notification_preferences"
|
||||
android:title="@string/notifications_title"
|
||||
search:ignore="true">
|
||||
|
@ -415,7 +415,7 @@
|
|||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="?attr/iconPreferencesNetwork"
|
||||
android:icon="@drawable/ic_arrow_up_down"
|
||||
android:key="network_preferences"
|
||||
android:title="@string/network_preferences"
|
||||
search:ignore="true">
|
||||
|
@ -431,7 +431,7 @@
|
|||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="?attr/iconPreferencesPrivacy"
|
||||
android:icon="@drawable/ic_shield"
|
||||
android:key="privacy_preferences"
|
||||
android:title="@string/privacy_preferences"
|
||||
search:ignore="true">
|
||||
|
@ -449,7 +449,7 @@
|
|||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen
|
||||
android:icon="?attr/iconPreferencesDebug"
|
||||
android:icon="@drawable/ic_bug"
|
||||
android:key="debug_preferences"
|
||||
android:title="@string/debug_preferences"
|
||||
search:ignore="true">
|
||||
|
|
Loading…
Reference in a new issue