现在我想设置这样风格的标签控件: “替代文字”

我应该怎么办?我所知道的可能性是修改Android源代码,任何更好的想法?非常感谢!

有帮助吗?

解决方案

我用片段进行招:请参阅 Android的文件。所以,你应该在什么都布局添加例如4个按钮,并显示他们的点击一个4个不同的片段,下面是显示一个片段的样本:

    FragmentTransaction ft = getFragmentManager().beginTransaction();
    Fragment prev = getFragmentManager().findFragmentByTag(TAG_APP_DIALOG); 
    if (prev != null) {
        ft.remove(prev);
    }
    // Create and show the dialog fragment.
    DialogFragment newFragment = AppDialogFragment.newInstance(folderName, this, appInfos);
    newFragment.setRetainInstance(false);
    ft.add(mRootLayout.getId(), newFragment, TAG_APP_DIALOG);
    ft.commit();
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top