Skip to content

Commit 7d67ce6

Browse files
committed
Adding reflector start
1 parent 1d12c92 commit 7d67ce6

File tree

7 files changed

+96
-1
lines changed

7 files changed

+96
-1
lines changed

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies {
2323
implementation fileTree(dir: 'libs', include: ['*.jar'])
2424
implementation 'androidx.appcompat:appcompat:1.0.2'
2525
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
26+
implementation 'com.google.android.material:material:1.0.0'
2627
testImplementation 'junit:junit:4.12'
2728
androidTestImplementation 'androidx.test:runner:1.2.0'
2829
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
android:roundIcon="@mipmap/ic_launcher_round"
1313
android:supportsRtl="true"
1414
android:theme="@style/AppTheme">
15-
<activity android:name=".ConnectToUserActivity"></activity>
15+
<activity android:name=".MessageListActivity"></activity>
16+
<activity android:name=".ConnectToUserActivity" />
1617
<activity android:name=".ChatActivity" />
1718
<activity android:name=".ShowInfoActivity" />
1819
<activity android:name=".MainActivity">
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.example.chatfull;
2+
3+
import androidx.appcompat.app.AppCompatActivity;
4+
5+
import android.os.Bundle;
6+
7+
public class MessageListActivity extends AppCompatActivity {
8+
9+
@Override
10+
protected void onCreate(Bundle savedInstanceState) {
11+
super.onCreate(savedInstanceState);
12+
setContentView(R.layout.activity_message_list);
13+
}
14+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<android.support.constraint.ConstraintLayout
4+
xmlns:android="http://schemas.android.com/apk/res/android"
5+
xmlns:app="http://schemas.android.com/apk/res-auto"
6+
xmlns:tools="http://schemas.android.com/tools"
7+
android:layout_width="match_parent"
8+
android:layout_height="match_parent"
9+
tools:context="com.example.chatfull.MessageListActivity">
10+
11+
<android.support.v7.widget.RecyclerView
12+
android:id="@+id/reyclerview_message_list"
13+
android:layout_width="0dp"
14+
android:layout_height="0dp"
15+
app:layout_constraintTop_toTopOf="parent"
16+
app:layout_constraintLeft_toLeftOf="parent"
17+
app:layout_constraintRight_toRightOf="parent">
18+
</android.support.v7.widget.RecyclerView>
19+
20+
<!-- A horizontal line between the chatbox and RecyclerView -->
21+
<View
22+
android:layout_width="0dp"
23+
android:layout_height="2dp"
24+
android:background="#dfdfdf"
25+
android:layout_marginBottom="0dp"
26+
app:layout_constraintBottom_toTopOf="@+id/layout_chatbox"
27+
app:layout_constraintLeft_toLeftOf="parent"
28+
app:layout_constraintRight_toRightOf="parent"/>
29+
30+
<LinearLayout
31+
android:id="@+id/layout_chatbox"
32+
android:layout_width="0dp"
33+
android:layout_height="wrap_content"
34+
android:orientation="horizontal"
35+
android:minHeight="48dp"
36+
android:background="#ffffff"
37+
app:layout_constraintBottom_toBottomOf="parent"
38+
app:layout_constraintRight_toRightOf="parent"
39+
app:layout_constraintLeft_toLeftOf="parent">
40+
41+
<EditText
42+
android:id="@+id/edittext_chatbox"
43+
android:hint="Enter message"
44+
android:background="@android:color/transparent"
45+
android:layout_gravity="center"
46+
android:layout_marginLeft="16dp"
47+
android:layout_marginRight="16dp"
48+
android:layout_width="0dp"
49+
android:layout_weight="1"
50+
android:layout_height="wrap_content"
51+
android:maxLines="6"/>
52+
53+
<Button
54+
android:id="@+id/button_chatbox_send"
55+
android:text="SEND"
56+
android:textSize="14dp"
57+
android:background="?attr/selectableItemBackground"
58+
android:clickable="true"
59+
android:layout_width="64dp"
60+
android:layout_height="48dp"
61+
android:gravity="center"
62+
android:layout_gravity="bottom" />
63+
64+
</LinearLayout>
65+
66+
</android.support.constraint.ConstraintLayout>

app/src/main/res/values/dimens.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<dimen name="fab_margin">16dp</dimen>
3+
</resources>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<resources>
22
<string name="app_name">ChatFull</string>
3+
<string name="title_activity_message_list">MessageListActivity</string>
34
</resources>

app/src/main/res/values/styles.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,13 @@
88
<item name="colorAccent">@color/colorAccent</item>
99
</style>
1010

11+
<style name="AppTheme.NoActionBar">
12+
<item name="windowActionBar">false</item>
13+
<item name="windowNoTitle">true</item>
14+
</style>
15+
16+
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
17+
18+
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
19+
1120
</resources>

0 commit comments

Comments
 (0)