Browse Source

Upload PopupWindow fix

uploads
Ezerous 6 years ago
parent
commit
0a25d15dce
No known key found for this signature in database GPG Key ID: 262B2954BBA319E3
  1. 5
      app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java
  2. 4
      app/src/main/res/values/styles.xml

5
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.TextWatcher;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.text.style.ForegroundColorSpan; import android.text.style.ForegroundColorSpan;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.AdapterView; import android.widget.AdapterView;
@ -223,10 +224,12 @@ public class UploadActivity extends BaseActivity {
if (layoutInflater == null) { if (layoutInflater == null) {
return; return;
} }
Context wrapper = new ContextThemeWrapper(this, R.style.PopupWindow);
View popUpContent = layoutInflater.inflate(R.layout.activity_upload_filename_info_popup, null); View popUpContent = layoutInflater.inflate(R.layout.activity_upload_filename_info_popup, null);
//Creates the PopupWindow //Creates the PopupWindow
PopupWindow popUp = new PopupWindow(view.getContext()); PopupWindow popUp = new PopupWindow(wrapper);
popUp.setContentView(popUpContent); popUp.setContentView(popUpContent);
popUp.setWidth(LinearLayout.LayoutParams.WRAP_CONTENT); popUp.setWidth(LinearLayout.LayoutParams.WRAP_CONTENT);
popUp.setHeight(LinearLayout.LayoutParams.WRAP_CONTENT); popUp.setHeight(LinearLayout.LayoutParams.WRAP_CONTENT);

4
app/src/main/res/values/styles.xml

@ -54,6 +54,10 @@
<item name="android:paddingBottom">8dp</item> <item name="android:paddingBottom">8dp</item>
</style> </style>
<style name="PopupWindow" parent="Widget.AppCompat.PopupWindow">
<item name="android:background">@android:color/transparent</item>
</style>
<style name="ToolbarTheme" parent="ThemeOverlay.AppCompat.Light"> <style name="ToolbarTheme" parent="ThemeOverlay.AppCompat.Light">
<item name="android:textColorPrimary">@android:color/white</item> <item name="android:textColorPrimary">@android:color/white</item>
<item name="android:colorBackground">@color/colorPrimary</item> <item name="android:colorBackground">@color/colorPrimary</item>

Loading…
Cancel
Save