added account title to chat(s) and calls pages
This commit is contained in:
@ -10,6 +10,7 @@ import android.util.Log
|
||||
import android.view.MenuItem
|
||||
import android.widget.AdapterView
|
||||
import android.widget.ListView
|
||||
import android.widget.TextView
|
||||
import java.io.File
|
||||
import java.io.FileInputStream
|
||||
import java.io.FileOutputStream
|
||||
@ -28,15 +29,18 @@ class CallsActivity : AppCompatActivity() {
|
||||
|
||||
public override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_calls)
|
||||
|
||||
val listView = findViewById(R.id.calls) as ListView
|
||||
setContentView(R.layout.activity_calls)
|
||||
|
||||
val aor = intent.extras.getString("aor")
|
||||
val ua = Account.findUa(aor)!!
|
||||
|
||||
aorGenerateHistory(aor)
|
||||
val headerView = findViewById(R.id.account) as TextView
|
||||
val headerText = "Account ${aor.substringAfter(":")}"
|
||||
headerView.text = headerText
|
||||
|
||||
val listView = findViewById(R.id.calls) as ListView
|
||||
aorGenerateHistory(aor)
|
||||
val adapter = CallListAdapter(this, uaHistory)
|
||||
listView.adapter = adapter
|
||||
listView.isLongClickable = true
|
||||
|
||||
@ -57,9 +57,12 @@ class ChatActivity : AppCompatActivity() {
|
||||
}
|
||||
setTitle("Chat with $chatPeer")
|
||||
|
||||
chatMessages = uaPeerMessages(aor, peerUri)
|
||||
val headerView = findViewById(R.id.account) as TextView
|
||||
val headerText = "Account ${aor.substringAfter(":")}"
|
||||
headerView.text = headerText
|
||||
|
||||
val listView = findViewById(R.id.messages) as ListView
|
||||
chatMessages = uaPeerMessages(aor, peerUri)
|
||||
mlAdapter = MessageListAdapter(this, chatMessages)
|
||||
listView.adapter = mlAdapter
|
||||
listView.isLongClickable = true
|
||||
|
||||
@ -34,8 +34,12 @@ class ChatsActivity: AppCompatActivity() {
|
||||
plusButton = findViewById(R.id.plusButton) as ImageButton
|
||||
|
||||
aor = intent.extras.getString("aor")
|
||||
uaMessages = uaMessages(aor)
|
||||
|
||||
val headerView = findViewById(R.id.account) as TextView
|
||||
val headerText = "Account ${aor.substringAfter(":")}"
|
||||
headerView.text = headerText
|
||||
|
||||
uaMessages = uaMessages(aor)
|
||||
clAdapter = ChatListAdapter(this, uaMessages)
|
||||
listView.adapter = clAdapter
|
||||
listView.isLongClickable = true
|
||||
|
||||
@ -9,10 +9,19 @@
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context=".CallsActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal" >
|
||||
</TextView>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/calls"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" />
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_below="@id/account" >
|
||||
</ListView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@ -9,11 +9,19 @@
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context=".ChatActivity" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal" >
|
||||
</TextView>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/messages"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:transcriptMode="alwaysScroll"
|
||||
android:layout_below="@id/account"
|
||||
android:layout_above="@id/text" >
|
||||
</ListView>
|
||||
|
||||
|
||||
@ -9,10 +9,18 @@
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context=".ChatsActivity" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/account"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal" >
|
||||
</TextView>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/chats"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_below="@+id/account">
|
||||
</ListView>
|
||||
|
||||
<AutoCompleteTextView
|
||||
|
||||
Reference in New Issue
Block a user