I have a weird issue. I have a simple alertDialog I passed it an arguments but I see it blank except the icon.
this is the method:
public class ViewUtil {
//// some code...
public static void showMessagePopup(int titleResId, String message, Context context) {
new AlertDialog.Builder(context)
.setTitle(context.getResources().getString(titleResId))
.setMessage(message)
.setIcon(R.mipmap.ic_launcher)
.show();
}
And here I call it
public class RedesignNewDriverPopup extends Dialog {
/// some code...
new PrepareRestApiTask<>(new PrepareRestApiTask.restApiCaller<String>() {
@Override
public Call<RestResponse<String>> onRestApiReadyBackgroundRun(String hashedToken,
SmartbusClient client) {
return client.update_driver(driver.id, req, hashedToken);
}
@Override
public void onEverythingFinishedUIThreadRun(String theData) {
updateCallback.afterDriverUpdate();
ViewUtil.showMessagePopup(R.string.new_driver, getContext().getResources().getString(R.string.driver_created), getContext());
dismiss();
}
@Override
public void onError(Response<RestResponse<String>> response) {
ViewUtil.showMessagePopup(R.string.new_driver, getContext().getResources().getString(R.string.login_error), getContext());
dismiss();
}
}).execute();
this is my theme:
`<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="drawerArrowStyle">@style/DrawerArrowToggle</item>
<item name="android:actionBarStyle">@android:style/Widget.Holo.ActionBar</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:tabWidgetStyle">@style/CustomTabWidget</item>
</style>`
As I said, I can see the icon but not the title or the message.
Thanks