App crashing when setting new content view

后端 未结 3 1852
误落风尘
误落风尘 2021-01-24 08:26

Edit:

It seems my button styles are causing the issue.

Edit Code

buttonL.setOnTouchListener(new View.OnTouchListener() {

        public boolean          


        
3条回答
  •  心在旅途
    2021-01-24 09:10

    From logcat the problem is background of your Button. I think it's somehow big image so it overflow your memory.

    First
    Try to remove any @drawable in menu_system.xml especially android:background in Button
    Run your if it's work then you know where to look.

    Second(for workaround)
    Move your background image file to bigger folder
    from drawable to drawable-xhdpi

提交回复
热议问题