如何避免标签布局(包括SurfaceView)在TabHost的查询股价/裁剪? [英] How to avoid mixup / clipping of tab layouts (incl. SurfaceView) in TabHost?

查看:115
本文介绍了如何避免标签布局(包括SurfaceView)在TabHost的查询股价/裁剪?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目,我使用一个标签主机。在其中一个选项卡存在,这包括一些透明区域作为背景的​​ImageView的片段的片段活动。

In my project I am using a tab host. In one of the tabs there is a Fragment Activity with a Fragment that includes an ImageView with some transparent regions as a background.

现在,在另一个选项卡中,我包括。 (修正后)<一href=\"http://$c$c.google.com/p/zxing/source/browse/trunk/android/src/com/google/zxing/client/android/CaptureActivity.java\"相对=nofollow>斑马线的QR扫描仪库CaptureActivity 。我已经通过使它在纵向模式下工作的所有的喧嚣去了。我的问题是,当我打开了CaptureActivity之前,上述的(而且只有在特定情况并序)一个片段中,CaptureActivity的布局被搞砸了。该片段的背景图像显示(虽然不是已包含在此布局)和相机preVIEW仅在透明区域中所示,见下文。
现在,我不知道这是否与这里包括表面观做的。

Now, in another tab I am incl. the (modified) CaptureActivity of the ZXing QR-Scanner library. I already went through all the hustle of making it work in portrait mode. My issue is, that when I open that one fragment mentioned above (and only in that specific case and order) before the CaptureActivity, the CaptureActivity's layout gets screwed up. The background image of the fragment is shown (although not incl. in this layout) and the camera preview is only shown in the transparent areas, see below. Now, I don't know if that has to do with the surface view included here.

不知怎的,这似乎不仅是一个绘图/剪贴的问题,因为你可以看到TextView是被绘制在surfaceview的顶部,实际上是面向的android:layout_gravity =底部| CENTER_HORIZONTAL(和作品这种方式在所有其他情况下),但是当这个问题出现的TextView似乎另一个片段的布局,包括内越来越一致。部分透明背景的ImageView。

Somehow it seems to not only be a drawing / clipping issue, because the textview you can see is drawn on top of the surfaceview and is actually orientated android:layout_gravity="bottom|center_horizontal" (and works that way in every other case), but when this issue occurs the textview seems to be getting aligned within the other fragment layout that incl. the partially transparent background imageview.

任何提示真的AP preciated。我可以张贴一些code,如果我有一个铅可能是什么问题就在这里。
谢谢!

Any hints are really appreciated. I can post some code if I have a lead what might be the problem here. Thanks!

推荐答案

在最后,我可以通过重命名用作背景的ImageView的绘制的绘制,PNG解决问题。虽然我之前检查这一点,我不知道是否有与库中的ID的查询股价或者我打了一些错误的。

In the end I could solve the issue by renaming the drawable-png used as a drawable of the background imageview. Although I checked this before, I don't know if there was a mixup in the ids with the library or maybe I hit some kind of bug.

这篇关于如何避免标签布局(包括SurfaceView)在TabHost的查询股价/裁剪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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