mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-06-05 21:49:22 +02:00
redesigning New Conversation screen
This commit is contained in:
@@ -16,6 +16,7 @@ import com.simplemobiletools.smsmessenger.adapters.ContactsAdapter
|
|||||||
import com.simplemobiletools.smsmessenger.extensions.getSuggestedContacts
|
import com.simplemobiletools.smsmessenger.extensions.getSuggestedContacts
|
||||||
import com.simplemobiletools.smsmessenger.extensions.getThreadId
|
import com.simplemobiletools.smsmessenger.extensions.getThreadId
|
||||||
import com.simplemobiletools.smsmessenger.helpers.*
|
import com.simplemobiletools.smsmessenger.helpers.*
|
||||||
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
import kotlinx.android.synthetic.main.activity_new_conversation.*
|
import kotlinx.android.synthetic.main.activity_new_conversation.*
|
||||||
import kotlinx.android.synthetic.main.item_suggested_contact.view.*
|
import kotlinx.android.synthetic.main.item_suggested_contact.view.*
|
||||||
import java.net.URLDecoder
|
import java.net.URLDecoder
|
||||||
@@ -26,11 +27,15 @@ class NewConversationActivity : SimpleActivity() {
|
|||||||
private var privateContacts = ArrayList<SimpleContact>()
|
private var privateContacts = ArrayList<SimpleContact>()
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
isMaterialActivity = true
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_new_conversation)
|
setContentView(R.layout.activity_new_conversation)
|
||||||
title = getString(R.string.new_conversation)
|
title = getString(R.string.new_conversation)
|
||||||
updateTextColors(new_conversation_holder)
|
updateTextColors(new_conversation_holder)
|
||||||
|
|
||||||
|
updateMaterialActivityViews(new_conversation_coordinator, contacts_list, true)
|
||||||
|
setupMaterialScrollListener(contacts_list, new_conversation_toolbar)
|
||||||
|
|
||||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
|
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
|
||||||
new_conversation_address.requestFocus()
|
new_conversation_address.requestFocus()
|
||||||
|
|
||||||
@@ -45,6 +50,7 @@ class NewConversationActivity : SimpleActivity() {
|
|||||||
setupToolbar(new_conversation_toolbar, NavigationIcon.Arrow)
|
setupToolbar(new_conversation_toolbar, NavigationIcon.Arrow)
|
||||||
no_contacts_placeholder_2.setTextColor(getProperPrimaryColor())
|
no_contacts_placeholder_2.setTextColor(getProperPrimaryColor())
|
||||||
no_contacts_placeholder_2.underlineText()
|
no_contacts_placeholder_2.underlineText()
|
||||||
|
suggestions_label.setTextColor(getProperPrimaryColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initContacts() {
|
private fun initContacts() {
|
||||||
|
@@ -5,11 +5,6 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
|
||||||
android:id="@+id/new_conversation_app_bar_layout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/new_conversation_toolbar"
|
android:id="@+id/new_conversation_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -18,18 +13,11 @@
|
|||||||
app:title="@string/new_conversation"
|
app:title="@string/new_conversation"
|
||||||
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/new_conversation_nested_scrollview"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/new_conversation_holder"
|
android:id="@+id/new_conversation_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="?attr/actionBarSize">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyEditText
|
<com.simplemobiletools.commons.views.MyEditText
|
||||||
android:id="@+id/new_conversation_address"
|
android:id="@+id/new_conversation_address"
|
||||||
@@ -56,13 +44,12 @@
|
|||||||
android:src="@drawable/ic_check_vector"
|
android:src="@drawable/ic_check_vector"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<View
|
<ImageView
|
||||||
android:id="@+id/message_divider_two"
|
android:id="@+id/add_contact_divider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="@dimen/divider_height"
|
||||||
android:layout_below="@+id/new_conversation_address"
|
android:layout_below="@+id/new_conversation_address"
|
||||||
android:background="@color/divider_grey"
|
android:background="@color/divider_grey" />
|
||||||
android:importantForAccessibility="no" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/no_contacts_placeholder"
|
android:id="@+id/no_contacts_placeholder"
|
||||||
@@ -95,11 +82,12 @@
|
|||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/suggestions_label"
|
android:id="@+id/suggestions_label"
|
||||||
|
style="@style/MaterialSectionLabelStyle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/message_divider_two"
|
android:layout_below="@+id/add_contact_divider"
|
||||||
android:alpha="0.8"
|
android:layout_marginStart="@dimen/activity_margin"
|
||||||
android:padding="@dimen/activity_margin"
|
android:layout_marginBottom="@dimen/medium_margin"
|
||||||
android:text="@string/suggestions"
|
android:text="@string/suggestions"
|
||||||
android:textSize="@dimen/normal_text_size" />
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
@@ -119,6 +107,7 @@
|
|||||||
android:divider="@drawable/linear_layout_horizontal_divider"
|
android:divider="@drawable/linear_layout_horizontal_divider"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:showDividers="middle" />
|
android:showDividers="middle" />
|
||||||
|
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyRecyclerView
|
<com.simplemobiletools.commons.views.MyRecyclerView
|
||||||
@@ -151,5 +140,4 @@
|
|||||||
android:layout_toStartOf="@+id/contacts_letter_fastscroller" />
|
android:layout_toStartOf="@+id/contacts_letter_fastscroller" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
Reference in New Issue
Block a user