forked from hush/SilentDragonAndroid-old
28 changed files with 753 additions and 98 deletions
@ -0,0 +1,7 @@ |
|||
package org.myhush.silentdragon |
|||
|
|||
object Addressbook { |
|||
class Contact(){ var firstName = ""; var lastName = ""; var zAddress = "" } |
|||
|
|||
val contactList = ArrayList<Contact>() |
|||
} |
@ -0,0 +1,84 @@ |
|||
package org.myhush.silentdragon.chat |
|||
|
|||
import android.app.AlertDialog |
|||
import android.content.Intent |
|||
import android.os.Bundle |
|||
import android.support.v4.app.FragmentTransaction |
|||
import android.support.v7.app.AppCompatActivity |
|||
import android.text.InputType |
|||
import android.view.Menu |
|||
import android.view.MenuItem |
|||
import android.widget.EditText |
|||
import kotlinx.android.synthetic.main.activity_chat.* |
|||
import org.myhush.silentdragon.MainActivity |
|||
import org.myhush.silentdragon.R |
|||
import org.myhush.silentdragon.ReceiveActivity |
|||
import org.myhush.silentdragon.SendActivity |
|||
|
|||
class ChatActivity : AppCompatActivity() { |
|||
|
|||
override fun onCreate(savedInstanceState: Bundle?) { |
|||
super.onCreate(savedInstanceState) |
|||
setContentView(R.layout.activity_chat) |
|||
|
|||
initListener() |
|||
restoreSoonChats() // TODO: @N1CK145 |
|||
} |
|||
|
|||
private fun restoreSoonChats() { |
|||
addChat("Nil", "Armstrong") |
|||
} |
|||
|
|||
private fun initListener(){ |
|||
nav_view.setOnNavigationItemSelectedListener { |
|||
when(it.itemId) { |
|||
R.id.action_send -> { |
|||
val intent = Intent(this, SendActivity::class.java) |
|||
startActivity(intent) |
|||
return@setOnNavigationItemSelectedListener true |
|||
} |
|||
R.id.action_bal -> { |
|||
val intent = Intent(this, MainActivity::class.java) |
|||
startActivity(intent) |
|||
return@setOnNavigationItemSelectedListener true |
|||
} |
|||
R.id.action_chat -> true |
|||
R.id.action_recieve -> { |
|||
val intent = Intent(this, ReceiveActivity::class.java) |
|||
startActivity(intent) |
|||
return@setOnNavigationItemSelectedListener true |
|||
} |
|||
else -> { |
|||
return@setOnNavigationItemSelectedListener false |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
private fun addChat(firstName: String, lastName: String){ |
|||
val fragment = ChatItemFragment() |
|||
val fragTx: FragmentTransaction = supportFragmentManager.beginTransaction() |
|||
|
|||
fragment.firstName = firstName |
|||
fragment.lastName = lastName |
|||
|
|||
fragTx.add(R.id.ChatTable, fragment) |
|||
fragTx.commit() |
|||
} |
|||
|
|||
override fun onCreateOptionsMenu(menu: Menu): Boolean { |
|||
// Inflate the menu; this adds items to the action bar if it is present. |
|||
menuInflater.inflate(R.menu.menu_chat, menu) |
|||
return true |
|||
} |
|||
|
|||
override fun onOptionsItemSelected(item: MenuItem): Boolean { |
|||
return when (item.itemId) { |
|||
R.id.action_addChat -> { |
|||
// TODO: Create "createContactActivity" |
|||
return true |
|||
} |
|||
else -> super.onOptionsItemSelected(item) |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,44 @@ |
|||
package org.myhush.silentdragon.chat |
|||
|
|||
import android.content.Intent |
|||
import android.os.Bundle |
|||
import android.support.v4.app.Fragment |
|||
import android.view.LayoutInflater |
|||
import android.view.View |
|||
import android.view.ViewGroup |
|||
import android.widget.TextView |
|||
import org.myhush.silentdragon.DataModel |
|||
import org.myhush.silentdragon.R |
|||
|
|||
class ChatItemFragment : Fragment() { |
|||
var firstName: String = "" |
|||
var lastName: String = "" |
|||
var lastMessage: String = "No messages..." |
|||
var v: View? = null |
|||
|
|||
override fun onCreateView (inflater: LayoutInflater, container: ViewGroup?, |
|||
savedInstanceState: Bundle?): View { |
|||
v = inflater.inflate(R.layout.fragment_chat_item, container, false) |
|||
|
|||
updateData() |
|||
initListener() |
|||
return v!! |
|||
} |
|||
|
|||
private fun initListener() { |
|||
v?.setOnClickListener { |
|||
val intent = Intent(activity, ConversationActivity::class.java) |
|||
|
|||
intent.putExtra("displayName", "$firstName $lastName") // Send some information |
|||
|
|||
startActivity(intent) |
|||
} |
|||
} |
|||
|
|||
fun updateData(){ |
|||
v!!.findViewById<TextView>(R.id.textViewContactName).text = "$firstName $lastName" |
|||
v!!.findViewById<TextView>(R.id.textViewLastMessage).text = lastMessage |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
package org.myhush.silentdragon.chat |
|||
|
|||
import android.content.Context |
|||
import android.support.v7.app.AppCompatActivity |
|||
import android.os.Bundle |
|||
import android.support.v4.app.FragmentTransaction |
|||
import android.util.AttributeSet |
|||
import android.view.View |
|||
import android.view.Window |
|||
import android.widget.TextView |
|||
import kotlinx.android.synthetic.main.fragment_conversation_item_send.* |
|||
import org.myhush.silentdragon.R |
|||
import org.myhush.silentdragon.conversation_item_recive |
|||
import org.myhush.silentdragon.conversation_item_send |
|||
|
|||
class ConversationActivity : AppCompatActivity() { |
|||
var displayName = "" |
|||
var messages = HashMap<Boolean, String>() |
|||
|
|||
override fun onCreate(savedInstanceState: Bundle?) { |
|||
super.onCreate(savedInstanceState) |
|||
setContentView(R.layout.activity_conversation) |
|||
|
|||
displayName = intent.extras.get("displayName").toString() |
|||
|
|||
restoreChat() |
|||
} |
|||
|
|||
private fun restoreChat(){ |
|||
//addMessage("Lorem Ipsum", true) |
|||
//addMessage("Lorem Ipsum", true) |
|||
//addMessage("Lorem Ipsum", false) |
|||
//addMessage("Lorem Ipsum", true) |
|||
} |
|||
|
|||
|
|||
|
|||
fun addMessage(message: String, recived: Boolean){ |
|||
val fragTx: FragmentTransaction = supportFragmentManager.beginTransaction() |
|||
|
|||
if(recived){ |
|||
val fragment = conversation_item_recive() |
|||
fragment.message.text = message |
|||
fragTx.add(R.id.MessageList, fragment) |
|||
|
|||
}else{ |
|||
val fragment = conversation_item_send() |
|||
fragment.message.text = message |
|||
fragTx.add(R.id.MessageList, fragment) |
|||
} |
|||
fragTx.commit() |
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
package org.myhush.silentdragon |
|||
|
|||
import android.os.Bundle |
|||
import android.support.v4.app.Fragment |
|||
import android.view.LayoutInflater |
|||
import android.view.View |
|||
import android.view.ViewGroup |
|||
|
|||
class conversation_item_recive : Fragment() { |
|||
|
|||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, |
|||
savedInstanceState: Bundle?): View? { |
|||
// Inflate the layout for this fragment |
|||
var v: View = inflater.inflate(R.layout.fragment_conversation_item_recive, container, false) |
|||
return v |
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
package org.myhush.silentdragon |
|||
|
|||
import android.os.Bundle |
|||
import android.support.v4.app.Fragment |
|||
import android.view.LayoutInflater |
|||
import android.view.View |
|||
import android.view.ViewGroup |
|||
|
|||
class conversation_item_send : Fragment() { |
|||
|
|||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, |
|||
savedInstanceState: Bundle?): View? { |
|||
// Inflate the layout for this fragment |
|||
var v: View = inflater.inflate(R.layout.fragment_conversation_item_send, container, false) |
|||
return v |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
|||
android:shape="rectangle" android:padding="10dp"> |
|||
<solid android:color="@color/message_recive"/> |
|||
<corners |
|||
android:bottomRightRadius="15dp" |
|||
android:bottomLeftRadius="15dp" |
|||
android:topLeftRadius="15dp" |
|||
android:topRightRadius="15dp"/> |
|||
</shape> |
@ -0,0 +1,10 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
|||
android:shape="rectangle" android:padding="10dp"> |
|||
<solid android:color="@color/message_send"/> |
|||
<corners |
|||
android:bottomRightRadius="15dp" |
|||
android:bottomLeftRadius="15dp" |
|||
android:topLeftRadius="15dp" |
|||
android:topRightRadius="15dp"/> |
|||
</shape> |
After Width: | Height: | Size: 170 B |
After Width: | Height: | Size: 186 B |
After Width: | Height: | Size: 98 B |
After Width: | Height: | Size: 144 B |
@ -0,0 +1,10 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
|||
android:shape="rectangle" android:padding="10dp"> |
|||
<solid android:color="#ffaaaaaa"/> |
|||
<corners |
|||
android:bottomRightRadius="30dp" |
|||
android:bottomLeftRadius="30dp" |
|||
android:topLeftRadius="30dp" |
|||
android:topRightRadius="30dp"/> |
|||
</shape> |
@ -0,0 +1,10 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
|||
android:shape="rectangle" android:padding="10dp"> |
|||
<solid android:color="@color/charcole"/> |
|||
<corners |
|||
android:bottomRightRadius="15dp" |
|||
android:bottomLeftRadius="15dp" |
|||
android:topLeftRadius="15dp" |
|||
android:topRightRadius="15dp"/> |
|||
</shape> |
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
android:id="@+id/container" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent"> |
|||
|
|||
<include |
|||
android:id="@+id/include" |
|||
layout="@layout/content_chat_list" |
|||
android:layout_width="0dp" |
|||
android:layout_height="0dp" |
|||
app:layout_constraintBottom_toTopOf="@+id/nav_view" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" /> |
|||
|
|||
<android.support.design.widget.BottomNavigationView |
|||
android:id="@+id/nav_view" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:background="?android:attr/windowBackground" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintLeft_toLeftOf="parent" |
|||
app:layout_constraintRight_toRightOf="parent" |
|||
app:menu="@menu/menu_nav" /> |
|||
|
|||
</android.support.constraint.ConstraintLayout> |
@ -0,0 +1,122 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
tools:context=".conversation_item_recive" > |
|||
|
|||
<android.support.constraint.ConstraintLayout |
|||
android:id="@+id/constraintLayout4" |
|||
android:layout_width="0dp" |
|||
android:layout_height="76dp" |
|||
android:background="#2d2d2d" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent"> |
|||
|
|||
<TextView |
|||
android:id="@+id/textViewContactName2" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="18dp" |
|||
android:text="Peter Parker" |
|||
android:textColor="#ffffff" |
|||
android:textSize="20sp" |
|||
android:textStyle="bold" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintStart_toEndOf="@+id/imageProfilePicture2" |
|||
app:layout_constraintTop_toTopOf="parent" /> |
|||
|
|||
<ImageView |
|||
android:id="@+id/imageProfilePicture2" |
|||
android:layout_width="56dp" |
|||
android:layout_height="56dp" |
|||
android:layout_marginStart="16dp" |
|||
android:background="@drawable/profile_image" |
|||
android:visibility="visible" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" |
|||
tools:src="@mipmap/ic_launcher_dragon_foreground" |
|||
tools:visibility="visible" /> |
|||
</android.support.constraint.ConstraintLayout> |
|||
|
|||
<ScrollView |
|||
android:layout_width="0dp" |
|||
android:layout_height="0dp" |
|||
app:layout_constraintBottom_toTopOf="@+id/constraintLayout3" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout4"> |
|||
|
|||
<LinearLayout |
|||
android:id="@+id/MessageList" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"> |
|||
|
|||
<fragment |
|||
android:id="@+id/fragment3" |
|||
android:name="org.myhush.silentdragon.conversation_item_recive" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
tools:layout="@layout/fragment_conversation_item_recive" /> |
|||
|
|||
<fragment |
|||
android:id="@+id/fragment4" |
|||
android:name="org.myhush.silentdragon.conversation_item_send" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
tools:layout="@layout/fragment_conversation_item_send" /> |
|||
|
|||
<fragment |
|||
android:id="@+id/fragment2" |
|||
android:name="org.myhush.silentdragon.conversation_item_recive" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
tools:layout="@layout/fragment_conversation_item_recive" /> |
|||
|
|||
<fragment |
|||
android:id="@+id/fragment" |
|||
android:name="org.myhush.silentdragon.conversation_item_send" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
tools:layout="@layout/fragment_conversation_item_send" /> |
|||
</LinearLayout> |
|||
</ScrollView> |
|||
|
|||
<android.support.constraint.ConstraintLayout |
|||
android:id="@+id/constraintLayout3" |
|||
android:layout_width="0dp" |
|||
android:layout_height="50dp" |
|||
android:background="@drawable/rounded_corner" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent"> |
|||
|
|||
<ImageButton |
|||
android:id="@+id/buttonSend" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="0dp" |
|||
android:layout_marginEnd="5dp" |
|||
android:src="@drawable/send_selector" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" /> |
|||
|
|||
<EditText |
|||
android:id="@+id/userInput" |
|||
android:layout_width="0dp" |
|||
android:layout_height="0dp" |
|||
android:layout_marginStart="10dp" |
|||
android:ems="10" |
|||
android:hint="Click to send a message..." |
|||
android:inputType="textPersonName" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintEnd_toStartOf="@+id/buttonSend" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" /> |
|||
</android.support.constraint.ConstraintLayout> |
|||
|
|||
</android.support.constraint.ConstraintLayout> |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:id="@+id/nestedScrollView" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
app:layout_behavior="@string/appbar_scrolling_view_behavior"> |
|||
|
|||
<ScrollView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent"> |
|||
|
|||
<LinearLayout |
|||
android:id="@+id/ChatTable" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"/> |
|||
</ScrollView> |
|||
</android.support.constraint.ConstraintLayout> |
@ -0,0 +1,105 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="76dp" |
|||
android:background="#2d2d2d"> |
|||
|
|||
<ImageView |
|||
android:id="@+id/imageProfilePicture" |
|||
android:layout_width="56dp" |
|||
android:layout_height="56dp" |
|||
android:layout_marginStart="16dp" |
|||
android:background="@drawable/profile_image" |
|||
android:visibility="visible" |
|||
app:layout_constraintBottom_toTopOf="@+id/divider6" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" |
|||
tools:visibility="visible" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/unread_indicator" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="end|top" |
|||
android:layout_marginTop="1dp" |
|||
android:layout_marginEnd="1dp" |
|||
android:height="20dp" |
|||
android:background="@drawable/rounded_corner" |
|||
android:fontFamily="sans-serif-medium" |
|||
android:gravity="center" |
|||
android:minWidth="20dp" |
|||
android:textColor="#fff" |
|||
android:visibility="gone" |
|||
app:layout_constraintEnd_toEndOf="@+id/imageProfilePicture" |
|||
app:layout_constraintTop_toTopOf="@+id/imageProfilePicture" |
|||
app:lineHeight="1dp" |
|||
tools:text="1" |
|||
tools:visibility="invisible" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/textViewContactName" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="8dp" |
|||
android:layout_marginTop="8dp" |
|||
android:text="Peter Parker" |
|||
android:textColor="#ffffff" |
|||
android:textSize="17sp" |
|||
android:textStyle="bold" |
|||
app:layout_constraintStart_toEndOf="@+id/imageProfilePicture" |
|||
app:layout_constraintTop_toTopOf="parent" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/textViewLastMessage" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="8dp" |
|||
android:layout_marginEnd="35dp" |
|||
android:maxWidth="300dp" |
|||
android:maxLines="2" |
|||
android:text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod" |
|||
android:textColor="#aaffffff" |
|||
android:textSize="13sp" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toEndOf="@+id/imageProfilePicture" |
|||
app:layout_constraintTop_toBottomOf="@+id/textViewContactName" |
|||
tools:text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/textViewTime" |
|||
android:layout_width="28dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginTop="8dp" |
|||
android:layout_marginEnd="8dp" |
|||
android:text="10min" |
|||
android:textColor="#fff" |
|||
android:textSize="10sp" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" /> |
|||
|
|||
<ImageView |
|||
android:id="@+id/read_indicator" |
|||
android:layout_width="20dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center_vertical|end" |
|||
android:layout_marginEnd="8dp" |
|||
android:layout_marginBottom="8dp" |
|||
android:paddingStart="2dp" |
|||
android:src="@drawable/ic_delivery_status_read" |
|||
android:tint="#77ffffff" |
|||
android:visibility="gone" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
tools:visibility="visible" /> |
|||
|
|||
<View |
|||
android:id="@+id/divider6" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="2dp" |
|||
android:background="@color/charcole" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
tools:layout_editor_absoluteX="0dp" /> |
|||
|
|||
</android.support.constraint.ConstraintLayout> |
@ -0,0 +1,21 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
tools:context=".conversation_item_send" > |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="9dp" |
|||
android:layout_marginTop="10dp" |
|||
android:background="@drawable/chat_background_recive" |
|||
android:maxWidth="260sp" |
|||
android:padding="10sp" |
|||
android:text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr" |
|||
android:textColor="@color/message_text" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" /> |
|||
</android.support.constraint.ConstraintLayout> |
@ -0,0 +1,37 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
tools:context=".conversation_item_send" > |
|||
|
|||
<TextView |
|||
android:id="@+id/message" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginTop="10dp" |
|||
android:layout_marginEnd="9dp" |
|||
android:background="@drawable/chat_background_send" |
|||
android:maxWidth="260sp" |
|||
android:paddingLeft="10sp" |
|||
android:paddingTop="10sp" |
|||
android:paddingRight="5sp" |
|||
android:paddingBottom="25sp" |
|||
android:text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." |
|||
android:textColor="@color/message_text" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/Time" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="10dp" |
|||
android:layout_marginBottom="5dp" |
|||
android:text="10:15 AM" |
|||
android:textColor="@color/message_text" |
|||
android:textSize="12sp" |
|||
app:layout_constraintBottom_toBottomOf="@+id/message" |
|||
app:layout_constraintStart_toStartOf="@+id/message" /> |
|||
</android.support.constraint.ConstraintLayout> |
@ -0,0 +1,7 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"> |
|||
|
|||
<item |
|||
android:id="@+id/action_addChat" |
|||
android:title="AddChat" /> |
|||
</menu> |
@ -1,13 +1,28 @@ |
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
tools:context="org.myhush.silentdragon.MainActivity"> |
|||
<item android:id="@+id/action_send" |
|||
android:title="Send" |
|||
android:orderInCategory="300" |
|||
app:showAsAction="never" android:icon="@drawable/send_selector"/> |
|||
<item android:title="Balance" android:id="@+id/action_bal" android:icon="@drawable/balance_selector" |
|||
android:orderInCategory="200"/> |
|||
<item android:title="Receive" android:id="@+id/action_recieve" android:icon="@drawable/receive_selector" |
|||
android:orderInCategory="100"/> |
|||
|
|||
<item android:title="Send" |
|||
android:id="@+id/action_send" |
|||
android:icon="@drawable/send_selector" |
|||
android:tint="@color/white_unselected" |
|||
android:orderInCategory="300"/> |
|||
|
|||
<item android:title="Balance" |
|||
android:id="@+id/action_bal" |
|||
android:icon="@drawable/balance_selector" |
|||
android:tint="@color/white_unselected" |
|||
android:orderInCategory="200"/> |
|||
|
|||
<item android:title="Receive" |
|||
android:id="@+id/action_recieve" |
|||
android:icon="@drawable/receive_selector" |
|||
android:tint="@color/white_unselected" |
|||
android:orderInCategory="100"/> |
|||
|
|||
<item android:title="Chat" |
|||
android:id="@+id/action_chat" |
|||
android:icon="@drawable/ic_keyboard_icon" |
|||
android:tint="@color/white_unselected" |
|||
android:orderInCategory="100"/> |
|||
</menu> |
|||
|
Loading…
Reference in new issue