小编Sei*_*ahi的帖子

扩展ActionBarActivity时,类型活动的层次结构不一致

嗨我有appcompat操作栏的新v7支持库,当我想从这里记录的ActionBarActivity扩展时,eclipse告诉我这个错误

The hierarchy of the type testActivity is inconsistent
Run Code Online (Sandbox Code Playgroud)

当我在ActionBarActivity类上移动我的courser时,它说

The type android.support.v4.app.TaskStackBuilder$SupportParentable cannot be resolved. It is indirectly referenced from required .class files
Run Code Online (Sandbox Code Playgroud)

现在我该如何解决这个问题?

android android-support-library android-actionbar-compat

9
推荐指数
1
解决办法
1万
查看次数

如何设置UIView大小以匹配parrent而不受编程限制

这个问题听起来很容易但却让我发疯.我在IB中创建了一个名为iBag的白色视图,通过约束,它的大小取决于屏幕大小.

在此输入图像描述

现在我想以编程方式创建一个新的UIView,并通过此代码将iBag添加为具有相同大小和位置的子视图

let newView = UIView()
newView.frame =  (frame: CGRect(x: 0, y: 0, width: iBag.frame.width, height: iBag.frame.height))
newView.backgroundColor = UIColor.redColor()
iBag.addSubview(newView)
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

我也尝试了界限,但没有帮助.我可以使用约束来解决问题,但我想了解什么是错的.

uiview ios cgrect swift

9
推荐指数
3
解决办法
2万
查看次数