Lollipop上的Android应用程序与旧版本的行为不同

时间:2015-09-21 12:22:13

标签: android android-5.0-lollipop

我开发并发布了一个用于谜语的应用程序。我有Lollipop设备的问题,我在KitKat和Jelly Bean上构建并运行了应用程序,它可以工作。但是当涉及到Lollipop时,主要活动的背景可以设置但不是白色。此外,在设置活动中,customthumbs不再具有我设置的颜色,但几乎不可见,并且应用程序在启动幻灯片活动和片段后退卡操作时崩溃。

我列出的所有要点都适用于Lollipop之前的版本:

1)背景主要活动:

relativeLayout.setBackgroundResource(arrayBackground[backgroundChoice]);

2)Thumbs开关基于sharedPreferences设置:

 switchRisolti.setThumbResource(R.color.blue);

3)开始幻灯片活动

Intent intent = new Intent(Impostazioni.this, ScreenSlideActivity.class);
            startActivity(intent);`

4)片段翻转卡:

//LOAD FRAGMENT
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
CardFrontFragment fragment = new CardFrontFragment();
fragmentTransaction.add(R.id.fragment_container, fragment);
fragmentTransaction.commit();

1 个答案:

答案 0 :(得分:0)

检查您的res持有人,可能您有一个values-v21文件夹,其中指定了从Lollipop及更新版本中使用的style.xml

相关问题