AndI'dliketoknowhowtogetthatpartofthetitlebecauseinthiscase,it'sunnecessary.
Code
privatevoidacertou(){finalDialogcerto=newDialog(this);certo.setContentView(R.layout.resultado_positivo);ButtonokPositivo=(Button)certo.findViewById(R.id.okPositivo);okPositivo.setOnClickListener(newView.OnClickListener(){@OverridepublicvoidonClick(Viewe){dinheiro+=600;actualizarRecompensa();certo.dismiss();}});certo.show();}
AndintheXML
<?xmlversion="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/fundo_dialogos"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Correcto!!!"
android:id="@+id/txtcerto"
android:layout_gravity="center_horizontal"
android:textStyle="bold"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="OK"
android:id="@+id/okPositivo"
android:layout_gravity="center_horizontal"
android:background="@drawable/seleccionador"
android:layout_marginTop="30dp"
android:textColor="#ffffff"
android:layout_below="@+id/txtcerto"
android:layout_centerHorizontal="true"
android:layout_marginBottom="5dp" />
</RelativeLayout>