diff --git a/app/sampledata/messages.json b/app/sampledata/messages.json new file mode 100644 index 0000000000000000000000000000000000000000..6e33c474692c438796bf36b774170de7d323aa6a --- /dev/null +++ b/app/sampledata/messages.json @@ -0,0 +1,258 @@ +{ + "data": [ + [ + [ + { + "id": 35465155, + "time": "02:51", + "message": "justJanne: https://s3.kuschku.de/releases/quasseldroid-ng/QuasselDroidNG-v0.3.0-197-g8f556b6-release.apk" + }, + { + "id": 35465242, + "time": "02:53", + "message": "justJanne: personally, I always use solarized light during the day, and solarized dark during the night" + }, + { + "id": 35465311, + "time": "02:55", + "message": "captainepoch: are colours being customizable? :S" + }, + { + "id": 35465417, + "time": "02:57", + "message": "Exterminador: maybe ™" + }, + { + "id": 35465419, + "time": "02:57", + "message": "Exterminador: lol" + }, + { + "id": 35465428, + "time": "02:57", + "message": "justJanne: captainepoch: I tried that in -NG, it’s basically impossible in Android" + }, + { + "id": 35465436, + "time": "02:57", + "message": "justJanne: if you suggest a theme, I’ll add it, though" + }, + { + "id": 35465475, + "time": "02:58", + "message": "romibi: good thing then that you can do the impossible :D … (at least it appears like it sometimes)" + }, + { + "id": 35465477, + "time": "02:58", + "message": "romibi: :P" + }, + { + "id": 35465481, + "time": "02:58", + "message": "captainepoch: It's not that I appreciate the effort, but I never liked the solarized theme... I could work in one, maybe" + }, + { + "id": 35465487, + "time": "02:58", + "message": "captainepoch: I use the dark theme in the actual quasseldroid f-droid's build" + }, + { + "id": 35465490, + "time": "02:58", + "message": "captainepoch: I like it" + }, + { + "id": 35465509, + "time": "02:58", + "message": "justJanne: captainepoch: look at https://quasseldroid.info/#make_it_yours" + }, + { + "id": 35465513, + "time": "02:59", + "message": "justJanne: it has more than just one theme already" + }, + { + "id": 35465563, + "time": "03:00", + "message": "captainepoch: the second or the last one are of my liking :)" + }, + { + "id": 35465716, + "time": "03:03", + "message": "romibi: oh … those are quite new screenshots" + }, + { + "id": 35465798, + "time": "03:05", + "message": "captainepoch: I installed the new client" + }, + { + "id": 35465800, + "time": "03:05", + "message": "captainepoch: Pretty awesome" + }, + { + "id": 35466133, + "time": "03:13", + "message": "amiconn: justJanne: Late4st build is still showing an empty list...?" + }, + { + "id": 35466403, + "time": "03:21", + "message": "Exterminador: uninstall and reinstall" + }, + { + "id": 35466407, + "time": "03:21", + "message": "Exterminador: I had to do that" + }, + { + "id": 35466414, + "time": "03:21", + "message": "amiconn: eek" + }, + { + "id": 35466439, + "time": "03:22", + "message": "Exterminador: like justJanne said, it's a test product, don't have migrations in place yet" + }, + { + "id": 35466544, + "time": "03:25", + "message": "amiconn: Deleting data was sufficient." + }, + { + "id": 35466578, + "time": "03:26", + "message": "amiconn: Enter seems to work properly now, thanks :)" + }, + { + "id": 35466616, + "time": "03:27", + "message": "amiconn: Unfortunately there's a new bug: in the input box, the top part of full-height letters is cut of" + }, + { + "id": 35466767, + "time": "03:34", + "message": "Exterminador: in my soft keyboard, I have the emoji button" + }, + { + "id": 35466770, + "time": "03:34", + "message": "Exterminador: I have to use the on screen send button" + }, + { + "id": 35467009, + "time": "03:43", + "message": "Exterminador: justJanne, no pressure on this tho. but can the netsplit message be improved to display the users that have quitted due to the netsplit?" + }, + { + "id": 35467031, + "time": "03:43", + "message": "Exterminador: right now we now how many users have splitted but not which" + }, + { + "id": 35467158, + "time": "03:48", + "message": "justJanne: Exterminador: It'll soon have a button to expand the message, at which time it will show all users. Soon." + }, + { + "id": 35467183, + "time": "03:49", + "message": "Exterminador: alright!" + }, + { + "id": 35467237, + "time": "03:52", + "message": "Exterminador: justJanne: (big) bug. there's one person that have pmed me and isn't appearing in the list. although it appears in other chat app when I connect to the znc" + }, + { + "id": 35467394, + "time": "03:55", + "message": "Exterminador: wait.." + }, + { + "id": 35467429, + "time": "03:56", + "message": "Exterminador: my bad. sorry. :x" + }, + { + "id": 35467442, + "time": "03:56", + "message": "Exterminador: I was looking in the wrong network" + }, + { + "id": 35468622, + "time": "04:25", + "message": "justJanne: New version! https://s3.kuschku.de/releases/quasseldroid-ng/QuasselDroidNG-v0.3.0-199-gac691ac-release.apk" + }, + { + "id": 35468623, + "time": "04:25", + "message": "justJanne: New themes! https://quasseldroid.info/#make_it_yours" + }, + { + "id": 35468635, + "time": "04:26", + "message": "captainepoch: another release?" + }, + { + "id": 35468637, + "time": "04:26", + "message": "captainepoch: leul" + }, + { + "id": 35468645, + "time": "04:26", + "message": "captainepoch: what is the changelog? :|" + }, + { + "id": 35468682, + "time": "04:28", + "message": "justJanne: captainepoch: there’s new themes" + }, + { + "id": 35468684, + "time": "04:28", + "message": "justJanne: and some minor bugfixes" + }, + { + "id": 35468701, + "time": "04:28", + "message": "justJanne: captainepoch: this is an alpha – new versions are published every few hours" + }, + { + "id": 35468702, + "time": "04:28", + "message": "captainepoch: wou" + }, + { + "id": 35468705, + "time": "04:28", + "message": "justJanne: every time with new features, new bugfixes, and new bugs" + }, + { + "id": 35468722, + "time": "04:28", + "message": "captainepoch: I'd love to contribute to the project but I don't have enough time :(" + }, + { + "id": 35469529, + "time": "04:46", + "message": "Exterminador: great! monospace font!" + }, + { + "id": 35469533, + "time": "04:46", + "message": "Exterminador: xD" + }, + { + "id": 35469623, + "time": "04:49", + "message": "Exterminador: justJanne, auto completion button next! :P" + } + ] + ] + ] +} \ No newline at end of file diff --git a/app/sampledata/recent_messages.json b/app/sampledata/recent_messages.json new file mode 100644 index 0000000000000000000000000000000000000000..3a8676dc431c150408de0299cf58bbfe270d81c8 --- /dev/null +++ b/app/sampledata/recent_messages.json @@ -0,0 +1,106 @@ +{ + "data": [ + [ + { + "id": 35468705, + "time": "04:28", + "message": "every time with new features, new bugfixes, and new bugs" + }, + { + "id": 35468701, + "time": "04:28", + "message": "captainepoch: this is an alpha – new versions are published every few hours" + }, + { + "id": 35468684, + "time": "04:28", + "message": "and some minor bugfixes" + }, + { + "id": 35468682, + "time": "04:28", + "message": "captainepoch: there’s new themes" + }, + { + "id": 35468623, + "time": "04:25", + "message": "New themes! https://quasseldroid.info/#make_it_yours" + }, + { + "id": 35468622, + "time": "04:25", + "message": "New version! https://s3.kuschku.de/releases/quasseldroid-ng/QuasselDroidNG-v0.3.0-199-gac691ac-release.apk" + }, + { + "id": 35467158, + "time": "03:48", + "message": "Exterminador: It'll soon have a button to expand the message, at which time it will show all users. Soon." + }, + { + "id": 35465513, + "time": "02:59", + "message": "it has more than just one theme already" + }, + { + "id": 35465509, + "time": "02:58", + "message": "captainepoch: look at https://quasseldroid.info/#make_it_yours" + }, + { + "id": 35465436, + "time": "02:57", + "message": "if you suggest a theme, I’ll add it, though" + }, + { + "id": 35465428, + "time": "02:57", + "message": "captainepoch: I tried that in -NG, it’s basically impossible in Android" + }, + { + "id": 35465242, + "time": "02:53", + "message": "personally, I always use solarized light during the day, and solarized dark during the night" + }, + { + "id": 35465155, + "time": "02:51", + "message": "https://s3.kuschku.de/releases/quasseldroid-ng/QuasselDroidNG-v0.3.0-197-g8f556b6-release.apk" + }, + { + "id": 35465130, + "time": "02:51", + "message": "4 more bugfixes on their way" + }, + { + "id": 35464766, + "time": "02:42", + "message": "thanks, will do" + }, + { + "id": 35464762, + "time": "02:42", + "message": "captainepoch: good point, I know what I forgot!" + }, + { + "id": 35464674, + "time": "02:40", + "message": "So, we’re here: The minimum viable product is out" + }, + { + "id": 35464636, + "time": "02:39", + "message": "https://i.imgur.com/JdKiRIm.png" + }, + { + "id": 35464607, + "time": "02:39", + "message": "fixed" + }, + { + "id": 35464606, + "time": "02:39", + "message": "Exterminador: https://s3.kuschku.de/releases/quasseldroid-ng/QuasselDroidNG-v0.3.0-194-g08dc2bf-release.apk" + } + ] + ] +} \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_close.xml b/app/src/main/res/drawable/ic_close.xml new file mode 100644 index 0000000000000000000000000000000000000000..6477ae36af2d7f8080c3c388fbb8ca5e93c50ab6 --- /dev/null +++ b/app/src/main/res/drawable/ic_close.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24"> + <path + android:fillColor="#000" + android:pathData="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /> +</vector> \ No newline at end of file diff --git a/app/src/main/res/layout/layout_history.xml b/app/src/main/res/layout/layout_history.xml new file mode 100644 index 0000000000000000000000000000000000000000..80f6fda221b9a92df1a50dd8803420bb099e2f9b --- /dev/null +++ b/app/src/main/res/layout/layout_history.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout 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/card_panel" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <android.support.v7.widget.CardView + style="?attr/cardStyle" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:layout_marginBottom="16dp" + android:layout_marginLeft="16dp" + android:layout_marginRight="16dp" + android:layout_marginTop="16dp" + app:cardBackgroundColor="?attr/colorBackgroundCard"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="48dp" + android:orientation="horizontal"> + + <TextView + android:layout_width="0dip" + android:layout_height="match_parent" + android:layout_weight="1" + android:gravity="center_vertical|fill_horizontal" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:text="@string/label_input_history" + android:textAppearance="@style/TextAppearance.AppCompat.Body2" + android:textColor="?attr/colorForegroundSecondary" /> + + <android.support.v7.widget.AppCompatImageView + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_gravity="end|center_vertical" + android:layout_marginLeft="16dp" + android:layout_marginRight="16dp" + app:srcCompat="@drawable/ic_close" + app:tint="?attr/colorForegroundSecondary" /> + + </LinearLayout> + + <android.support.v7.widget.RecyclerView + android:id="@+id/msg_history" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + tools:listitem="@layout/widget_history_message" /> + + </LinearLayout> + + </android.support.v7.widget.CardView> + +</FrameLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/layout_slider.xml b/app/src/main/res/layout/layout_slider.xml index d9459514ec9accfee62bb675169da07b92265eed..9ad85d2817e620dfde7d6b42a2d3c19d6828fdec 100644 --- a/app/src/main/res/layout/layout_slider.xml +++ b/app/src/main/res/layout/layout_slider.xml @@ -13,45 +13,6 @@ <include layout="@layout/layout_editor" /> - <FrameLayout - android:id="@+id/card_panel" - android:layout_width="fill_parent" - android:layout_height="fill_parent"> - - <android.support.v7.widget.CardView - style="?attr/cardStyle" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:layout_marginBottom="16.0dip" - android:layout_marginLeft="16.0dip" - android:layout_marginRight="16.0dip" - android:layout_marginTop="16.0dip" - app:cardBackgroundColor="?attr/colorBackgroundCard"> - - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:orientation="vertical"> - - <TextView - android:layout_width="fill_parent" - android:layout_height="48.0dip" - android:gravity="center_vertical" - android:paddingLeft="16.0dip" - android:paddingRight="16.0dip" - android:text="@string/label_input_history" - android:textAppearance="@style/TextAppearance.AppCompat.Body2" - android:textColor="?attr/colorForegroundSecondary" /> - - <android.support.v7.widget.RecyclerView - android:id="@+id/msg_history" - android:layout_width="fill_parent" - android:layout_height="fill_parent" /> - - </LinearLayout> - - </android.support.v7.widget.CardView> - - </FrameLayout> + <include layout="@layout/layout_history" /> </com.sothree.slidinguppanel.SlidingUpPanelLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/widget_chatmessage_plain.xml b/app/src/main/res/layout/widget_chatmessage_plain.xml index 48c9be053ab66e6fd06fa2fa02dced2dc776e033..4b321468116795fb942f2a004ef024ca2ccca5d9 100644 --- a/app/src/main/res/layout/widget_chatmessage_plain.xml +++ b/app/src/main/res/layout/widget_chatmessage_plain.xml @@ -25,7 +25,7 @@ android:layout_marginRight="@dimen/message_horizontal" android:textColor="?attr/colorForegroundSecondary" android:typeface="monospace" - tools:text="[15:55]" /> + tools:text="@sample/messages.json/data/time" /> <TextView android:id="@+id/content" @@ -34,7 +34,7 @@ android:layout_weight="1" android:textColor="?attr/colorForeground" android:textIsSelectable="true" - tools:text="justJanne: hiii" /> + tools:text="@sample/messages.json/data/message" /> </LinearLayout> <View diff --git a/app/src/main/res/layout/widget_history_message.xml b/app/src/main/res/layout/widget_history_message.xml index c0df0098cea2206c6fed236a8b54461b1c28d211..e71572756ab275842bb5ba28191413fb53bf12f5 100644 --- a/app/src/main/res/layout/widget_history_message.xml +++ b/app/src/main/res/layout/widget_history_message.xml @@ -16,4 +16,4 @@ android:singleLine="true" android:textColor="?attr/colorTextPrimary" android:textSize="13sp" - tools:text="Historical Message" /> \ No newline at end of file + tools:text="@sample/recent_messages.json/data/message" /> \ No newline at end of file