2016-08-02 6 views
1

私はアンドロイドでカスタムダイアログを表示するためにこのコードを持っています。現在の言語がRTLでない場合にのみ正常に動作します。私たちはアラビア語に言語を変更すると、ダイアログが遮断:英語では次のように示しているがRTL言語で切り取られたダイアログandroid

Dialog dialog = new Dialog(activityContext, R.style.MaterialDialogSheet); 
    LayoutInflater layoutInflater = LayoutInflater.from(activityContext); 
    View view = layoutInflater.inflate(R.layout.error_dialog_view, null); 
    dialog.setContentView(view); 
    dialog.setCancelable(isCancelable); 
    dialog.setCanceledOnTouchOutside(isCancelable); 

    TextView errorTittleTextView = (TextView) dialog.findViewById(R.id.error_title); 
    TextView errorMessageTextView = (TextView) dialog.findViewById(R.id.error_message); 

    errorTittleTextView.setText(activityContext.getString(R.string.error_dialog_title).toUpperCase()); 
    errorMessageTextView.setText(errorMessage.toUpperCase()); 

    return dialog; 

Arabic dialog

は: English Dialog

は何の問題だろうか?

+0

android:layout_width="wrap_content" android:layout_height="wrap_content" 

?丸いコーナーのないレイアウトも確認してください – Amir

+0

manifestのsupportsRtl = "true"ラウンドコーナーをチェックさせてください –

+0

ラウンドコーナーなしで試してみましたが、問題は依然として続きます。 –

答えて

0

IからダイアログのXMLレイアウトを変更する場合、問題が修正されて:あなたはAndroidのマニフェストでサポートRTLを設定しました

android:layout_width="match_parent" 
android:layout_height="match_parent" 
関連する問題