Skip to content

Commit

Permalink
0.0.50.beta29
Browse files Browse the repository at this point in the history
- 修复 BottomMenu、MessageMenu 布局存在的问题
  • Loading branch information
kongzue committed Dec 14, 2024
1 parent 673d558 commit 33bb824
Show file tree
Hide file tree
Showing 23 changed files with 1,024 additions and 884 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;

import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
Expand Down Expand Up @@ -625,7 +626,6 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)

ViewGroup.LayoutParams listViewLp = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
getDialogImpl().boxList.addView(listView, listViewLp);

refreshUI();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;

import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
Expand Down Expand Up @@ -504,7 +505,6 @@ protected void onDialogShow() {
dividerDrawableResId = isLightTheme() ? R.drawable.rect_dialogx_material_menu_split_divider : R.drawable.rect_dialogx_material_menu_split_divider_night;
}


if (!isLightTheme()) {
listView = new DialogListView(getDialogImpl(), getOwnActivity(), R.style.DialogXCompatThemeDark);
} else {
Expand Down Expand Up @@ -618,7 +618,6 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)

ViewGroup.LayoutParams listViewLp = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
getDialogImpl().boxList.addView(listView, listViewLp);

refreshUI();
}
}
Expand Down
69 changes: 38 additions & 31 deletions DialogX/src/main/res/layout/layout_dialogx_bottom_material.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,45 +50,52 @@
android:textColor="@color/black"
android:textSize="21dp" />

<com.kongzue.dialogx.util.views.DialogScrollView
android:id="@+id/scrollView"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"
android:scrollbars="vertical">
android:layout_weight="1"
android:orientation="vertical">

<LinearLayout
android:id="@+id/box_content"
<com.kongzue.dialogx.util.views.DialogScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:overScrollMode="never"
android:scrollbars="vertical">

<TextView
android:id="@+id/txt_dialog_tip"
<LinearLayout
android:id="@+id/box_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="5dp"
android:paddingBottom="5dp"
android:text="This is content text."
android:textColor="@color/black70"
android:textSize="16dp" />

<RelativeLayout
android:id="@+id/box_custom"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</LinearLayout>

</com.kongzue.dialogx.util.views.DialogScrollView>

<FrameLayout
android:id="@+id/box_list"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:orientation="vertical">

<TextView
android:id="@+id/txt_dialog_tip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="5dp"
android:paddingBottom="5dp"
android:text="This is content text."
android:textColor="@color/black70"
android:textSize="16dp" />

<RelativeLayout
android:id="@+id/box_custom"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</LinearLayout>

</com.kongzue.dialogx.util.views.DialogScrollView>

<FrameLayout
android:id="@+id/box_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
Expand Down
68 changes: 38 additions & 30 deletions DialogX/src/main/res/layout/layout_dialogx_bottom_material_dark.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,45 +50,53 @@
android:textColor="@color/white"
android:textSize="21dp" />

<com.kongzue.dialogx.util.views.DialogScrollView
android:id="@+id/scrollView"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"
android:scrollbars="vertical">
android:layout_weight="1"
android:orientation="vertical">

<LinearLayout
android:id="@+id/box_content"
<com.kongzue.dialogx.util.views.DialogScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:overScrollMode="never"
android:scrollbars="vertical">

<TextView
android:id="@+id/txt_dialog_tip"
<LinearLayout
android:id="@+id/box_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="5dp"
android:paddingBottom="5dp"
android:text="This is content text."
android:textColor="@color/white60"
android:textSize="16dp" />

<RelativeLayout
android:id="@+id/box_custom"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</LinearLayout>

</com.kongzue.dialogx.util.views.DialogScrollView>
android:orientation="vertical">

<TextView
android:id="@+id/txt_dialog_tip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="5dp"
android:paddingBottom="5dp"
android:text="This is content text."
android:textColor="@color/white60"
android:textSize="16dp" />

<RelativeLayout
android:id="@+id/box_custom"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</LinearLayout>

</com.kongzue.dialogx.util.views.DialogScrollView>

<FrameLayout
android:id="@+id/box_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />

<FrameLayout
android:id="@+id/box_list"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

<LinearLayout
android:id="@+id/box_button"
Expand Down
101 changes: 54 additions & 47 deletions DialogX/src/main/res/layout/layout_dialogx_material.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,61 +40,68 @@
android:textColor="@color/black"
android:textSize="21dp" />

<com.kongzue.dialogx.util.views.DialogScrollView
android:id="@+id/scrollView"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never">
android:layout_weight="1"
android:orientation="vertical">

<LinearLayout
<com.kongzue.dialogx.util.views.DialogScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:id="@+id/txt_dialog_tip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:text="This is content text."
android:textColor="@color/black70"
android:textSize="16dp" />

<RelativeLayout
android:id="@+id/box_custom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
android:overScrollMode="never">

<EditText
android:id="@+id/txt_input"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:inputType="text"
android:maxLines="1"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:scrollbars="vertical"
android:text=""
android:textColor="@color/black90"
android:textSize="18dp"
android:theme="@style/DialogXCompatThemeLight" />

</LinearLayout>

</com.kongzue.dialogx.util.views.DialogScrollView>

<FrameLayout
android:id="@+id/box_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:orientation="vertical">

<TextView
android:id="@+id/txt_dialog_tip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:text="This is content text."
android:textColor="@color/black70"
android:textSize="16dp" />

<RelativeLayout
android:id="@+id/box_custom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />

<EditText
android:id="@+id/txt_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:inputType="text"
android:maxLines="1"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:scrollbars="vertical"
android:text=""
android:textColor="@color/black90"
android:textSize="18dp"
android:theme="@style/DialogXCompatThemeLight" />

</LinearLayout>

</com.kongzue.dialogx.util.views.DialogScrollView>

<FrameLayout
android:id="@+id/box_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
</LinearLayout>

<LinearLayout
android:id="@+id/box_button"
Expand Down
Loading

0 comments on commit 33bb824

Please sign in to comment.