Android: get/retrieve progressDialog title's ID and DialegError title's ID

后端 未结 1 736
有刺的猬
有刺的猬 2021-01-24 23:33

I must change the fonts of my project to external ones and i\'ve done it almost everywhere, now only it\'s missing the Title\'s of ProgressDialog and ErrorDialeg (the body is ch

相关标签:
1条回答
  • 2021-01-25 00:24

    for AlertDialog Try This :

    ((TextView) dialog.findViewById(getResources().getIdentifier(
                "alertTitle", "id", "android"))).setTypeface(myRegularFont);
    

    And For AlertDialog Button TypeFace :

    ((Button) dialog.getButton(AlertDialog.BUTTON_POSITIVE))
                .setTypeface(myBoldFont);
    

    for ProgressDialog Try This :

    ((TextView) prWait.findViewById(getResources().getIdentifier(
                    "alertTitle", "id", "android"))).setTypeface(myRegularFont);
    
    0 讨论(0)
提交回复
热议问题