mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-22 05:38:55 +00:00
fix emoji textview classes
This commit is contained in:
parent
f66d7c8ab9
commit
fdfee1f5dc
7 changed files with 27 additions and 25 deletions
|
|
@ -15,10 +15,10 @@ import com.habitrpg.android.habitica.data.ApiClient
|
|||
import com.habitrpg.android.habitica.helpers.RxErrorHandler
|
||||
import com.habitrpg.android.habitica.ui.helpers.MarkdownParser
|
||||
import com.habitrpg.android.habitica.ui.helpers.bindView
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaEmojiTextView
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.functions.Consumer
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import net.pherth.android.emoji_library.EmojiTextView
|
||||
import javax.inject.Inject
|
||||
|
||||
class MaintenanceActivity : BaseActivity() {
|
||||
|
|
@ -31,7 +31,7 @@ class MaintenanceActivity : BaseActivity() {
|
|||
|
||||
internal val titleTextView: TextView by bindView(R.id.titleTextView)
|
||||
internal val imageView: SimpleDraweeView by bindView(R.id.imageView)
|
||||
internal val descriptionTextView: EmojiTextView by bindView(R.id.descriptionTextView)
|
||||
internal val descriptionTextView: HabiticaEmojiTextView by bindView(R.id.descriptionTextView)
|
||||
internal val playStoreButton: Button by bindView(R.id.playStoreButton)
|
||||
private var isDeprecationNotice: Boolean = false
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
package com.habitrpg.android.habitica.ui.adapter
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.extensions.notNull
|
||||
import com.habitrpg.android.habitica.models.tasks.Task
|
||||
import com.habitrpg.android.habitica.ui.helpers.bindView
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaEmojiTextView
|
||||
import io.reactivex.BackpressureStrategy
|
||||
import io.reactivex.Flowable
|
||||
import io.reactivex.subjects.PublishSubject
|
||||
import io.realm.OrderedRealmCollection
|
||||
import io.realm.RealmRecyclerViewAdapter
|
||||
import net.pherth.android.emoji_library.EmojiTextView
|
||||
import java.util.*
|
||||
|
||||
|
||||
|
|
@ -51,8 +51,8 @@ class SkillTasksRecyclerViewAdapter(data: OrderedRealmCollection<Task>?, autoUpd
|
|||
|
||||
var task: Task? = null
|
||||
|
||||
private val titleTextView: EmojiTextView by bindView(R.id.titleTextView)
|
||||
private val notesTextView: EmojiTextView by bindView(R.id.notesTextView)
|
||||
private val titleTextView: HabiticaEmojiTextView by bindView(R.id.titleTextView)
|
||||
private val notesTextView: HabiticaEmojiTextView by bindView(R.id.notesTextView)
|
||||
private val rightBorderView: View by bindView(R.id.rightBorderView)
|
||||
|
||||
init {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
package com.habitrpg.android.habitica.ui.adapter.social
|
||||
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.extensions.inflate
|
||||
import com.habitrpg.android.habitica.extensions.notNull
|
||||
|
|
@ -13,6 +13,7 @@ import com.habitrpg.android.habitica.models.social.Challenge
|
|||
import com.habitrpg.android.habitica.models.social.ChallengeMembership
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.challenges.ChallengeFilterOptions
|
||||
import com.habitrpg.android.habitica.ui.helpers.bindView
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaEmojiTextView
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaIconsHelper
|
||||
import io.reactivex.BackpressureStrategy
|
||||
import io.reactivex.Flowable
|
||||
|
|
@ -20,7 +21,6 @@ import io.reactivex.subjects.PublishSubject
|
|||
import io.realm.OrderedRealmCollection
|
||||
import io.realm.RealmRecyclerViewAdapter
|
||||
import net.pherth.android.emoji_library.EmojiParser
|
||||
import net.pherth.android.emoji_library.EmojiTextView
|
||||
|
||||
class ChallengesListViewAdapter(data: OrderedRealmCollection<Challenge>?, autoUpdate: Boolean, private val viewUserChallengesOnly: Boolean, private val userId: String) : RealmRecyclerViewAdapter<Challenge, ChallengesListViewAdapter.ChallengeViewHolder>(data, autoUpdate) {
|
||||
private var unfilteredData: OrderedRealmCollection<Challenge>? = null
|
||||
|
|
@ -86,7 +86,7 @@ class ChallengesListViewAdapter(data: OrderedRealmCollection<Challenge>?, autoUp
|
|||
|
||||
class ChallengeViewHolder internal constructor(itemView: View, private val viewUserChallengesOnly: Boolean) : RecyclerView.ViewHolder(itemView) {
|
||||
|
||||
private val challengeName: EmojiTextView by bindView(R.id.challenge_name)
|
||||
private val challengeName: HabiticaEmojiTextView by bindView(R.id.challenge_name)
|
||||
private val challengeDescription: TextView by bindView(R.id.challenge_shorttext)
|
||||
private val participantCount: TextView by bindView(R.id.participantCount)
|
||||
private val officialChallengeLayout: TextView by bindView(R.id.official_challenge_view)
|
||||
|
|
|
|||
|
|
@ -4,22 +4,26 @@ import android.annotation.SuppressLint
|
|||
import android.content.Context
|
||||
import android.content.res.Resources
|
||||
import android.graphics.drawable.BitmapDrawable
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import android.text.method.LinkMovementMethod
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Button
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.extensions.*
|
||||
import com.habitrpg.android.habitica.extensions.dpToPx
|
||||
import com.habitrpg.android.habitica.extensions.inflate
|
||||
import com.habitrpg.android.habitica.extensions.notNull
|
||||
import com.habitrpg.android.habitica.extensions.setScaledPadding
|
||||
import com.habitrpg.android.habitica.models.social.ChatMessage
|
||||
import com.habitrpg.android.habitica.models.user.User
|
||||
import com.habitrpg.android.habitica.ui.AvatarView
|
||||
import com.habitrpg.android.habitica.ui.helpers.DataBindingUtils
|
||||
import com.habitrpg.android.habitica.ui.helpers.MarkdownParser
|
||||
import com.habitrpg.android.habitica.ui.helpers.bindView
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaEmojiTextView
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaIconsHelper
|
||||
import com.habitrpg.android.habitica.ui.views.social.UsernameLabel
|
||||
import io.reactivex.BackpressureStrategy
|
||||
|
|
@ -30,7 +34,6 @@ import io.reactivex.schedulers.Schedulers
|
|||
import io.reactivex.subjects.PublishSubject
|
||||
import io.realm.OrderedRealmCollection
|
||||
import io.realm.RealmRecyclerViewAdapter
|
||||
import net.pherth.android.emoji_library.EmojiTextView
|
||||
|
||||
class ChatRecyclerViewAdapter(data: OrderedRealmCollection<ChatMessage>?, autoUpdate: Boolean, user: User?, private val isTavern: Boolean) : RealmRecyclerViewAdapter<ChatMessage, RecyclerView.ViewHolder>(data, autoUpdate) {
|
||||
internal var user = user
|
||||
|
|
@ -112,7 +115,7 @@ class ChatRecyclerViewAdapter(data: OrderedRealmCollection<ChatMessage>?, autoUp
|
|||
private val messageWrapper: ViewGroup by bindView(R.id.message_wrapper)
|
||||
private val avatarView: AvatarView by bindView(R.id.avatar_view)
|
||||
private val userLabel: UsernameLabel by bindView(R.id.user_label)
|
||||
private val messageText: EmojiTextView by bindView(R.id.message_text)
|
||||
private val messageText: HabiticaEmojiTextView by bindView(R.id.message_text)
|
||||
private val sublineTextView: TextView by bindView(R.id.subline_textview)
|
||||
private val likeBackground: LinearLayout by bindView(R.id.like_background_layout)
|
||||
private val tvLikes: TextView by bindView(R.id.tvLikes)
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ import com.habitrpg.android.habitica.ui.fragments.BaseMainFragment
|
|||
import com.habitrpg.android.habitica.ui.helpers.MarkdownParser
|
||||
import com.habitrpg.android.habitica.ui.helpers.bindView
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaAlertDialog
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaEmojiTextView
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaIconsHelper
|
||||
import com.habitrpg.android.habitica.ui.views.social.UsernameLabel
|
||||
import io.reactivex.functions.Action
|
||||
import io.reactivex.functions.Consumer
|
||||
import net.pherth.android.emoji_library.EmojiParser
|
||||
import net.pherth.android.emoji_library.EmojiTextView
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
|
||||
|
|
@ -51,8 +51,8 @@ class ChallengeDetailFragment: BaseMainFragment() {
|
|||
private val joinButton: Button? by bindView(R.id.join_button)
|
||||
private val leaveButonWrapper: ViewGroup? by bindView(R.id.leave_button_wrapper)
|
||||
private val leaveButton: Button? by bindView(R.id.leave_button)
|
||||
private val challengeName: EmojiTextView? by bindView(R.id.challenge_name)
|
||||
private val challengeDescription: EmojiTextView? by bindView(R.id.challenge_description)
|
||||
private val challengeName: HabiticaEmojiTextView? by bindView(R.id.challenge_name)
|
||||
private val challengeDescription: HabiticaEmojiTextView? by bindView(R.id.challenge_description)
|
||||
private val challengeLeaderWrapper: ViewGroup? by bindView(R.id.challenge_creator_wrapper)
|
||||
private val challengeLeaderAvatarView: AvatarView? by bindView(R.id.creator_avatarview)
|
||||
private val challengeLeaderLabel: UsernameLabel? by bindView(R.id.creator_label)
|
||||
|
|
|
|||
|
|
@ -9,17 +9,16 @@ import android.widget.Filterable
|
|||
import android.widget.TextView
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.data.SocialRepository
|
||||
import com.habitrpg.android.habitica.extensions.dpToPx
|
||||
import com.habitrpg.android.habitica.extensions.inflate
|
||||
import com.habitrpg.android.habitica.models.auth.LocalAuthentication
|
||||
import com.habitrpg.android.habitica.models.social.ChatMessage
|
||||
import com.habitrpg.android.habitica.models.social.FindUsernameResult
|
||||
import com.habitrpg.android.habitica.models.user.Authentication
|
||||
import com.habitrpg.android.habitica.models.user.Profile
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaEmojiTextView
|
||||
import com.habitrpg.android.habitica.ui.views.social.UsernameLabel
|
||||
import net.pherth.android.emoji_library.EmojiMap
|
||||
import net.pherth.android.emoji_library.EmojiParser
|
||||
import net.pherth.android.emoji_library.EmojiTextView
|
||||
import java.util.*
|
||||
|
||||
class AutocompleteAdapter(val context: Context, val socialRepository: SocialRepository? = null, var autocompleteContext: String? = null, var groupID: String? = null, val remoteAutocomplete: Boolean = false) : BaseAdapter(), Filterable {
|
||||
|
|
@ -98,7 +97,7 @@ class AutocompleteAdapter(val context: Context, val socialRepository: SocialRepo
|
|||
} else {
|
||||
val view = parent?.inflate(R.layout.autocomplete_emoji)
|
||||
val result = getItem(position) as? String
|
||||
val emojiTextView = view?.findViewById<EmojiTextView>(R.id.emoji_textview)
|
||||
val emojiTextView = view?.findViewById<HabiticaEmojiTextView>(R.id.emoji_textview)
|
||||
emojiTextView?.setEmojiconSize(24.dpToPx(context))
|
||||
emojiTextView?.text = EmojiParser.parseEmojis(result)
|
||||
view?.findViewById<TextView>(R.id.label)?.text = result
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package com.habitrpg.android.habitica.ui.viewHolders.tasks
|
|||
|
||||
import android.content.Context
|
||||
import android.graphics.Rect
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import android.view.LayoutInflater
|
||||
import android.view.TouchDelegate
|
||||
import android.view.View
|
||||
|
|
@ -12,6 +10,8 @@ import android.widget.CheckBox
|
|||
import android.widget.CompoundButton
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.events.commands.ChecklistCheckedCommand
|
||||
import com.habitrpg.android.habitica.events.commands.TaskCheckedCommand
|
||||
|
|
@ -20,11 +20,11 @@ import com.habitrpg.android.habitica.models.tasks.ChecklistItem
|
|||
import com.habitrpg.android.habitica.models.tasks.Task
|
||||
import com.habitrpg.android.habitica.ui.helpers.MarkdownParser
|
||||
import com.habitrpg.android.habitica.ui.helpers.bindView
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaEmojiTextView
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.functions.Consumer
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import net.pherth.android.emoji_library.EmojiTextView
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
||||
abstract class ChecklistedViewHolder(itemView: View) : BaseTaskViewHolder(itemView), CompoundButton.OnCheckedChangeListener {
|
||||
|
|
@ -82,7 +82,7 @@ abstract class ChecklistedViewHolder(itemView: View) : BaseTaskViewHolder(itemVi
|
|||
for (item in this.task?.checklist ?: emptyList<ChecklistItem>()) {
|
||||
val itemView = layoutInflater?.inflate(R.layout.checklist_item_row, this.checklistView, false) as? LinearLayout
|
||||
val checkbox = itemView?.findViewById<CheckBox>(R.id.checkBox)
|
||||
val textView = itemView?.findViewById<EmojiTextView>(R.id.checkedTextView)
|
||||
val textView = itemView?.findViewById<HabiticaEmojiTextView>(R.id.checkedTextView)
|
||||
// Populate the data into the template view using the data object
|
||||
textView?.text = item.text
|
||||
if (item.text != null) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue