Pārlūkot izejas kodu

Fix: AnnotationAttributeWindow does not show below Android 5.0

cooperku_kdanmobile 5 gadi atpakaļ
vecāks
revīzija
e4310613f6

+ 3 - 0
src/main/java/com/kdanmobile/reader/view/AnnotationAttributeWindow.kt

@@ -3,6 +3,7 @@ package com.kdanmobile.reader.view
 import android.content.Context
 import android.os.Build
 import android.support.v4.content.ContextCompat
+import android.widget.LinearLayout
 import android.widget.PopupWindow
 import com.kdanmobile.reader.R
 
@@ -10,6 +11,8 @@ class AnnotationAttributeWindow(context: Context, isSimpleMode: Boolean) : Popup
     val annotationAttributeView: AnnotationAttributeView
 
     init {
+        width = LinearLayout.LayoutParams.WRAP_CONTENT
+        height = LinearLayout.LayoutParams.WRAP_CONTENT
         isOutsideTouchable = true
         isFocusable = true
         if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {