安卓5.0的三星设备忽略了我的颜色进度条(在styles.xml中设置).使用三星的默认蓝色代替.
<style name="Progress">
<item name="colorControlActivated">#000000</item>
</style>
Run Code Online (Sandbox Code Playgroud)
进度条位于工具栏中:
<android.support.v7.widget.Toolbar
...
>
<ProgressBar
android:id="@+id/progress_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true"
android:theme="@style/Progress"/>
</android.support.v7.widget.Toolbar>
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
android samsung-mobile samsung-touchwiz android-5.0-lollipop
Open-CV 2.4 Android-Java:
我搜索了等高线(MatofPoint列表),如下所示:
Imgproc.findContours(roi_mat, contours, hierarchy, cfg.retMode, cfg.apxMode);
Run Code Online (Sandbox Code Playgroud)
然后是凸壳(必须是MatofInt的列表)
for (int k=0; k < contours.size(); k++){
Imgproc.convexHull(contours.get(k), hull.get(k));
}
Run Code Online (Sandbox Code Playgroud)
凸壳需要一个MatofInt,但是drawcontours想要一个MatofPoint ..那么该怎么办?
Thx提前..
编辑:@ OpenCV4Android
for (int k=0; k < contours.size(); k++){
Imgproc.convexHull(contours.get(k), hullInt);
for(int j=0; j < hullInt.toList().size(); j++){
hullPointList.add(contours.get(k).toList().get(hullInt.toList().get(j)));
}
hullPointMat.fromList(hullPointList);
hullPoints.add(hullPointMat);
}
Imgproc.drawContours( mROI, hullPoints, -1, new Scalar(255,0,0, 255), 1);
Run Code Online (Sandbox Code Playgroud) 我正在使用AppCompat v21
Style"NoActionBar"并添加一个Action/Toolbar onCreate
.
还添加了Feinstein的SlidingMenu,这导致了Activity(因此内部片段)与Android的导航按钮重叠的问题(它没有完全显示,在底部被切断)
如果我添加:
android:layout_marginBottom="48dp"
Run Code Online (Sandbox Code Playgroud)
在布局中,一切都是可见的(当然).
在Android 4.4上.一切都正常显示.
使用支持lib在Android L上我缺少什么?
SlidingMenu在onCreate中添加:
super.onCreate(..)
setContentView(..)
menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.LEFT);
menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN);
menu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);
menu.setMenu(R.layout.menu);
menu.setBehindWidthRes(200dp);
Run Code Online (Sandbox Code Playgroud)
解:
这个问题在这里说明https://github.com/jfeinstein10/SlidingMenu/issues/680(包括解决方案)
Slding Menu to SLIDING_CONTENT
OR: update the SlidingMenu source like mentioned in the link aboce
Run Code Online (Sandbox Code Playgroud)
更好的解决方案:(
也在5.0上使用三星设备) - 由withaay提供
将以下行添加到SlidingMenu构造函数对我有用.我没有必要进行任何其他代码更改.
Run Code Online (Sandbox Code Playgroud)if(Build.VERSION.SDK_INT >= 21) setSystemUiVisibility(SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION)
android android-appcompat android-actionbaractivity jfeinstein android-5.0-lollipop