feat: private message
This commit is contained in:
parent
74cab22eca
commit
6f685a4388
14 changed files with 209 additions and 199 deletions
|
@ -201,7 +201,7 @@
|
||||||
android:name=".others.imagesearch.ImageSearchActivity"
|
android:name=".others.imagesearch.ImageSearchActivity"
|
||||||
android:parentActivityName=".MainActivity" />
|
android:parentActivityName=".MainActivity" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".util.MarkdownCreatorActivity"
|
android:name=".util.ActivityMarkdownCreator"
|
||||||
android:windowSoftInputMode="adjustResize" />
|
android:windowSoftInputMode="adjustResize" />
|
||||||
<activity android:name=".parsers.ParserTestActivity" />
|
<activity android:name=".parsers.ParserTestActivity" />
|
||||||
<activity
|
<activity
|
||||||
|
|
|
@ -854,7 +854,7 @@ fun savePrefsToDownloads(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@SuppressLint("StringFormatMatches")
|
||||||
fun savePrefs(serialized: String, path: String, title: String, context: Context): File? {
|
fun savePrefs(serialized: String, path: String, title: String, context: Context): File? {
|
||||||
var file = File(path, "$title.ani")
|
var file = File(path, "$title.ani")
|
||||||
var counter = 1
|
var counter = 1
|
||||||
|
@ -874,6 +874,7 @@ fun savePrefs(serialized: String, path: String, title: String, context: Context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("StringFormatMatches")
|
||||||
fun savePrefs(
|
fun savePrefs(
|
||||||
serialized: String,
|
serialized: String,
|
||||||
path: String,
|
path: String,
|
||||||
|
@ -920,7 +921,7 @@ fun shareImage(title: String, bitmap: Bitmap, context: Context) {
|
||||||
intent.putExtra(Intent.EXTRA_STREAM, contentUri)
|
intent.putExtra(Intent.EXTRA_STREAM, contentUri)
|
||||||
context.startActivity(Intent.createChooser(intent, "Share $title"))
|
context.startActivity(Intent.createChooser(intent, "Share $title"))
|
||||||
}
|
}
|
||||||
|
@SuppressLint("StringFormatMatches")
|
||||||
fun saveImage(image: Bitmap, path: String, imageFileName: String): File? {
|
fun saveImage(image: Bitmap, path: String, imageFileName: String): File? {
|
||||||
val imageFile = File(path, "$imageFileName.png")
|
val imageFile = File(path, "$imageFileName.png")
|
||||||
return try {
|
return try {
|
||||||
|
@ -1500,7 +1501,6 @@ fun buildMarkwon(
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onLoadFailed(
|
override fun onLoadFailed(
|
||||||
e: GlideException?,
|
e: GlideException?,
|
||||||
model: Any?,
|
model: Any?,
|
||||||
|
|
|
@ -93,30 +93,41 @@ class AnilistMutations {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun postActivity(text: String, edit : Int? = null): String {
|
suspend fun postActivity(text: String, edit: Int? = null): String {
|
||||||
val encodedText = text.stringSanitizer()
|
val encodedText = text.stringSanitizer()
|
||||||
val query = "mutation{SaveTextActivity(${if (edit != null) "id:$edit," else ""} text:$encodedText){siteUrl}}"
|
val query =
|
||||||
|
"mutation{SaveTextActivity(${if (edit != null) "id:$edit," else ""} text:$encodedText){siteUrl}}"
|
||||||
val result = executeQuery<JsonObject>(query)
|
val result = executeQuery<JsonObject>(query)
|
||||||
val errors = result?.get("errors")
|
val errors = result?.get("errors")
|
||||||
return errors?.toString()
|
return errors?.toString()
|
||||||
?: (currContext()?.getString(ani.dantotsu.R.string.success) ?: "Success")
|
?: (currContext()?.getString(ani.dantotsu.R.string.success) ?: "Success")
|
||||||
}
|
}
|
||||||
suspend fun postMessage(userId: Int, text: String, edit: Int? = null,isPrivate: Boolean = false): String {
|
|
||||||
val encodedText = text.replace("","").stringSanitizer()
|
suspend fun postMessage(
|
||||||
val query = "mutation{SaveMessageActivity(${if (edit != null) "id:$edit," else ""} recipientId:$userId,message:$encodedText,private:$isPrivate){id}}"
|
userId: Int,
|
||||||
|
text: String,
|
||||||
|
edit: Int? = null,
|
||||||
|
isPrivate: Boolean = false
|
||||||
|
): String {
|
||||||
|
val encodedText = text.replace("", "").stringSanitizer()
|
||||||
|
val query =
|
||||||
|
"mutation{SaveMessageActivity(${if (edit != null) "id:$edit," else ""} recipientId:$userId,message:$encodedText,private:$isPrivate){id}}"
|
||||||
val result = executeQuery<JsonObject>(query)
|
val result = executeQuery<JsonObject>(query)
|
||||||
val errors = result?.get("errors")
|
val errors = result?.get("errors")
|
||||||
return errors?.toString()
|
return errors?.toString()
|
||||||
?: (currContext()?.getString(ani.dantotsu.R.string.success) ?: "Success")
|
?: (currContext()?.getString(ani.dantotsu.R.string.success) ?: "Success")
|
||||||
}
|
}
|
||||||
suspend fun postReply(activityId: Int, text: String, edit: Int? = null ): String {
|
|
||||||
|
suspend fun postReply(activityId: Int, text: String, edit: Int? = null): String {
|
||||||
val encodedText = text.stringSanitizer()
|
val encodedText = text.stringSanitizer()
|
||||||
val query = "mutation{SaveActivityReply(${if (edit != null) "id:$edit," else ""} activityId:$activityId,text:$encodedText){id}}"
|
val query =
|
||||||
|
"mutation{SaveActivityReply(${if (edit != null) "id:$edit," else ""} activityId:$activityId,text:$encodedText){id}}"
|
||||||
val result = executeQuery<JsonObject>(query)
|
val result = executeQuery<JsonObject>(query)
|
||||||
val errors = result?.get("errors")
|
val errors = result?.get("errors")
|
||||||
return errors?.toString()
|
return errors?.toString()
|
||||||
?: (currContext()?.getString(ani.dantotsu.R.string.success) ?: "Success")
|
?: (currContext()?.getString(ani.dantotsu.R.string.success) ?: "Success")
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun postReview(summary: String, body: String, mediaId: Int, score: Int): String {
|
suspend fun postReview(summary: String, body: String, mediaId: Int, score: Int): String {
|
||||||
val encodedSummary = summary.stringSanitizer()
|
val encodedSummary = summary.stringSanitizer()
|
||||||
val encodedBody = body.stringSanitizer()
|
val encodedBody = body.stringSanitizer()
|
||||||
|
@ -143,7 +154,6 @@ class AnilistMutations {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private fun String.stringSanitizer(): String {
|
private fun String.stringSanitizer(): String {
|
||||||
val sb = StringBuilder()
|
val sb = StringBuilder()
|
||||||
var i = 0
|
var i = 0
|
||||||
|
|
|
@ -16,10 +16,9 @@ import ani.dantotsu.databinding.BottomSheetRecyclerBinding
|
||||||
import ani.dantotsu.profile.ProfileActivity
|
import ani.dantotsu.profile.ProfileActivity
|
||||||
import ani.dantotsu.profile.activity.ActivityReplyItem
|
import ani.dantotsu.profile.activity.ActivityReplyItem
|
||||||
import ani.dantotsu.snackString
|
import ani.dantotsu.snackString
|
||||||
import ani.dantotsu.util.MarkdownCreatorActivity
|
import ani.dantotsu.util.ActivityMarkdownCreator
|
||||||
import com.xwray.groupie.GroupieAdapter
|
import com.xwray.groupie.GroupieAdapter
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.delay
|
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
|
|
||||||
|
@ -50,7 +49,7 @@ class RepliesBottomDialog : BottomSheetDialogFragment() {
|
||||||
binding.replyButton.setOnClickListener {
|
binding.replyButton.setOnClickListener {
|
||||||
ContextCompat.startActivity(
|
ContextCompat.startActivity(
|
||||||
context,
|
context,
|
||||||
Intent(context, MarkdownCreatorActivity::class.java)
|
Intent(context, ActivityMarkdownCreator::class.java)
|
||||||
.putExtra("type", "replyActivity")
|
.putExtra("type", "replyActivity")
|
||||||
.putExtra("parentId", activityId),
|
.putExtra("parentId", activityId),
|
||||||
null
|
null
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package ani.dantotsu.home.status
|
package ani.dantotsu.home.status
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
@ -16,7 +15,7 @@ import ani.dantotsu.profile.User
|
||||||
import ani.dantotsu.setAnimation
|
import ani.dantotsu.setAnimation
|
||||||
import ani.dantotsu.settings.saving.PrefManager
|
import ani.dantotsu.settings.saving.PrefManager
|
||||||
import ani.dantotsu.snackString
|
import ani.dantotsu.snackString
|
||||||
import ani.dantotsu.util.MarkdownCreatorActivity
|
import ani.dantotsu.util.ActivityMarkdownCreator
|
||||||
|
|
||||||
class UserStatusAdapter(private val user: ArrayList<User>) :
|
class UserStatusAdapter(private val user: ArrayList<User>) :
|
||||||
RecyclerView.Adapter<UserStatusAdapter.UsersViewHolder>() {
|
RecyclerView.Adapter<UserStatusAdapter.UsersViewHolder>() {
|
||||||
|
@ -43,7 +42,7 @@ class UserStatusAdapter(private val user: ArrayList<User>) :
|
||||||
if (user[bindingAdapterPosition].id == Anilist.userid) {
|
if (user[bindingAdapterPosition].id == Anilist.userid) {
|
||||||
ContextCompat.startActivity(
|
ContextCompat.startActivity(
|
||||||
itemView.context,
|
itemView.context,
|
||||||
Intent(itemView.context, MarkdownCreatorActivity::class.java)
|
Intent(itemView.context, ActivityMarkdownCreator::class.java)
|
||||||
.putExtra("type", "activity"),
|
.putExtra("type", "activity"),
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,7 +3,6 @@ package ani.dantotsu.media
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.text.SpannableString
|
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
@ -21,7 +20,7 @@ import ani.dantotsu.initActivity
|
||||||
import ani.dantotsu.navBarHeight
|
import ani.dantotsu.navBarHeight
|
||||||
import ani.dantotsu.statusBarHeight
|
import ani.dantotsu.statusBarHeight
|
||||||
import ani.dantotsu.themes.ThemeManager
|
import ani.dantotsu.themes.ThemeManager
|
||||||
import ani.dantotsu.util.MarkdownCreatorActivity
|
import ani.dantotsu.util.ActivityMarkdownCreator
|
||||||
import com.xwray.groupie.GroupieAdapter
|
import com.xwray.groupie.GroupieAdapter
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
@ -59,7 +58,7 @@ class ReviewActivity : AppCompatActivity() {
|
||||||
binding.followFilterButton.setOnClickListener {
|
binding.followFilterButton.setOnClickListener {
|
||||||
ContextCompat.startActivity(
|
ContextCompat.startActivity(
|
||||||
this,
|
this,
|
||||||
Intent(this, MarkdownCreatorActivity::class.java)
|
Intent(this, ActivityMarkdownCreator::class.java)
|
||||||
.putExtra("type", "review"),
|
.putExtra("type", "review"),
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
|
|
|
@ -38,7 +38,6 @@ import ani.dantotsu.snackString
|
||||||
import ani.dantotsu.statusBarHeight
|
import ani.dantotsu.statusBarHeight
|
||||||
import ani.dantotsu.themes.ThemeManager
|
import ani.dantotsu.themes.ThemeManager
|
||||||
import ani.dantotsu.toast
|
import ani.dantotsu.toast
|
||||||
import ani.dantotsu.util.MarkdownCreatorActivity
|
|
||||||
import com.google.android.material.appbar.AppBarLayout
|
import com.google.android.material.appbar.AppBarLayout
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
|
@ -19,8 +19,7 @@ import ani.dantotsu.databinding.FragmentFeedBinding
|
||||||
import ani.dantotsu.media.MediaDetailsActivity
|
import ani.dantotsu.media.MediaDetailsActivity
|
||||||
import ani.dantotsu.navBarHeight
|
import ani.dantotsu.navBarHeight
|
||||||
import ani.dantotsu.profile.ProfileActivity
|
import ani.dantotsu.profile.ProfileActivity
|
||||||
import ani.dantotsu.setBaseline
|
import ani.dantotsu.util.ActivityMarkdownCreator
|
||||||
import ani.dantotsu.util.MarkdownCreatorActivity
|
|
||||||
import com.xwray.groupie.GroupieAdapter
|
import com.xwray.groupie.GroupieAdapter
|
||||||
import eu.kanade.tachiyomi.util.system.getSerializableCompat
|
import eu.kanade.tachiyomi.util.system.getSerializableCompat
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
@ -53,14 +52,14 @@ class ActivityFragment : Fragment() {
|
||||||
if(userId == Anilist.userid) {
|
if(userId == Anilist.userid) {
|
||||||
ContextCompat.startActivity(
|
ContextCompat.startActivity(
|
||||||
requireContext(),
|
requireContext(),
|
||||||
Intent(context, MarkdownCreatorActivity::class.java)
|
Intent(context, ActivityMarkdownCreator::class.java)
|
||||||
.putExtra("type", "activity"),
|
.putExtra("type", "activity"),
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
} else{
|
} else{
|
||||||
ContextCompat.startActivity(
|
ContextCompat.startActivity(
|
||||||
requireContext(),
|
requireContext(),
|
||||||
Intent(context, MarkdownCreatorActivity::class.java)
|
Intent(context, ActivityMarkdownCreator::class.java)
|
||||||
.putExtra("type", "message")
|
.putExtra("type", "message")
|
||||||
.putExtra("userId", userId),
|
.putExtra("userId", userId),
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import android.view.View
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import androidx.fragment.app.FragmentActivity
|
import androidx.fragment.app.FragmentActivity
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
|
||||||
import ani.dantotsu.R
|
import ani.dantotsu.R
|
||||||
import ani.dantotsu.blurImage
|
import ani.dantotsu.blurImage
|
||||||
import ani.dantotsu.buildMarkwon
|
import ani.dantotsu.buildMarkwon
|
||||||
|
@ -19,7 +18,7 @@ import ani.dantotsu.profile.UsersDialogFragment
|
||||||
import ani.dantotsu.setAnimation
|
import ani.dantotsu.setAnimation
|
||||||
import ani.dantotsu.snackString
|
import ani.dantotsu.snackString
|
||||||
import ani.dantotsu.util.AniMarkdown.Companion.getBasicAniHTML
|
import ani.dantotsu.util.AniMarkdown.Companion.getBasicAniHTML
|
||||||
import ani.dantotsu.util.MarkdownCreatorActivity
|
import ani.dantotsu.util.ActivityMarkdownCreator
|
||||||
import com.xwray.groupie.GroupieAdapter
|
import com.xwray.groupie.GroupieAdapter
|
||||||
import com.xwray.groupie.viewbinding.BindableItem
|
import com.xwray.groupie.viewbinding.BindableItem
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
@ -152,7 +151,7 @@ class ActivityItem(
|
||||||
binding.activityEdit.setOnClickListener {
|
binding.activityEdit.setOnClickListener {
|
||||||
ContextCompat.startActivity(
|
ContextCompat.startActivity(
|
||||||
context,
|
context,
|
||||||
Intent(context, MarkdownCreatorActivity::class.java)
|
Intent(context, ActivityMarkdownCreator::class.java)
|
||||||
.putExtra("type", "activity")
|
.putExtra("type", "activity")
|
||||||
.putExtra("other", activity.text)
|
.putExtra("other", activity.text)
|
||||||
.putExtra("edit", activity.id),
|
.putExtra("edit", activity.id),
|
||||||
|
@ -183,7 +182,7 @@ class ActivityItem(
|
||||||
binding.activityEdit.setOnClickListener {
|
binding.activityEdit.setOnClickListener {
|
||||||
ContextCompat.startActivity(
|
ContextCompat.startActivity(
|
||||||
context,
|
context,
|
||||||
Intent(context, MarkdownCreatorActivity::class.java)
|
Intent(context, ActivityMarkdownCreator::class.java)
|
||||||
.putExtra("type", "message")
|
.putExtra("type", "message")
|
||||||
.putExtra("other", activity.message)
|
.putExtra("other", activity.message)
|
||||||
.putExtra("edit", activity.id)
|
.putExtra("edit", activity.id)
|
||||||
|
|
|
@ -15,7 +15,7 @@ import ani.dantotsu.profile.User
|
||||||
import ani.dantotsu.profile.UsersDialogFragment
|
import ani.dantotsu.profile.UsersDialogFragment
|
||||||
import ani.dantotsu.snackString
|
import ani.dantotsu.snackString
|
||||||
import ani.dantotsu.util.AniMarkdown.Companion.getBasicAniHTML
|
import ani.dantotsu.util.AniMarkdown.Companion.getBasicAniHTML
|
||||||
import ani.dantotsu.util.MarkdownCreatorActivity
|
import ani.dantotsu.util.ActivityMarkdownCreator
|
||||||
import com.xwray.groupie.GroupieAdapter
|
import com.xwray.groupie.GroupieAdapter
|
||||||
import com.xwray.groupie.viewbinding.BindableItem
|
import com.xwray.groupie.viewbinding.BindableItem
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
@ -81,7 +81,7 @@ class ActivityReplyItem(
|
||||||
binding.activityReply.setOnClickListener {
|
binding.activityReply.setOnClickListener {
|
||||||
ContextCompat.startActivity(
|
ContextCompat.startActivity(
|
||||||
context,
|
context,
|
||||||
Intent(context, MarkdownCreatorActivity::class.java)
|
Intent(context, ActivityMarkdownCreator::class.java)
|
||||||
.putExtra("type", "replyActivity")
|
.putExtra("type", "replyActivity")
|
||||||
.putExtra("parentId", parentId)
|
.putExtra("parentId", parentId)
|
||||||
.putExtra("other", "@${reply.user.name} "),
|
.putExtra("other", "@${reply.user.name} "),
|
||||||
|
@ -92,7 +92,7 @@ class ActivityReplyItem(
|
||||||
binding.activityEdit.setOnClickListener {
|
binding.activityEdit.setOnClickListener {
|
||||||
ContextCompat.startActivity(
|
ContextCompat.startActivity(
|
||||||
context,
|
context,
|
||||||
Intent(context, MarkdownCreatorActivity::class.java)
|
Intent(context, ActivityMarkdownCreator::class.java)
|
||||||
.putExtra("type", "replyActivity")
|
.putExtra("type", "replyActivity")
|
||||||
.putExtra("parentId", parentId)
|
.putExtra("parentId", parentId)
|
||||||
.putExtra("other", reply.text)
|
.putExtra("other", reply.text)
|
||||||
|
|
|
@ -26,7 +26,7 @@ import io.noties.markwon.editor.MarkwonEditorTextWatcher
|
||||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||||
import tachiyomi.core.util.lang.launchIO
|
import tachiyomi.core.util.lang.launchIO
|
||||||
|
|
||||||
class MarkdownCreatorActivity : AppCompatActivity() {
|
class ActivityMarkdownCreator : AppCompatActivity() {
|
||||||
private lateinit var binding: ActivityMarkdownCreatorBinding
|
private lateinit var binding: ActivityMarkdownCreatorBinding
|
||||||
private lateinit var type: String
|
private lateinit var type: String
|
||||||
private var text: String = ""
|
private var text: String = ""
|
||||||
|
@ -80,24 +80,28 @@ class MarkdownCreatorActivity : AppCompatActivity() {
|
||||||
finish()
|
finish()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
binding.markdownCreatorTitle.text = when (type) {
|
val editId = intent.getIntExtra("edit", -1)
|
||||||
"activity" -> getString(R.string.create_new_activity)
|
val userId = intent.getIntExtra("userId", -1)
|
||||||
"review" -> getString(R.string.create_new_review)
|
parentId = intent.getIntExtra("parentId", -1)
|
||||||
"message" -> getString(R.string.create_new_message)
|
when (type) {
|
||||||
"replyActivity" -> {
|
"replyActivity" -> if (parentId == -1) {
|
||||||
parentId = intent.getIntExtra("parentId", -1)
|
toast("Error: No parent ID")
|
||||||
if (parentId == -1) {
|
finish()
|
||||||
toast("Error: No parent ID")
|
return
|
||||||
finish()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
getString(R.string.create_new_reply)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> ""
|
"message" -> {
|
||||||
|
if (editId == -1) {
|
||||||
|
binding.privateCheckbox.visibility = ViewGroup.VISIBLE
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
var private = false
|
||||||
|
binding.privateCheckbox.setOnCheckedChangeListener { _, isChecked ->
|
||||||
|
private = isChecked
|
||||||
|
}
|
||||||
|
|
||||||
ping = intent.getStringExtra("other")
|
ping = intent.getStringExtra("other")
|
||||||
val userId = intent.getIntExtra("userId", -1)
|
|
||||||
text = ping ?: ""
|
text = ping ?: ""
|
||||||
binding.editText.setText(text)
|
binding.editText.setText(text)
|
||||||
binding.editText.addTextChangedListener {
|
binding.editText.addTextChangedListener {
|
||||||
|
@ -121,7 +125,7 @@ class MarkdownCreatorActivity : AppCompatActivity() {
|
||||||
setMessage(R.string.post_to_anilist_warning)
|
setMessage(R.string.post_to_anilist_warning)
|
||||||
setPositiveButton(R.string.ok) { _, _ ->
|
setPositiveButton(R.string.ok) { _, _ ->
|
||||||
launchIO {
|
launchIO {
|
||||||
val editId = intent.getIntExtra("edit", -1)
|
|
||||||
val isEdit = editId != -1
|
val isEdit = editId != -1
|
||||||
val success = when (type) {
|
val success = when (type) {
|
||||||
"activity" -> if (isEdit) {
|
"activity" -> if (isEdit) {
|
||||||
|
@ -135,11 +139,13 @@ class MarkdownCreatorActivity : AppCompatActivity() {
|
||||||
} else {
|
} else {
|
||||||
Anilist.mutation.postReply(parentId, text)
|
Anilist.mutation.postReply(parentId, text)
|
||||||
}
|
}
|
||||||
"message" -> if (isEdit) { //TODO private
|
|
||||||
Anilist.mutation.postMessage(userId , text, editId)
|
"message" -> if (isEdit) {
|
||||||
|
Anilist.mutation.postMessage(userId, text, editId)
|
||||||
} else {
|
} else {
|
||||||
Anilist.mutation.postMessage(userId , text)
|
Anilist.mutation.postMessage(userId, text, isPrivate = private)
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> "Error: Unknown type"
|
else -> "Error: Unknown type"
|
||||||
}
|
}
|
||||||
toast(success)
|
toast(success)
|
||||||
|
@ -153,7 +159,7 @@ class MarkdownCreatorActivity : AppCompatActivity() {
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.createButton.setOnLongClickListener {
|
binding.previewCheckbox.setOnClickListener {
|
||||||
isPreviewMode = !isPreviewMode
|
isPreviewMode = !isPreviewMode
|
||||||
previewMarkdown(isPreviewMode)
|
previewMarkdown(isPreviewMode)
|
||||||
if (isPreviewMode) {
|
if (isPreviewMode) {
|
||||||
|
@ -161,7 +167,6 @@ class MarkdownCreatorActivity : AppCompatActivity() {
|
||||||
} else {
|
} else {
|
||||||
toast("Preview disabled")
|
toast("Preview disabled")
|
||||||
}
|
}
|
||||||
true
|
|
||||||
}
|
}
|
||||||
binding.editText.requestFocus()
|
binding.editText.requestFocus()
|
||||||
setupMarkdownButtons()
|
setupMarkdownButtons()
|
||||||
|
@ -187,9 +192,11 @@ class MarkdownCreatorActivity : AppCompatActivity() {
|
||||||
MarkdownFormat.UNORDERED_LIST -> {
|
MarkdownFormat.UNORDERED_LIST -> {
|
||||||
lines.joinToString("\n") { "- $it" }
|
lines.joinToString("\n") { "- $it" }
|
||||||
}
|
}
|
||||||
|
|
||||||
MarkdownFormat.ORDERED_LIST -> {
|
MarkdownFormat.ORDERED_LIST -> {
|
||||||
lines.mapIndexed { index, line -> "${index + 1}. $line" }.joinToString("\n")
|
lines.mapIndexed { index, line -> "${index + 1}. $line" }.joinToString("\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
if (format.syntax.contains("%s")) {
|
if (format.syntax.contains("%s")) {
|
||||||
String.format(format.syntax, selectedText)
|
String.format(format.syntax, selectedText)
|
||||||
|
@ -222,7 +229,6 @@ class MarkdownCreatorActivity : AppCompatActivity() {
|
||||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
ViewGroup.LayoutParams.WRAP_CONTENT
|
||||||
)
|
)
|
||||||
boxBackgroundMode = TextInputLayout.BOX_BACKGROUND_OUTLINE
|
boxBackgroundMode = TextInputLayout.BOX_BACKGROUND_OUTLINE
|
||||||
hint = "Paste your link here"
|
|
||||||
isHintEnabled = true
|
isHintEnabled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,30 +247,20 @@ class MarkdownCreatorActivity : AppCompatActivity() {
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT
|
ViewGroup.LayoutParams.MATCH_PARENT
|
||||||
)
|
)
|
||||||
setPadding(64, 64, 64, 0)
|
setPadding(0, 0, 0, 0)
|
||||||
}
|
}
|
||||||
|
customAlertDialog().apply {
|
||||||
val dialog = AlertDialog.Builder(this, R.style.MyPopup).apply {
|
setTitle("Paste your link here")
|
||||||
setView(container)
|
setCustomView(container)
|
||||||
setPositiveButton(getString(R.string.ok)) { dialog, _ ->
|
setPosButton(getString(R.string.ok)) {
|
||||||
val input = inputEditText.text.toString()
|
val input = inputEditText.text.toString()
|
||||||
val formattedText = String.format(format.syntax, input)
|
val formattedText = String.format(format.syntax, input)
|
||||||
binding.editText.text?.insert(position, formattedText)
|
binding.editText.text?.insert(position, formattedText)
|
||||||
binding.editText.setSelection(position + formattedText.length)
|
binding.editText.setSelection(position + formattedText.length)
|
||||||
dialog.dismiss()
|
|
||||||
}
|
}
|
||||||
setNegativeButton(getString(R.string.cancel)) { dialog, _ ->
|
setNegButton(getString(R.string.cancel))
|
||||||
dialog.dismiss()
|
}.show()
|
||||||
}
|
|
||||||
}.create()
|
|
||||||
|
|
||||||
val widthInDp = 245
|
|
||||||
val layoutParams = ViewGroup.LayoutParams(
|
|
||||||
(widthInDp * resources.displayMetrics.density).toInt(),
|
|
||||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
|
||||||
)
|
|
||||||
dialog.window?.setLayout(layoutParams.width, layoutParams.height)
|
|
||||||
dialog.show()
|
|
||||||
inputEditText.requestFocus()
|
inputEditText.requestFocus()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,93 +1,100 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fitsSystemWindows="false">
|
android:fitsSystemWindows="false"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/markdownCreatorToolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="48dp"
|
||||||
android:orientation="vertical"
|
android:orientation="horizontal"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<FrameLayout
|
<ImageView
|
||||||
android:id="@+id/markdownCreatorToolbar"
|
android:id="@+id/markdownCreatorBack"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="48dp"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:layout_gravity="start|center_vertical"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:layout_marginStart="12dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:src="@drawable/ic_round_arrow_back_ios_new_24"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:tint="?attr/colorOnBackground"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<ImageView
|
<Space
|
||||||
android:id="@+id/markdownCreatorBack"
|
android:layout_width="0dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_weight="1" />
|
||||||
android:layout_gravity="start|center_vertical"
|
|
||||||
android:layout_marginStart="12dp"
|
|
||||||
android:src="@drawable/ic_round_arrow_back_ios_new_24"
|
|
||||||
app:tint="?attr/colorOnBackground"
|
|
||||||
tools:ignore="ContentDescription" />
|
|
||||||
|
|
||||||
<TextView
|
<CheckBox
|
||||||
android:id="@+id/markdownCreatorTitle"
|
android:id="@+id/privateCheckbox"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="48dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="end|center_vertical"
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:ellipsize="end"
|
android:visibility="gone"
|
||||||
android:fontFamily="@font/poppins_bold"
|
android:contentDescription="@string/preview"
|
||||||
android:gravity="center|start"
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
android:singleLine="true"
|
android:text="@string/private_mode"
|
||||||
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
|
tools:ignore="ContentDescription" />
|
||||||
android:textColor="?attr/colorOnBackground"
|
|
||||||
android:textSize="18sp"
|
|
||||||
tools:text="@string/placeholder" />
|
|
||||||
|
|
||||||
<Button
|
<CheckBox
|
||||||
android:id="@+id/createButton"
|
android:id="@+id/previewCheckbox"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end|center_vertical"
|
android:layout_gravity="end|center_vertical"
|
||||||
android:fontFamily="@font/poppins_bold"
|
android:layout_marginEnd="8dp"
|
||||||
android:maxLines="1"
|
android:contentDescription="@string/preview"
|
||||||
android:text="@string/publish"
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
app:cornerRadius="16dp"
|
android:text="@string/preview"
|
||||||
tools:ignore="ButtonStyle" />
|
tools:ignore="ContentDescription" />
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<ScrollView
|
<ImageButton
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/createButton"
|
||||||
android:layout_height="0dp"
|
android:layout_width="32dp"
|
||||||
android:layout_weight="1"
|
android:layout_height="32dp"
|
||||||
android:fillViewport="true">
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
<LinearLayout
|
android:background="@drawable/ic_round_send_24"
|
||||||
android:layout_width="match_parent"
|
tools:ignore="ContentDescription"
|
||||||
android:layout_height="wrap_content"
|
tools:visibility="visible" />
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="16dp">
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/editText"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="590dp"
|
|
||||||
android:fontFamily="@font/poppins"
|
|
||||||
android:inputType="textMultiLine"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:nestedScrollingEnabled="true"
|
|
||||||
android:gravity="top|start"
|
|
||||||
android:textColor="?attr/colorOnBackground"
|
|
||||||
android:textIsSelectable="true"
|
|
||||||
android:textSize="12sp"
|
|
||||||
android:hint="@string/reply_hint"
|
|
||||||
tools:ignore="LabelFor" />
|
|
||||||
</LinearLayout>
|
|
||||||
</ScrollView>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:fillViewport="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/editText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
|
android:gravity="top|start"
|
||||||
|
android:hint="@string/reply_hint"
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:nestedScrollingEnabled="true"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:textSize="18sp"
|
||||||
|
tools:ignore="LabelFor" />
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/markdownOptionsContainer"
|
android:id="@+id/markdownOptionsContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -99,155 +106,170 @@
|
||||||
android:windowSoftInputMode="adjustResize">
|
android:windowSoftInputMode="adjustResize">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/formatBold"
|
android:id="@+id/formatBold"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:padding="6dp"
|
android:padding="6dp"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/format_bold_24"
|
android:src="@drawable/format_bold_24"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/formatItalic"
|
android:id="@+id/formatItalic"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:padding="6dp"
|
android:padding="6dp"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/format_italic_24"
|
android:src="@drawable/format_italic_24"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/formatStrikethrough"
|
android:id="@+id/formatStrikethrough"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:padding="6dp"
|
android:padding="6dp"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/format_strikethrough_24"
|
android:src="@drawable/format_strikethrough_24"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/formatSpoiler"
|
android:id="@+id/formatSpoiler"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:padding="6dp"
|
android:padding="6dp"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/format_spoiler_24"
|
android:src="@drawable/format_spoiler_24"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/formatLink"
|
android:id="@+id/formatLink"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:padding="6dp"
|
android:padding="6dp"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/format_link_24"
|
android:src="@drawable/format_link_24"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/formatImage"
|
android:id="@+id/formatImage"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:padding="6dp"
|
android:padding="6dp"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/format_image_24"
|
android:src="@drawable/format_image_24"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/formatYoutube"
|
android:id="@+id/formatYoutube"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
android:padding="6dp"
|
android:padding="6dp"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/format_youtube_24"
|
android:src="@drawable/format_youtube_24"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/formatVideo"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="6dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/format_video_24"
|
|
||||||
app:tint="?attr/colorOnBackground"
|
|
||||||
tools:ignore="ContentDescription" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/formatListOrdered"
|
android:id="@+id/formatListOrdered"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:padding="6dp"
|
android:padding="6dp"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/format_list_numbered_24"
|
android:src="@drawable/format_list_numbered_24"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/formatListUnordered"
|
android:id="@+id/formatListUnordered"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:padding="6dp"
|
android:padding="6dp"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/format_list_bulleted_24"
|
android:src="@drawable/format_list_bulleted_24"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/formatTitle"
|
android:id="@+id/formatTitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:padding="6dp"
|
android:padding="6dp"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/format_title_24"
|
android:src="@drawable/format_title_24"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/formatCenter"
|
android:id="@+id/formatCenter"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:padding="6dp"
|
android:padding="6dp"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/format_align_center_24"
|
android:src="@drawable/format_align_center_24"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/formatQuote"
|
android:id="@+id/formatQuote"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:padding="6dp"
|
android:padding="6dp"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/format_quote_24"
|
android:src="@drawable/format_quote_24"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/formatCode"
|
android:id="@+id/formatCode"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:padding="6dp"
|
android:padding="6dp"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/format_code_24"
|
android:src="@drawable/format_code_24"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/formatVideo"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:padding="6dp"
|
||||||
|
android:src="@drawable/format_video_24"
|
||||||
|
app:tint="?attr/colorOnBackground"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</LinearLayout>
|
|
@ -65,19 +65,6 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/addStory"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:scaleX="2.2"
|
|
||||||
android:scaleY="2.2"
|
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
|
||||||
android:src="@drawable/ic_circle_add"
|
|
||||||
app:layout_goneMarginBottom="40dp"
|
|
||||||
app:layout_goneMarginRight="8dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/textActivityContainer"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/textActivityContainer" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -1033,5 +1033,6 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc
|
||||||
<string name="bio_prompt_info_desc">Use your fingerprint or face to unlock the app</string>
|
<string name="bio_prompt_info_desc">Use your fingerprint or face to unlock the app</string>
|
||||||
<string name="enable_forgot_password">Enable Forgot Password (hold clear button for 10 seconds)</string>
|
<string name="enable_forgot_password">Enable Forgot Password (hold clear button for 10 seconds)</string>
|
||||||
<string name="hide_notification_dot">Hide Notification Dot</string>
|
<string name="hide_notification_dot">Hide Notification Dot</string>
|
||||||
|
<string name="private_mode">Private</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue