@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="VcsDirectoryMappings"> |
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" /> |
||||
</component> |
||||
</project> |
@ -0,0 +1,3 @@
|
||||
# SLAM_Messenger |
||||
|
||||
XMPP-Based Instant Messenger for Android |
@ -0,0 +1,22 @@
|
||||
package de.vanitasvitae.slam.ui; |
||||
|
||||
import android.content.Context; |
||||
import android.view.ViewGroup; |
||||
|
||||
import de.vanitasvitae.slam.R; |
||||
|
||||
/** |
||||
* Created by Paul Schaub on 29.01.18. |
||||
*/ |
||||
public class ChatMessage extends ViewGroup { |
||||
|
||||
public ChatMessage(Context context) { |
||||
super(context); |
||||
inflate(context, R.layout.item_chatmessage, this); |
||||
} |
||||
|
||||
@Override |
||||
protected void onLayout(boolean changed, int l, int t, int r, int b) { |
||||
|
||||
} |
||||
} |
After Width: | Height: | Size: 684 B |
After Width: | Height: | Size: 728 B |
After Width: | Height: | Size: 464 B |
After Width: | Height: | Size: 465 B |
After Width: | Height: | Size: 868 B |
After Width: | Height: | Size: 915 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.9 KiB |
@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:width="24dp" |
||||
android:height="24dp" |
||||
android:viewportWidth="24.0" |
||||
android:viewportHeight="24.0"> |
||||
<path |
||||
android:fillColor="#FF000000" |
||||
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/> |
||||
</vector> |
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:width="48dp" |
||||
android:height="48dp" |
||||
android:viewportWidth="48" |
||||
android:viewportHeight="48"> |
||||
|
||||
<path |
||||
android:fillColor="#000000" |
||||
android:pathData="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" /> |
||||
<path |
||||
android:pathData="M0 0h24v24H0z" /> |
||||
</vector> |
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:width="48dp" |
||||
android:height="48dp" |
||||
android:viewportWidth="24" |
||||
android:viewportHeight="24"> |
||||
|
||||
<path |
||||
android:fillColor="#FFFFFF" |
||||
android:pathData="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" /> |
||||
<path |
||||
android:pathData="M0 0h24v24H0z" /> |
||||
</vector> |
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent"> |
||||
|
||||
<android.support.v7.widget.RecyclerView |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:layout_above="@+id/interfaze" |
||||
android:layout_alignParentStart="true" /> |
||||
|
||||
<include layout="@layout/chat_interface" |
||||
android:id="@+id/interfaze" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:layout_alignParentBottom="true" /> |
||||
|
||||
</RelativeLayout> |
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:id="@+id/chat_interface" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
xmlns:cardview="http://schemas.android.com/apk/res-auto" |
||||
android:background="@color/primaryColor"> |
||||
|
||||
<android.support.v7.widget.CardView |
||||
android:layout_marginStart="5dp" |
||||
android:layout_marginEnd="5dp" |
||||
android:layout_marginTop="5dp" |
||||
android:layout_marginBottom="5dp" |
||||
android:layout_alignParentStart="true" |
||||
android:layout_toStartOf="@id/send_button" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
cardview:cardCornerRadius="15dp" |
||||
android:elevation="5dp"> |
||||
|
||||
<EditText |
||||
android:text="Hallo Crushiiii! Heut abend wird wieder krass gezockt und getötet! Dann bekommst du einen Uprank und kannst endlich aufhören zu heulen!" |
||||
android:id="@+id/text_input" |
||||
android:layout_marginStart="15dp" |
||||
android:layout_marginEnd="15dp" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:maxLines="4" |
||||
android:background="@android:color/transparent"/> |
||||
|
||||
</android.support.v7.widget.CardView> |
||||
|
||||
<ImageButton |
||||
android:id="@+id/send_button" |
||||
android:layout_width="48dp" |
||||
android:layout_height="48dp" |
||||
android:layout_marginEnd="5dp" |
||||
android:layout_alignParentEnd="true" |
||||
android:background="@drawable/roundcorner" |
||||
android:src="@drawable/ic_lock_black_24dp" |
||||
android:layout_centerVertical="true" |
||||
/> |
||||
|
||||
|
||||
</RelativeLayout> |
@ -1,29 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:orientation="horizontal" android:layout_width="match_parent" |
||||
android:layout_height="wrap_content"> |
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="@dimen/chatlist_vert_size"> |
||||
<ImageView |
||||
android:id="@+id/contact_image" |
||||
android:layout_width="56dp" |
||||
android:layout_height="56dp" |
||||
android:layout_margin="5dp" |
||||
android:layout_alignParentStart="true" |
||||
android:src="@drawable/ic_launcher_background"/> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="wrap_content" |
||||
<RelativeLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:orientation="vertical"> |
||||
<TextView |
||||
android:id="@+id/contact_name" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:textStyle="bold" |
||||
android:text="Max Mustermann" |
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Large"/> |
||||
<TextView |
||||
android:id="@+id/contact_last_message" |
||||
android:layout_toEndOf="@id/contact_image"> |
||||
|
||||
<RelativeLayout |
||||
android:id="@+id/upper" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content"> |
||||
|
||||
<TextView |
||||
android:id="@+id/contact_name" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_alignParentStart="true" |
||||
android:layout_toStartOf="@+id/upper_meta" |
||||
android:textStyle="bold" |
||||
android:text="Max Mustermann" |
||||
android:ellipsize="end" |
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Large"/> |
||||
|
||||
<LinearLayout |
||||
android:id="@+id/upper_meta" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:orientation="horizontal" |
||||
android:layout_centerVertical="true" |
||||
android:layout_alignParentEnd="true"> |
||||
|
||||
<ImageView |
||||
android:layout_width="24dp" |
||||
android:layout_height="24dp" |
||||
android:src="@drawable/ic_check_black_48dp"/> |
||||
|
||||
</LinearLayout> |
||||
|
||||
</RelativeLayout> |
||||
|
||||
<RelativeLayout |
||||
android:id="@+id/lower" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:text="Ich war letzte Woche noch da und..."/> |
||||
</LinearLayout> |
||||
</LinearLayout> |
||||
android:layout_below="@id/upper" |
||||
android:layout_alignParentBottom="true"> |
||||
|
||||
<FrameLayout |
||||
android:id="@+id/contact_content" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="match_parent" |
||||
android:layout_alignParentStart="true" |
||||
android:layout_toStartOf="@+id/lower_meta"> |
||||
|
||||
<TextView |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:text="Ich war letzte Woche noch da und habe mir einen eigenen Eindruck von der Lage verschafft."/> |
||||
|
||||
</FrameLayout> |
||||
|
||||
<LinearLayout |
||||
android:id="@+id/lower_meta" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_centerVertical="true" |
||||
android:orientation="horizontal" |
||||
android:layout_alignParentEnd="true"> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:text="13:37"/> |
||||
|
||||
</LinearLayout> |
||||
|
||||
</RelativeLayout> |
||||
|
||||
</RelativeLayout> |
||||
|
||||
</RelativeLayout> |
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:orientation="vertical" android:layout_width="match_parent" |
||||
android:layout_height="match_parent"> |
||||
|
||||
<ListView |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" /> |
||||
</LinearLayout> |
@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:orientation="horizontal"> |
||||
|
||||
<TextView |
||||
android:id="@+id/id" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_margin="@dimen/text_margin" |
||||
android:textAppearance="?attr/textAppearanceListItem" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/content" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_margin="@dimen/text_margin" |
||||
android:textAppearance="?attr/textAppearanceListItem" /> |
||||
</LinearLayout> |
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<android.support.v7.widget.RecyclerView 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/list" |
||||
android:name="de.vanitasvitae.slam.activity.RosterFragment" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:layout_marginLeft="16dp" |
||||
android:layout_marginRight="16dp" |
||||
app:layoutManager="LinearLayoutManager" |
||||
tools:context="de.vanitasvitae.slam.activity.RosterFragment" |
||||
tools:listitem="@layout/fragment_contact" /> |
@ -1,44 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:orientation="vertical" android:layout_width="match_parent" |
||||
android:layout_height="match_parent"> |
||||
|
||||
<RelativeLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content"> |
||||
<TextView |
||||
android:id="@+id/chatmessage_sender" |
||||
android:text="Bob" |
||||
<LinearLayout |
||||
xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
android:id="@+id/message_direction" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content"> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:orientation="horizontal"> |
||||
|
||||
<RelativeLayout |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" /> |
||||
android:layout_height="match_parent"> |
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:src="@drawable/ic_person_black_48dp" |
||||
android:layout_centerVertical="true"/> |
||||
|
||||
</RelativeLayout> |
||||
|
||||
<TextView |
||||
android:id="@+id/chatmessage_role" |
||||
android:text="Admin" |
||||
<android.support.v7.widget.CardView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_alignParentEnd="true"/> |
||||
</RelativeLayout> |
||||
app:cardCornerRadius="10dp" |
||||
android:layout_margin="5dp"> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content"> |
||||
<LinearLayout |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:orientation="vertical" |
||||
android:layout_marginStart="10dp" |
||||
android:layout_marginTop="5dp" |
||||
android:layout_marginBottom="5dp" |
||||
android:layout_marginEnd="10dp"> |
||||
|
||||
<ImageView |
||||
android:layout_width="56dp" |
||||
android:layout_height="56dp" /> |
||||
<TextView |
||||
android:id="@+id/message_sender" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:textColor="@color/secondaryDarkColor" |
||||
android:text="Alice@Wonderland.lit"/> |
||||
|
||||
<TextView |
||||
android:id="@+id/chatmessage_content" |
||||
android:text="Hallo Welt, Dies ist eine tolle Chatmessage" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" /> |
||||
</LinearLayout> |
||||
<RelativeLayout |
||||
android:id="@+id/message_content" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content"> |
||||
|
||||
<TextView |
||||
android:id="@+id/chatmessage_date" |
||||
android:text="12:30" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" /> |
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:textSize="?attr/textSizeMessageContent" |
||||
android:text="This is an example text." |
||||
/> |
||||
|
||||
<!-- |
||||
<ImageView |
||||
android:layout_width="300dp" |
||||
android:layout_height="300dp" |
||||
android:src="@drawable/ic_lock_black_24dp"/> |
||||
--> |
||||
|
||||
</RelativeLayout> |
||||
|
||||
<View style="@style/Divider" /> |
||||
|
||||
<android.support.constraint.ConstraintLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:minWidth="100dp"> |
||||
|
||||
<TextView |
||||
android:id="@+id/message_sender_role" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_gravity="end" |
||||
android:layout_marginEnd="8dp" |
||||
android:textSize="?attr/textSizeMessageMetadata" |
||||
android:text="Admin" |
||||
app:layout_constraintStart_toStartOf="parent" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/sender_date" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
android:textSize="?attr/textSizeMessageMetadata" |
||||
android:text="12:23"/> |
||||
|
||||
</android.support.constraint.ConstraintLayout> |
||||
|
||||
</LinearLayout> |
||||
|
||||
</android.support.v7.widget.CardView> |
||||
|
||||
</LinearLayout> |
||||
|
||||
</LinearLayout> |
@ -1,25 +1,39 @@
|
||||
<resources> |
||||
|
||||
<!-- Base application theme. --> |
||||
<style name="Slam" parent="Theme.AppCompat.Light.NoActionBar"> |
||||
<!-- Customize your theme here. --> |
||||
<item name="colorPrimary">@color/primaryColor</item> |
||||
<item name="colorPrimaryDark">@color/primaryDarkColor</item> |
||||
<item name="colorAccent">@color/secondaryColor</item> |
||||
|
||||
<item name="colorBackground">@android:color/background_light</item> |
||||
|
||||
<item name="textSizeMessageMetadata">10sp</item> |
||||
<item name="textSizeMessageContent">18sp</item> |
||||
|
||||
<item name="themedContactDrawable">@drawable/ic_person_black_48dp</item> |
||||
<item name="themedAddContactDrawable">@drawable/ic_person_add_black_48dp</item> |
||||
<item name="themedBookmarkDrawable">@drawable/ic_group_black_48dp</item> |
||||
<item name="themedAddBookmarkDrawable">@drawable/ic_group_add_black_48dp</item> |
||||
<item name="themedSettingsDrawable">@drawable/ic_settings_black_48dp</item> |
||||
<item name="themedSearchDrawable">@drawable/ic_search_black_48dp</item> |
||||
</style> |
||||
|
||||
<style name="Slam.Dark" parent="Theme.AppCompat.NoActionBar"> |
||||
<item name="colorBackground">@color/backgroundDark</item> |
||||
|
||||
<item name="textSizeMessageMetadata">10sp</item> |
||||
<item name="textSizeMessageContent">18sp</item> |
||||
|
||||
<item name="themedContactDrawable">@drawable/ic_person_white_48dp</item> |
||||
<item name="themedAddContactDrawable">@drawable/ic_person_add_white_48dp</item> |
||||
<item name="themedBookmarkDrawable">@drawable/ic_group_white_48dp</item> |
||||
<item name="themedAddBookmarkDrawable">@drawable/ic_group_add_white_48dp</item> |
||||
<item name="themedSettingsDrawable">@drawable/ic_settings_white_48dp</item> |
||||
<item name="themedSearchDrawable">@drawable/ic_search_white_48dp</item> |
||||
</style> |
||||
|
||||
<style name="Divider"> |
||||
<item name="android:layout_width">match_parent</item> |
||||
<item name="android:layout_height">1dp</item> |
||||
<item name="android:background">?android:attr/listDivider</item> |
||||
</style> |
||||
</resources> |
||||
|