add some assets

This commit is contained in:
侯歌 2022-02-09 10:42:48 +08:00
parent 38b836827a
commit 2ff03f52f1
8 changed files with 24 additions and 8 deletions

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:cdroid="http://schemas.android.com/apk/res/android"
cdroid:tint="?attr/colorForeground">
<solid cdroid:color="#1f000000" />
<size
cdroid:height="1dp"
cdroid:width="1dp" />
</shape>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:cdroid="http://schemas.android.com/apk/res/android"
cdroid:tint="?attr/colorControlNormal"
cdroid:shape="rectangle">
<solid
cdroid:color="#84ffffff" />
<size
cdroid:width="4dp"
cdroid:height="4dp" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -71,8 +71,7 @@ void Window::draw(){
RefPtr<Canvas>canvas=getCanvas();
mAttachInfo->mDrawingTime=SystemClock::uptimeMillis();
ViewGroup::draw(*canvas);
if(DEBUG_DRAW)drawInvalidateRegion(*canvas);
//canvas->invalidate(mInvalidRgn);
//if(DEBUG_DRAW)drawInvalidateRegion(*canvas);
mInvalidRgn->subtract(mInvalidRgn);
GraphDevice::getInstance().flip();
}

View File

@ -79,7 +79,6 @@ static void startElement(void *userData, const XML_Char *name, const XML_Char **
parent=dynamic_cast<ViewGroup*>(pd->views.back());
if(strcmp(name,"merge")==0)return;
if(inflater==nullptr){
//XML_StopParser(pd->parser,false);
pd->views.push_back(nullptr);
LOGE("Unknown Parser for %s",name);
return;
@ -94,9 +93,9 @@ static void startElement(void *userData, const XML_Char *name, const XML_Char **
View*v=inflater(pd->ctx,atts);
pd->parsedView++;
pd->views.push_back(v);
LOGV("%p:%08x [%s] %s",v,v->getId(),name,stname.c_str());
if(parent){
LayoutParams*lp=parent->generateLayoutParams(atts);
LOGV("<%s> layoutSize=%dx%d id:%d",name,lp->width,lp->height,v->getId());
parent->addViewInLayout(v,-1,lp,true);
}else{
LayoutParams*lp=((ViewGroup*)v)->generateLayoutParams(atts);

View File

@ -210,7 +210,6 @@ void TableLayout::onMeasure(int widthMeasureSpec, int heightMeasureSpec){
}
void TableLayout::onLayout(bool changed, int l, int t, int w, int h){
LOGD("TableLayout::onLayout(%d,%d-%d,%d)",l,t,w,h);
layoutVertical(l, t, w, h);
}

View File

@ -1391,14 +1391,15 @@ void ViewGroup::onDebugDraw(Canvas& canvas){
if (c->getVisibility() != View::GONE) {
Insets insets = c->getOpticalInsets();
drawRect(canvas,c->getLeft() + insets.left,c->getTop() + insets.top,
c->getRight() - insets.right - 1,c->getBottom() - insets.bottom - 1);
c->getRight() - insets.right - 1,c->getBottom() - insets.bottom - 1);
}
}
canvas.stroke();
// Draw margins
canvas.set_color(0x70FF00FF);
onDebugDrawMargins(canvas);//fill
canvas.set_color(0x800000FF);
onDebugDrawMargins(canvas);
canvas.stroke();
// Draw clip bounds
//paint.setColor(DEBUG_CORNERS_COLOR);