mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-01-31 17:44:46 +01:00
renaming NewMessage to NewConversation, no other change
This commit is contained in:
parent
2d1df0322f
commit
ff05ec1623
@ -42,7 +42,7 @@
|
||||
android:parentActivityName=".activities.MainActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".activities.NewMessageActivity"
|
||||
android:name=".activities.NewConversationActivity"
|
||||
android:noHistory="true"
|
||||
android:parentActivityName=".activities.MainActivity">
|
||||
|
||||
|
@ -163,7 +163,7 @@ class MainActivity : SimpleActivity() {
|
||||
}
|
||||
|
||||
private fun launchNewConversation() {
|
||||
Intent(this, NewMessageActivity::class.java).apply {
|
||||
Intent(this, NewConversationActivity::class.java).apply {
|
||||
startActivity(this)
|
||||
}
|
||||
}
|
||||
|
@ -13,20 +13,20 @@ import com.simplemobiletools.smsmessenger.helpers.THREAD_ID
|
||||
import com.simplemobiletools.smsmessenger.helpers.THREAD_TEXT
|
||||
import com.simplemobiletools.smsmessenger.helpers.THREAD_TITLE
|
||||
import com.simplemobiletools.smsmessenger.models.Contact
|
||||
import kotlinx.android.synthetic.main.activity_new_message.*
|
||||
import kotlinx.android.synthetic.main.activity_conversation.*
|
||||
import kotlinx.android.synthetic.main.item_suggested_contact.view.*
|
||||
|
||||
class NewMessageActivity : SimpleActivity() {
|
||||
class NewConversationActivity : SimpleActivity() {
|
||||
private var allContacts = ArrayList<Contact>()
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_new_message)
|
||||
setContentView(R.layout.activity_conversation)
|
||||
title = getString(R.string.new_conversation)
|
||||
updateTextColors(new_message_holder)
|
||||
updateTextColors(new_conversation_holder)
|
||||
|
||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
|
||||
new_message_to.requestFocus()
|
||||
new_conversation_address.requestFocus()
|
||||
|
||||
// READ_CONTACTS permission is not mandatory, but without it we won't be able to show any suggestions during typing
|
||||
handlePermission(PERMISSION_READ_CONTACTS) {
|
||||
@ -48,7 +48,7 @@ class NewMessageActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
new_message_to.onTextChangeListener {
|
||||
new_conversation_address.onTextChangeListener {
|
||||
val searchString = it
|
||||
val filteredContacts = ArrayList<Contact>()
|
||||
allContacts.forEach {
|
||||
@ -60,12 +60,12 @@ class NewMessageActivity : SimpleActivity() {
|
||||
filteredContacts.sortWith(compareBy { !it.name.startsWith(searchString, true) })
|
||||
setupAdapter(filteredContacts)
|
||||
|
||||
new_message_confirm.beVisibleIf(searchString.length > 2)
|
||||
new_conversation_confirm.beVisibleIf(searchString.length > 2)
|
||||
}
|
||||
|
||||
new_message_confirm.applyColorFilter(config.textColor)
|
||||
new_message_confirm.setOnClickListener {
|
||||
val number = new_message_to.value
|
||||
new_conversation_confirm.applyColorFilter(config.textColor)
|
||||
new_conversation_confirm.setOnClickListener {
|
||||
val number = new_conversation_address.value
|
||||
launchThreadActivity(number, number)
|
||||
}
|
||||
}
|
@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/new_message_holder"
|
||||
android:id="@+id/new_conversation_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyEditText
|
||||
android:id="@+id/new_message_to"
|
||||
android:id="@+id/new_conversation_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/normal_icon_size"
|
||||
android:layout_marginStart="@dimen/activity_margin"
|
||||
android:layout_marginEnd="@dimen/activity_margin"
|
||||
android:layout_toStartOf="@+id/new_message_confirm"
|
||||
android:layout_toStartOf="@+id/new_conversation_confirm"
|
||||
android:background="@android:color/transparent"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/add_contact_or_number"
|
||||
@ -19,11 +19,11 @@
|
||||
android:textSize="@dimen/big_text_size" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/new_message_confirm"
|
||||
android:id="@+id/new_conversation_confirm"
|
||||
android:layout_width="@dimen/normal_icon_size"
|
||||
android:layout_height="@dimen/normal_icon_size"
|
||||
android:layout_alignTop="@+id/new_message_to"
|
||||
android:layout_alignBottom="@+id/new_message_to"
|
||||
android:layout_alignTop="@+id/new_conversation_address"
|
||||
android:layout_alignBottom="@+id/new_conversation_address"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="@dimen/medium_margin"
|
||||
@ -34,7 +34,7 @@
|
||||
android:id="@+id/message_divider_two"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_below="@+id/new_message_to"
|
||||
android:layout_below="@+id/new_conversation_address"
|
||||
android:background="@color/divider_grey"
|
||||
android:importantForAccessibility="no" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user