GithubHelp home page GithubHelp logo

zyyoona7 / easypopup Goto Github PK

View Code? Open in Web Editor NEW
1.5K 34.0 215.0 1.34 MB

「暂停维护」PopupWindow Wrapper. 对 PopupWindow 的封装。可指定相对于 anchor view 各个方位弹出,设置背景变暗,指定 ViewGroup 背景变暗等特性。

License: Apache License 2.0

Java 98.57% Kotlin 1.43%
android popupwindow relative-anchorview background-dark

easypopup's People

Contributors

xuqk avatar zyyoona7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easypopup's Issues

软件盘冲突

在有软件盘弹出的情况下,再弹出pop,位置改变

有一个疑问

mQQPop = EasyPopup.create()
.setContext(this)
.setContentView(R.layout.layout_right_pop)
.setAnimationStyle(R.style.RightTop2PopAnim)
.setOnViewListener(new EasyPopup.OnViewListener() {
@OverRide
public void initViews(View view) {
// View arrowView = mQQPop.findViewById(R.id.v_arrow);
// arrowView.setBackground(new TriangleDrawable(TriangleDrawable.TOP, Color.parseColor("#404040")));

                }
            })
            .setFocusAndOutsideEnable(true)
            .apply();
    **View arrowView = mQQPop.findViewById(R.id.v_arrow);
    arrowView.setBackground(new TriangleDrawable(TriangleDrawable.TOP, Color.parseColor("#404040")));**

定义的View写在initView()里面,和外面有啥区别?

键盘遮挡控件问题

如果PopupWindow布局有EditText,我在你封装的控件中添加了setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)发现并没有用,有什么解决方案吗?

窗口高度为奇数时,最底部1px高度忽隐忽现

假如窗口高度为奇数时,最底部1px高度忽隐忽现,描边1px看更明显。窗口高度刚好是偶数的时候是正常的,有动态数据时,一个笨方法是计算设置偶数高度,希望有更好的解决方法

请教一个问题

就是pop在recyclerview的item的一个view点击触发之后位于该view的下方弹出.有时候会出现这么个情况,就是会被该item遮挡住,请问这是什么引起的?

重复类名

lib和lib-kt 里面发生了类名冲突,
有两个 com.zyyoona7.lib.BuildConfig

向上展示recyclerview高度无法包裹的问题

您好,我在使用的时候发现设置成向上展示时,列表中的item不管多少popupwindow的高度都不改变,但是我的item设置的高度为wrap,只有设置recyclerview的高度才能够改变这个高度

It crashed on call showAtAnchorView().

It call android.view.ContextThemeWrapper cannot be cast to android.app.Activity.

My source:
image

        EasyPopup(textView.context)
                .setContentView<EasyPopup>(R.layout.popup_vehicle_picker)
                //是否允许点击PopupWindow之外的地方消失
                .setFocusAndOutsideEnable<EasyPopup>(true)
                //允许背景变暗
                .setBackgroundDimEnable<EasyPopup>(true)
                //变暗的透明度(0-1),0为完全透明
                .setDimValue<EasyPopup>(0.4f)
                .createPopup<EasyPopup>()
                .showAtAnchorView(textView, VerticalGravity.BELOW, HorizontalGravity.CENTER, 0, 0)

Log:

04-03 16:01:14.574 32057-32057/? E/MtaSDK: java.lang.ClassCastException: android.view.ContextThemeWrapper cannot be cast to android.app.Activity
        at com.zyyoona7.lib.EasyPopup.handleBackgroundDim(EasyPopup.java:607)
        at com.zyyoona7.lib.EasyPopup.showAtAnchorView(EasyPopup.java:452)
        at com.lxt.app.ui.maink6.helper.VehiclePickerHelper.popupVehiclePicker(VehiclePickerHelper.kt:35)

It happened at here:
image

有两个按钮 一个按钮显示一个popwindow,点击一个按钮,

有两个按钮 一个按钮显示一个popwindow,点击一个按钮,显示出来一个popwindow,再点击另外一个按钮,希望关闭当前显示的popwindow,显示另外一个popwindow出来,但是我发现你的popwindow是全屏的,点击布局以外的默认是关闭当前的,有什么方法能解决吗

运行不起来

E:\CodeTest\EasyPopup\app\src\main\java\com\zyyoona7\easypopup\kt\KotlinActivity.kt
Error:(15, 13) Unresolved reference: layoutId
Error:Execution failed for task ':app:compileDebugKotlin'.

Compilation error. See log for more details

隐藏键盘

com/zyyoona7/easypopup/easypop/EasyPopActivity.java:314
com/zyyoona7/easypopup/easypop/EasyPopActivity.java:303

用这句代码才能隐藏键盘:
KeyboardUtils.hideSoftInput(v);

点击外部按钮无法响应事件

EasyPopup(this)
.setContentView(R.layout.popup_test)
.setFocusAndOutsideEnable(false)
.showAsDropDown(it)
布局是一个很简单的TextView

库是不是限制了support最低版本是27.1.1?

我的项目support版本是26.1.0,引入库不是提示support版本要求27.1.1

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.1, 26.1.0. Examples include com.android.support:support-compat:27.1.1 and com.android.support:animated-vector-drawable:26.1.0 more... (Ctrl+F1)

就是编译通过运行报错
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:103)
我查过这个错误通常是引入了两个版本不同的support库导致的。
请问有什么办法可以解决?因为我的项目support库升级的话涉及很多的类,影响太大,所以暂时不能升级,希望有其他版本解决这个问题。

AS3.0.1版本引入库,运行的时候报合并错误

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

显示不全

当recycleview的item(最后一条或第一条item)条目只露出一点点的时候,如果设置在右边(或左边)显示的话popup的布局会被挤压,变成窄窄的一条。这个bug如何解决!需要多点击几次会把item带上去,然后才能显示全.(注:recycleview顶到屏幕最下边或者最上边时)

想请教一个问题

popup里有个RecyclerView,我动态删减item,popup能自动改变高度吗?(比如饿了麽商家界面购物车)

popup位置乱跳。

有一个可以滑动的recyview,滑动未停止时,去点击可以弹出的按钮,popu位置乱跳,不能在指定位置弹出。
secondMenuPopup.showAtAnchorView(view, VerticalGravity.CENTER, HorizontalGravity.RIGHT, 0, 0);

可以加下qq吗? 现在显示有点问题不明白

mBgDimPop.showAtLocation(view,Gravity.BOTTOM,0,0);用这个是正常显示

mBgDimPop.showAtAnchorView(view, YGravity.ALIGN_BOTTOM, 0, 0, 0); 用这个只会显示一半另一半跑到屏幕下边外面去了

java.lang.OutOfMemoryError

Failed to allocate a 1973732 byte allocation with 358096 free bytes and 349KB until OOM
com.zyyoona7.popup.BasePopup.initContentViewAndWH(BasePopup.java:139)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.