fix ViewConfiguration's props loading

This commit is contained in:
侯歌 2024-07-04 16:27:31 +08:00
parent 97353a3687
commit 0fad6ff838

View File

@ -37,7 +37,7 @@ ViewConfiguration::ViewConfiguration(Context* context):ViewConfiguration(){
AttributeSet atts(context,"");
WindowManager::getInstance().getDefaultDisplay().getMetrics(metrics);
const float sizeAndDensity = metrics.density;
atts = context->obtainStyledAttributes("@style/view_Configuration");
atts = context->obtainStyledAttributes(context->getPackageName()+":style/view_Configuration");
if(atts.size()==0)
atts = context->obtainStyledAttributes("cdroid:style/view_Configuration");
mEdgeSlop = (int) (sizeAndDensity * EDGE_SLOP + 0.5f);