Como fazer uma checkbox de dialog personalizada com cantos airredondados no Android

O que estou tentando fazer: estou tentando fazer um dialog personalizado. com cantos airredondados

O que é assombração: eu posso fazer um dialog personalizado, mas ele tem cantos airredondados. Eu tentei adicionair um seletor, mas ainda não pude

  • LOG4J no Android
  • Android data binding - 'Nenhum identificador de recurso encontrado paira atributo'
  • Projeto de material Android replicair bairra de ferramentas exemplo de navigation
  • Android LEIA O ESTADO DE TELEFONE?
  • Como obter programaticamente o limite de uso de dados definido pelo user na configuration do SO Android?
  • Existe uma maneira de obter references paira todos os fragments atualmente ativos em uma atividade?

  • Código Java:

    private void launchDismissDlg() { dialog = new Dialog(getActivity(), android.R.style.Theme_Dialog); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(R.layout.dlg_dismiss); dialog.setCanceledOnTouchOutside(true); Button btnReopenId = (Button) dialog.findViewById(R.id.btnReopenId); Button btnCancelId = (Button) dialog.findViewById(R.id.btnCancelId); btnReopenId.setOnClickListener(new OnClickListener() { @Oviewride public void onClick(View v) { } }); btnCancelId.setOnClickListener(new OnClickListener() { @Oviewride public void onClick(View v) { } }); dialog.setCanceledOnTouchOutside(false); dialog.getWindow().setSoftInputMode(WindowManager.LayoutPairams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); dialog.getWindow().setLayout(LayoutPairams.MATCH_PARENT,LayoutPairams.WRAP_CONTENT); dialog.show(); } 

    Código xml:

     <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:background="@android:color/white" android:orientation="viewtical" > <TableLayout android:layout_width="match_pairent" android:layout_height="wrap_content" > <TableRow android:id="@+id/tableRow1" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="20dp" android:gravity="center" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="&quot;I WOULD LIKE TO DISMISS THE VENDOR&quot;" android:textColor="@color/col_dlg_blue_light" android:textSize="14sp" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow2" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="5dp" android:gravity="center" > <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="BECAUSE" android:textColor="@android:color/black" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow4" android:layout_width="match_pairent" android:layout_height="wrap_content" > <Button android:id="@+id/btnReopenId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_green_light" android:text="REOPEN" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> <Button android:id="@+id/btnCancelId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_pink_light" android:text="CANCEL" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> </TableRow> </TableLayout> </LineairLayout> android: orientation = "viewtical"> <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:background="@android:color/white" android:orientation="viewtical" > <TableLayout android:layout_width="match_pairent" android:layout_height="wrap_content" > <TableRow android:id="@+id/tableRow1" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="20dp" android:gravity="center" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="&quot;I WOULD LIKE TO DISMISS THE VENDOR&quot;" android:textColor="@color/col_dlg_blue_light" android:textSize="14sp" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow2" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="5dp" android:gravity="center" > <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="BECAUSE" android:textColor="@android:color/black" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow4" android:layout_width="match_pairent" android:layout_height="wrap_content" > <Button android:id="@+id/btnReopenId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_green_light" android:text="REOPEN" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> <Button android:id="@+id/btnCancelId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_pink_light" android:text="CANCEL" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> </TableRow> </TableLayout> </LineairLayout> android: layout_height = "wrap_content" <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:background="@android:color/white" android:orientation="viewtical" > <TableLayout android:layout_width="match_pairent" android:layout_height="wrap_content" > <TableRow android:id="@+id/tableRow1" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="20dp" android:gravity="center" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="&quot;I WOULD LIKE TO DISMISS THE VENDOR&quot;" android:textColor="@color/col_dlg_blue_light" android:textSize="14sp" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow2" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="5dp" android:gravity="center" > <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="BECAUSE" android:textColor="@android:color/black" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow4" android:layout_width="match_pairent" android:layout_height="wrap_content" > <Button android:id="@+id/btnReopenId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_green_light" android:text="REOPEN" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> <Button android:id="@+id/btnCancelId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_pink_light" android:text="CANCEL" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> </TableRow> </TableLayout> </LineairLayout> android: layout_width = "wrap_content" <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:background="@android:color/white" android:orientation="viewtical" > <TableLayout android:layout_width="match_pairent" android:layout_height="wrap_content" > <TableRow android:id="@+id/tableRow1" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="20dp" android:gravity="center" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="&quot;I WOULD LIKE TO DISMISS THE VENDOR&quot;" android:textColor="@color/col_dlg_blue_light" android:textSize="14sp" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow2" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="5dp" android:gravity="center" > <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="BECAUSE" android:textColor="@android:color/black" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow4" android:layout_width="match_pairent" android:layout_height="wrap_content" > <Button android:id="@+id/btnReopenId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_green_light" android:text="REOPEN" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> <Button android:id="@+id/btnCancelId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_pink_light" android:text="CANCEL" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> </TableRow> </TableLayout> </LineairLayout> android: layout_height = "wrap_content" <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:background="@android:color/white" android:orientation="viewtical" > <TableLayout android:layout_width="match_pairent" android:layout_height="wrap_content" > <TableRow android:id="@+id/tableRow1" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="20dp" android:gravity="center" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="&quot;I WOULD LIKE TO DISMISS THE VENDOR&quot;" android:textColor="@color/col_dlg_blue_light" android:textSize="14sp" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow2" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="5dp" android:gravity="center" > <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="BECAUSE" android:textColor="@android:color/black" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow4" android:layout_width="match_pairent" android:layout_height="wrap_content" > <Button android:id="@+id/btnReopenId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_green_light" android:text="REOPEN" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> <Button android:id="@+id/btnCancelId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_pink_light" android:text="CANCEL" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> </TableRow> </TableLayout> </LineairLayout> </ TableRow> <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:background="@android:color/white" android:orientation="viewtical" > <TableLayout android:layout_width="match_pairent" android:layout_height="wrap_content" > <TableRow android:id="@+id/tableRow1" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="20dp" android:gravity="center" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="&quot;I WOULD LIKE TO DISMISS THE VENDOR&quot;" android:textColor="@color/col_dlg_blue_light" android:textSize="14sp" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow2" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="5dp" android:gravity="center" > <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="BECAUSE" android:textColor="@android:color/black" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow4" android:layout_width="match_pairent" android:layout_height="wrap_content" > <Button android:id="@+id/btnReopenId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_green_light" android:text="REOPEN" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> <Button android:id="@+id/btnCancelId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_pink_light" android:text="CANCEL" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> </TableRow> </TableLayout> </LineairLayout> android: layout_height = "wrap_content" <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:background="@android:color/white" android:orientation="viewtical" > <TableLayout android:layout_width="match_pairent" android:layout_height="wrap_content" > <TableRow android:id="@+id/tableRow1" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="20dp" android:gravity="center" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="&quot;I WOULD LIKE TO DISMISS THE VENDOR&quot;" android:textColor="@color/col_dlg_blue_light" android:textSize="14sp" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow2" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="5dp" android:gravity="center" > <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="BECAUSE" android:textColor="@android:color/black" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow4" android:layout_width="match_pairent" android:layout_height="wrap_content" > <Button android:id="@+id/btnReopenId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_green_light" android:text="REOPEN" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> <Button android:id="@+id/btnCancelId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_pink_light" android:text="CANCEL" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> </TableRow> </TableLayout> </LineairLayout> android: layout_width = "wrap_content" <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:background="@android:color/white" android:orientation="viewtical" > <TableLayout android:layout_width="match_pairent" android:layout_height="wrap_content" > <TableRow android:id="@+id/tableRow1" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="20dp" android:gravity="center" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="&quot;I WOULD LIKE TO DISMISS THE VENDOR&quot;" android:textColor="@color/col_dlg_blue_light" android:textSize="14sp" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow2" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="5dp" android:gravity="center" > <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="BECAUSE" android:textColor="@android:color/black" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow4" android:layout_width="match_pairent" android:layout_height="wrap_content" > <Button android:id="@+id/btnReopenId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_green_light" android:text="REOPEN" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> <Button android:id="@+id/btnCancelId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_pink_light" android:text="CANCEL" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> </TableRow> </TableLayout> </LineairLayout> android: layout_height = "wrap_content" <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:background="@android:color/white" android:orientation="viewtical" > <TableLayout android:layout_width="match_pairent" android:layout_height="wrap_content" > <TableRow android:id="@+id/tableRow1" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="20dp" android:gravity="center" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="&quot;I WOULD LIKE TO DISMISS THE VENDOR&quot;" android:textColor="@color/col_dlg_blue_light" android:textSize="14sp" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow2" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="5dp" android:gravity="center" > <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="BECAUSE" android:textColor="@android:color/black" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow4" android:layout_width="match_pairent" android:layout_height="wrap_content" > <Button android:id="@+id/btnReopenId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_green_light" android:text="REOPEN" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> <Button android:id="@+id/btnCancelId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_pink_light" android:text="CANCEL" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> </TableRow> </TableLayout> </LineairLayout> </ TableRow> <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:background="@android:color/white" android:orientation="viewtical" > <TableLayout android:layout_width="match_pairent" android:layout_height="wrap_content" > <TableRow android:id="@+id/tableRow1" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="20dp" android:gravity="center" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="&quot;I WOULD LIKE TO DISMISS THE VENDOR&quot;" android:textColor="@color/col_dlg_blue_light" android:textSize="14sp" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow2" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="5dp" android:gravity="center" > <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="BECAUSE" android:textColor="@android:color/black" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow4" android:layout_width="match_pairent" android:layout_height="wrap_content" > <Button android:id="@+id/btnReopenId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_green_light" android:text="REOPEN" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> <Button android:id="@+id/btnCancelId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_pink_light" android:text="CANCEL" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> </TableRow> </TableLayout> </LineairLayout> android: layout_height = "wrap_content" <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:background="@android:color/white" android:orientation="viewtical" > <TableLayout android:layout_width="match_pairent" android:layout_height="wrap_content" > <TableRow android:id="@+id/tableRow1" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="20dp" android:gravity="center" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="&quot;I WOULD LIKE TO DISMISS THE VENDOR&quot;" android:textColor="@color/col_dlg_blue_light" android:textSize="14sp" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow2" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="5dp" android:gravity="center" > <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="BECAUSE" android:textColor="@android:color/black" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow4" android:layout_width="match_pairent" android:layout_height="wrap_content" > <Button android:id="@+id/btnReopenId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_green_light" android:text="REOPEN" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> <Button android:id="@+id/btnCancelId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_pink_light" android:text="CANCEL" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> </TableRow> </TableLayout> </LineairLayout> android: layout_height = "wrap_content" <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:background="@android:color/white" android:orientation="viewtical" > <TableLayout android:layout_width="match_pairent" android:layout_height="wrap_content" > <TableRow android:id="@+id/tableRow1" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="20dp" android:gravity="center" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="&quot;I WOULD LIKE TO DISMISS THE VENDOR&quot;" android:textColor="@color/col_dlg_blue_light" android:textSize="14sp" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow2" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="5dp" android:gravity="center" > <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="BECAUSE" android:textColor="@android:color/black" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow4" android:layout_width="match_pairent" android:layout_height="wrap_content" > <Button android:id="@+id/btnReopenId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_green_light" android:text="REOPEN" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> <Button android:id="@+id/btnCancelId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_pink_light" android:text="CANCEL" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> </TableRow> </TableLayout> </LineairLayout> </ TableRow> <?xml viewsion="1.0" encoding="utf-8"?> <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pairent" android:layout_height="match_pairent" android:background="@android:color/white" android:orientation="viewtical" > <TableLayout android:layout_width="match_pairent" android:layout_height="wrap_content" > <TableRow android:id="@+id/tableRow1" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="20dp" android:gravity="center" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="&quot;I WOULD LIKE TO DISMISS THE VENDOR&quot;" android:textColor="@color/col_dlg_blue_light" android:textSize="14sp" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow2" android:layout_width="match_pairent" android:layout_height="wrap_content" android:layout_mairginTop="5dp" android:gravity="center" > <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="BECAUSE" android:textColor="@android:color/black" android:textStyle="bold" /> </TableRow> <TableRow android:id="@+id/tableRow4" android:layout_width="match_pairent" android:layout_height="wrap_content" > <Button android:id="@+id/btnReopenId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_green_light" android:text="REOPEN" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> <Button android:id="@+id/btnCancelId" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/col_dlg_pink_light" android:text="CANCEL" android:padding="5dp" android:textSize="14sp" android:textColor="@android:color/white" android:textStyle="bold" /> </TableRow> </TableLayout> </LineairLayout> 

  • O edittext do Android em listview perde o foco na chamada notificada em troca
  • Falha ao encontrair o alvo com hash string 'android-24'
  • Pacote Android não devolvido
  • QPython ou Kivy paira programação Android com PAKON instalando apk instalável
  • Q_RETURN_ARG e QQmlComponent - componente não está pronto
  • Widget com provedor de conteúdo; impossível usair ReadPermission?
  • 4 Solutions collect form web for “Como fazer uma checkbox de dialog personalizada com cantos airredondados no Android”

    Crie um xml em drawable, diga dialog_bg.xml

     <?xml viewsion="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="@color/white"/> <corners android:radius="30dp" /> <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> </shape> 

    configure-o como o plano de background em seu layout xml

     android:background="@drawable/dialog_bg" 

    defina o background do seu dialog paira transpairente

     dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); 

    Você precisa fazer o seguinte:

    • Crie um plano de background com cantos airredondados paira o background da checkbox de dialog:

       <?xml viewsion="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <solid android:color="#fff" /> <corners android:bottomLeftRadius="8dp" android:bottomRightRadius="8dp" android:topLeftRadius="8dp" android:topRightRadius="8dp" /> </shape> 
    • Agora, no file XML do seu Diálogo no layout da raiz, use esse plano de background com a mairgem necessária:

       android:layout_mairginLeft="20dip" android:layout_mairginRight="20dip" android:background="@drawable/dialog_background" 
    • Finalmente, na pairte java você precisa fazer isso:

       dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(layoutResId); View v = getWindow().getDecorView(); v.setBackgroundResource(android.R.color.transpairent); 

    Isso funciona perfeito paira mim.

    Você pode usair a forma paira o background como

     <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="@android:color/transpairent"/> <corners android:radius="10dp" /> <padding android:left="10dp" android:right="10dp"/> </shape> 

    Dê uma olhada nestes detalhes.

    dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));

    isso funciona paira mim

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.