Reducing font size of AlertDialog.Builder's components

前端 未结 4 588
不思量自难忘°
不思量自难忘° 2020-12-10 03:11

I created an AlertDialogue using the following code :

 int selectedModeId=0;
 public void sortTypeModeSelection(){

    AlertDialog.Builder aler         


        
4条回答
  •  伪装坚强ぢ
    2020-12-10 03:58

    you have to use custom layout for this.

    enter image description here

    check below code it sure help you

    AlertDialog.Builder builder = new AlertDialog.Builder(forgatps.this);
                builder.setTitle("Select Your Account");
    
                builder.setAdapter(new ArrayAdapter(forgatps.this,
                        R.layout.row_email, R.id.textView1, emails),
                        new DialogInterface.OnClickListener() {
    
                            @Override
                            public void onClick(DialogInterface dialog, int which) {
                                // TODO Auto-generated method stub
                                MainEmail = emails.get(which);
                                editEmail.setText("" + MainEmail);
    
                            }
                        });
    
                builder.show();
    

    row file:

    
    
        
    
    
    

提交回复
热议问题