【发布时间】:2019-06-27 11:07:15
【问题描述】:
我在按下按钮屏幕时调用的底部工作表上显示数据。但是,工作表上的文本比屏幕上显示的要多,因此,文本被剪裁了。我该如何解决这个问题,以便对话框可以滚动到屏幕边缘?
我的底部布局xml文件如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text=""
android:id="@+id/splo"
/>
</LinearLayout>
我用以下代码召唤它:
BottomSheetDialog dialog = new BottomSheetDialog(this);
View view = getLayoutInflater().inflate(R.layout.fragment_bottom_layout, null);
dialog.setContentView( view );
TextView tv = (TextView) view.findViewById( R.id.splo);
tv.setText( sp );
dialog.show();
【问题讨论】:
标签: android bottom-sheet