diff options
Diffstat (limited to 'main/src/cgeo/geocaching/export/GpxExport.java')
| -rw-r--r-- | main/src/cgeo/geocaching/export/GpxExport.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/export/GpxExport.java b/main/src/cgeo/geocaching/export/GpxExport.java index 5a95128..26e96b3 100644 --- a/main/src/cgeo/geocaching/export/GpxExport.java +++ b/main/src/cgeo/geocaching/export/GpxExport.java @@ -17,7 +17,10 @@ import org.apache.commons.lang3.CharEncoding; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; +import android.content.Context; import android.content.DialogInterface; +import android.os.Build.VERSION; +import android.os.Build.VERSION_CODES; import android.os.Environment; import android.view.ContextThemeWrapper; import android.view.View; @@ -59,8 +62,13 @@ public class GpxExport extends AbstractExport { private Dialog getExportDialog(final String[] geocodes, final Activity activity) { final AlertDialog.Builder builder = new AlertDialog.Builder(activity); - // AlertDialog has always dark style, so we have to apply it as well always - final View layout = View.inflate(new ContextThemeWrapper(activity, R.style.dark), R.layout.gpx_export_dialog, null); + final Context themedContext; + if (Settings.isLightSkin() && VERSION.SDK_INT < VERSION_CODES.HONEYCOMB) + themedContext = new ContextThemeWrapper(activity, R.style.dark); + else + themedContext = activity; + + final View layout = View.inflate(themedContext, R.layout.gpx_export_dialog, null); builder.setView(layout); final TextView text = ButterKnife.findById(layout, R.id.info); |
