indicator layout fix
This commit is contained in:
parent
181985dddc
commit
020e757017
|
@ -52,13 +52,11 @@ public class IconHolder extends ViewHolder implements OnClickListener {
|
||||||
|
|
||||||
|
|
||||||
public IconHolder(ViewGroup parent, GlobalSettings settings, OnHolderClickListener listener) {
|
public IconHolder(ViewGroup parent, GlobalSettings settings, OnHolderClickListener listener) {
|
||||||
super(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_attachment, parent, false));
|
super(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_icon, parent, false));
|
||||||
|
button = itemView.findViewById(R.id.item_icon_media);
|
||||||
this.settings = settings;
|
this.settings = settings;
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
|
|
||||||
button = itemView.findViewById(R.id.item_status_media);
|
|
||||||
itemView.getLayoutParams().width = parent.getMeasuredHeight();
|
|
||||||
itemView.getLayoutParams().height = parent.getMeasuredHeight();
|
|
||||||
button.setOnClickListener(this);
|
button.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +65,7 @@ public class IconHolder extends ViewHolder implements OnClickListener {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
int position = getLayoutPosition();
|
int position = getLayoutPosition();
|
||||||
if (position != NO_POSITION) {
|
if (position != NO_POSITION) {
|
||||||
if (v == button) {
|
if (v.getId() == R.id.item_icon_media) {
|
||||||
listener.onItemClick(position, OnHolderClickListener.NO_TYPE);
|
listener.onItemClick(position, OnHolderClickListener.NO_TYPE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/item_icon_indicator_size"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/item_icon_indicator_size"
|
||||||
android:layout_marginStart="@dimen/item_attachment_indicator_margin"
|
android:layout_marginStart="@dimen/item_icon_indicator_margin"
|
||||||
android:layout_marginEnd="@dimen/item_attachment_indicator_margin">
|
android:layout_marginEnd="@dimen/item_icon_indicator_margin">
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/item_status_media"
|
android:id="@+id/item_icon_media"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/round"
|
android:background="@drawable/round"
|
|
@ -257,8 +257,10 @@
|
||||||
<dimen name="item_poll_layout_padding">5dp</dimen>
|
<dimen name="item_poll_layout_padding">5dp</dimen>
|
||||||
<dimen name="tiem_poll_text_size">11sp</dimen>
|
<dimen name="tiem_poll_text_size">11sp</dimen>
|
||||||
|
|
||||||
<!-- dimens of item_attachment.xml -->
|
<!-- dimens of item_icon.xml -->
|
||||||
<dimen name="item_attachment_indicator_margin">2dp</dimen>
|
<dimen name="item_icon_indicator_margin">2dp</dimen>
|
||||||
|
<dimen name="item_icon_indicator_size">@dimen/item_status_indicator_size</dimen>
|
||||||
|
|
||||||
|
|
||||||
<!-- dimens of item_option -->
|
<!-- dimens of item_option -->
|
||||||
<dimen name="item_option_icon_size">12sp</dimen>
|
<dimen name="item_option_icon_size">12sp</dimen>
|
||||||
|
|
Loading…
Reference in New Issue