什么是使用HoloEverywhere的正确方法 [英] What's a correct way of using HoloEverywhere

查看:215
本文介绍了什么是使用HoloEverywhere的正确方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用HoloEverywhere库 Dev分支在我的应用程序。我明白,这仍然是在开发过程中,但演示似乎工作好了,所以我给它一个尝试。

I'm trying to use dev branch of HoloEverywhere library to in my app. I understood that this is still during development but the demo seems to work okay so I give it a try.

我把机器人:主题=@风格/ Holo.Theme.Sherlock.Light在我的清单中的活动。该活动的结构是,它的使用片段,一个是一个列表,另一个是只片段。在动作条看起来全息就好了。

I put android:theme="@style/Holo.Theme.Sherlock.Light" in the activity in my manifest. The structure of the activity is that it's using Fragment, one is a list and another is just Fragment. The ActionBar looks Holo just fine.

我把我的 SherlockFragmentActivity SActivity 片段 SFragment 。正如我检查的陪同演示程序。我打开的对话​​框中使用我的SFragment的code此块。

I turned my SherlockFragmentActivity into SActivity and Fragment into SFragment. Just as I checked in the accompanied demo app. I open dialog using this block of code in my SFragment.

    AlertDialog.Builder builder = new AlertDialog.Builder(context);
    builder.setTitle("Work in Progress")
            .setView(inflater.inflate(R.layout.extra_input))
            .setIcon(R.drawable.icon);
    builder.setPositiveButton("Positive", null);
    builder.setNegativeButton("Negative", null);
    builder.setNeutralButton("Neutral", null);
    builder.show();

对话框弹出看上去像操作系统的AlertDialog那里显示的EditText内extra_input布局全息。 ProgressDialog 也显示与操作系统的主题为好。

The dialog popped up looking like the OS's AlertDialog where EditText inside extra_input layout shown as Holo. ProgressDialog also display with OS's theme as well.

我相信这是我错误地实施了图书馆。现在的问题是怎么做的吧?

I believed this is me incorrectly implemented the library. The question is how to do it right?

编辑:解决了这个问题,我需要使用 com.WazaBe.HoloEverywhere.app.AlertDialog 而不是 android.app.AlertDialog 。愚蠢的我。

Solved it, I need to use com.WazaBe.HoloEverywhere.app.AlertDialog instead of android.app.AlertDialog. Silly me.

推荐答案

解决了这个问题,我需要使用 com.WazaBe.HoloEverywhere.app.AlertDialog 而不是 android.app.AlertDialog 。愚蠢的我。

Solved it, I need to use com.WazaBe.HoloEverywhere.app.AlertDialog instead of android.app.AlertDialog. Silly me.

答案补充建议。

这篇关于什么是使用HoloEverywhere的正确方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆