I have standard AlertDialog popping up with results of my game, i want to make it bigger. This is my dialog creation and setting code:
@Override
protected Dialog onCreateDialog(int id) {
adb = new AlertDialog.Builder(this);
win_lose_view = (RelativeLayout) getLayoutInflater().inflate(R.layout.win_lose_screen, null);
adb.setView(win_lose_view);
upper_text = (TextView) win_lose_view.findViewById(R.id.upper_text);
upper_text.setRotation(180);
lower_text = (TextView) win_lose_view.findViewById(R.id.lower_text);
upper_decide = (Button) win_lose_view.findViewById(R.id.upper_decide);
upper_decide.setRotation(180);
lower_decide = (Button) win_lose_view.findViewById(R.id.lower_decide);
Dialog d = adb.create();
d.setCanceledOnTouchOutside(false);
return d ;
}
@Override
protected void onPrepareDialog(int id, Dialog dialog){
super.onPrepareDialog(id, dialog);
upper_decide = (Button) win_lose_view.findViewById(R.id.upper_decide);
upper_decide.setRotation(180);
lower_decide = (Button) win_lose_view.findViewById(R.id.lower_decide);
};
if(first_player_points > second_player_points){
upper_text.setText("you win! score: " + first_player_points);
lower_text.setText("you lose! score: "+ second_player_points);
}
}
here is how it looks on the device:
I want to make it wider - how do I do that?