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

Improved autocomplete

parent 36901ac3
No related branches found
No related tags found
No related merge requests found
package de.kuschku.quasseldroid_ng.util.ui
import android.content.Context
import android.support.v7.widget.RecyclerView
import android.util.AttributeSet
import de.kuschku.quasseldroid_ng.R
class AutoCompleteRecyclerView : RecyclerView {
constructor(context: Context?) : super(context)
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context?, attrs: AttributeSet?, defStyle: Int) : super(
context, attrs, defStyle
)
override fun onMeasure(widthSpec: Int, heightSpec: Int) {
super.onMeasure(
widthSpec,
MeasureSpec.makeMeasureSpec(
resources.getDimensionPixelSize(R.dimen.autocomplete_max_height),
MeasureSpec.AT_MOST
)
)
}
}
\ No newline at end of file
......@@ -23,8 +23,14 @@
android:id="@+id/fragment_messages"
android:name="de.kuschku.quasseldroid_ng.ui.chat.messages.MessageListFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
tools:layout="@layout/fragment_messages" />
<de.kuschku.quasseldroid_ng.util.ui.AutoCompleteRecyclerView
android:id="@+id/autocomplete_list"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<include layout="@layout/layout_slider" />
......
......@@ -19,13 +19,26 @@
app:umanoScrollableView="@id/chatline_scroller"
app:umanoShadowHeight="4dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<fragment
android:id="@+id/fragment_messages"
android:name="de.kuschku.quasseldroid_ng.ui.chat.messages.MessageListFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
tools:layout="@layout/fragment_messages" />
<de.kuschku.quasseldroid_ng.util.ui.AutoCompleteRecyclerView
android:id="@+id/autocomplete_list"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<include layout="@layout/layout_slider" />
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
......
......@@ -46,11 +46,10 @@
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ic_send" />
<android.support.v7.widget.RecyclerView
<de.kuschku.quasseldroid_ng.util.ui.AutoCompleteRecyclerView
android:id="@+id/autocomplete_list2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxHeight="144dp"
app:layout_constraintBottom_toTopOf="@+id/formatting_toolbar_container" />
<android.support.design.widget.AppBarLayout
......
......@@ -32,12 +32,10 @@
android:layout_weight="1"
tools:layout="@layout/fragment_messages" />
<android.support.v7.widget.RecyclerView
<de.kuschku.quasseldroid_ng.util.ui.AutoCompleteRecyclerView
android:id="@+id/autocomplete_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxHeight="144dp" />
android:layout_height="wrap_content" />
</LinearLayout>
<include layout="@layout/layout_slider" />
......
......@@ -3,4 +3,6 @@
<dimen name="message_horizontal">8dp</dimen>
<dimen name="message_vertical">2dp</dimen>
<dimen name="autocomplete_max_height">96dp</dimen>
</resources>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment