Skip to content
Snippets Groups Projects
Commit 2ff33731 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Added formatting menu

parent 42421cd5
Branches
Tags
No related merge requests found
Showing
with 135 additions and 33 deletions
app/src/main/res/drawable-xxhdpi/ic_format_italic_light.png

664 B

app/src/main/res/drawable-xxhdpi/ic_format_paint_dark.png

410 B

app/src/main/res/drawable-xxhdpi/ic_format_paint_light.png

464 B

app/src/main/res/drawable-xxhdpi/ic_format_underline_dark.png

633 B

app/src/main/res/drawable-xxhdpi/ic_format_underline_light.png

824 B

app/src/main/res/drawable-xxxhdpi/ic_format_bold_dark.png

926 B

app/src/main/res/drawable-xxxhdpi/ic_format_bold_light.png

1.05 KiB

app/src/main/res/drawable-xxxhdpi/ic_format_fill_dark.png

983 B

app/src/main/res/drawable-xxxhdpi/ic_format_fill_light.png

1.33 KiB

app/src/main/res/drawable-xxxhdpi/ic_format_italic_dark.png

599 B

app/src/main/res/drawable-xxxhdpi/ic_format_italic_light.png

867 B

app/src/main/res/drawable-xxxhdpi/ic_format_paint_dark.png

566 B

app/src/main/res/drawable-xxxhdpi/ic_format_paint_light.png

582 B

app/src/main/res/drawable-xxxhdpi/ic_format_underline_dark.png

834 B

app/src/main/res/drawable-xxxhdpi/ic_format_underline_light.png

1.08 KiB

......@@ -13,6 +13,7 @@
android:layout_height="match_parent"
android:gravity="bottom"
android:orientation="vertical"
app:umanoScrollableView="@+id/chatlineScroller"
app:umanoPanelHeight="?attr/actionBarSize"
app:umanoShadowHeight="4dp">
......
......@@ -2,8 +2,7 @@
<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipe_view"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:layout_height="match_parent"
android:background="?attr/colorBackground">
<android.support.v7.widget.RecyclerView
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.sothree.slidinguppanel.SlidingUpPanelLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:app="http://schemas.android.com/tools"
android:background="?attr/colorBackgroundCard"
android:clickable="false"
android:focusable="true"
android:gravity="bottom"
sothree:umanoFadeColor="#00000000"
sothree:umanoOverlay="true"
sothree:umanoPanelHeight="72dip"
sothree:umanoScrollableView="@+id/msg_history"
sothree:umanoShadowHeight="0.0dip">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:paddingBottom="72dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:background="?attr/colorBackgroundCard"
android:orientation="horizontal">
<ScrollView
android:id="@+id/chatlineScroller"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_toLeftOf="@+id/send"
android:layout_toStartOf="@+id/send"
android:layout_alignParentTop="true"
android:layout_above="@+id/formatting_toolbar">
<android.support.v7.widget.AppCompatEditText
android:id="@+id/chatline"
android:layout_width="0dip"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_weight="1"
android:background="@android:color/transparent"
android:gravity="top"
android:hint="@string/message_placeholder"
android:imeOptions="actionSend"
android:inputType="textCapSentences|textShortMessage|textAutoCorrect"
android:paddingBottom="17dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingTop="19dp"
android:textSize="16sp"
android:gravity="top"
android:paddingBottom="19dp" />
android:paddingTop="17dp"
android:text="@string/large_text"
android:textSize="16sp" />
</ScrollView>
<android.support.v7.widget.AppCompatImageButton
android:id="@+id/send"
style="?attr/buttonStyleSmall"
android:layout_width="56dp"
android:layout_height="?attr/actionBarSize"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_gravity="top"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="12dp"
android:src="@drawable/ic_send"
android:tint="?attr/colorAccent" />
</LinearLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/formatting_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<android.support.v7.widget.ActionMenuView
android:id="@+id/amvMenu"
android:layout_width="wrap_content"
android:layout_height="?attr/actionBarSize"/>
</android.support.v7.widget.Toolbar>
</RelativeLayout>
<FrameLayout
android:id="@+id/card_panel"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16.0dip"
android:layout_marginLeft="16.0dip"
android:layout_marginRight="16.0dip"
android:layout_marginTop="16.0dip">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
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="Message History"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="?attr/colorForegroundSecondary" />
<android.support.v7.widget.RecyclerView
android:id="@+id/msg_history"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:background="?attr/colorBackgroundCard" />
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</android.support.v7.widget.CardView>
</FrameLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/format_bold"
android:icon="?attr/ic_format_bold"
app:showAsAction="always"
android:title="@string/format_bold" />
<item
android:id="@+id/format_italic"
android:icon="?attr/ic_format_italic"
app:showAsAction="always"
android:title="@string/format_italic" />
<item
android:id="@+id/format_underline"
android:icon="?attr/ic_format_underline"
app:showAsAction="always"
android:title="@string/format_underline" />
<item
android:id="@+id/format_paint"
android:icon="?attr/ic_format_paint"
app:showAsAction="always"
android:title="@string/format_color" />
<item
android:id="@+id/format_fill"
android:icon="?attr/ic_format_fill"
app:showAsAction="always"
android:title="@string/format_fill" />
</menu>
......@@ -58,4 +58,11 @@
<attr name="colorTintMessage" format="color" />
<attr name="colorTintHighlight" format="color" />
<attr name="chatlineExpandedSize" />
<!-- Format icons -->
<attr name="ic_format_bold" format="reference" />
<attr name="ic_format_italic" format="reference" />
<attr name="ic_format_underline" format="reference" />
<attr name="ic_format_paint" format="reference" />
<attr name="ic_format_fill" format="reference" />
</resources>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment