内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用
我正在创建一个对话框架来显示一些关于我的应用程序的帮助信息。除了一件事外,一切都很好:在窗口顶部有一个黑色条纹,显示对话框框架,我认为这是为标题保留的,这是我不想使用的。
这是特别痛苦的,因为我的自定义对话框架使用白色背景,所以改变太臭名昭著,不能放在一边。
让我以更图形化的方式向你展示这一点:
现在,我的对话框框架的XML代码如下所示:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:id="@+id/holding" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/dialog_fragment_bg" > <!-- Usamos un LinearLayout para que la imagen y el texto esten bien alineados --> <LinearLayout android:id="@+id/confirmationToast" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" > <TextView android:id="@+id/confirmationToastText" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="@string/help_dialog_fragment" android:textColor="#AE0000" android:gravity="center_vertical" /> </LinearLayout> <LinearLayout android:id="@+id/confirmationButtonLL" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_horizontal" > <Button android:id="@+id/confirmationDialogButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:layout_marginBottom="60dp" android:background="@drawable/ok_button"> </Button> </LinearLayout> </LinearLayout> </ScrollView>
以及实现对话框架的类的代码:
public class HelpDialog extends DialogFragment { public HelpDialog() { // Empty constructor required for DialogFragment } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { //Inflate the XML view for the help dialog fragment View view = inflater.inflate(R.layout.help_dialog_fragment, container); TextView text = (TextView)view.findViewById(R.id.confirmationToastText); text.setText(Html.fromHtml(getString(R.string.help_dialog_fragment))); //get the OK button and add a Listener ((Button) view.findViewById(R.id.confirmationDialogButton)).setOnClickListener(new OnClickListener() { public void onClick(View v) { // When button is clicked, call up to owning activity. HelpDialog.this.dismiss(); } }); return view; } }
以及创作过程中的主要活动:
/** * Shows the HelpDialog Fragment */ private void showHelpDialog() { android.support.v4.app.FragmentManager fm = getSupportFragmentManager(); HelpDialog helpDialog = new HelpDialog(); helpDialog.show(fm, "fragment_help"); }
我怎样才能摆脱这个标题区?
简单的方法
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setStyle(STYLE_NO_TITLE, 0); }
目前呼叫中心只有API文档,需要用户自己开发。如果用户需要saas系统的呼叫中心可以使用智能外呼机器人:https://cloud.tencent.com/product/ccsr
你有没有调整观众端表现,即通过对 LivePushConfig 中的homeOrientation设置项进行配置,它控制的是观众端看到的视频宽高比是16:9还是6:19,调整后的结果可以用播放器查看以确认是否符合预期。
控制台使用的是新的接口,批量创建子网,https://cloud.tencent.com/document/product/215/31960,可以指定路由表。terraform开发的时候是基于api2.0开发的,还没有这个接口,因此暂时无法使用