From 0a25d15dce3e386e5a34e2630cd927ffc3fd5699 Mon Sep 17 00:00:00 2001 From: Ezerous Date: Wed, 5 Sep 2018 22:04:07 +0300 Subject: [PATCH] Upload PopupWindow fix --- .../gr/thmmy/mthmmy/activities/upload/UploadActivity.java | 5 ++++- app/src/main/res/values/styles.xml | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java index b2b30801..a4e700a4 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java @@ -22,6 +22,7 @@ import android.text.Spannable; import android.text.TextWatcher; import android.text.method.LinkMovementMethod; import android.text.style.ForegroundColorSpan; +import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; import android.widget.AdapterView; @@ -223,10 +224,12 @@ public class UploadActivity extends BaseActivity { if (layoutInflater == null) { return; } + + Context wrapper = new ContextThemeWrapper(this, R.style.PopupWindow); View popUpContent = layoutInflater.inflate(R.layout.activity_upload_filename_info_popup, null); //Creates the PopupWindow - PopupWindow popUp = new PopupWindow(view.getContext()); + PopupWindow popUp = new PopupWindow(wrapper); popUp.setContentView(popUpContent); popUp.setWidth(LinearLayout.LayoutParams.WRAP_CONTENT); popUp.setHeight(LinearLayout.LayoutParams.WRAP_CONTENT); diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 52f525c2..78909d7b 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -54,6 +54,10 @@ 8dp + +