code check

This commit is contained in:
侯歌 2024-07-13 11:24:21 +08:00
parent 15bce396ea
commit ffd5d7753c
7 changed files with 13 additions and 6 deletions

View File

@ -11,8 +11,8 @@ Dialog::Dialog(Context*context){
}
Dialog::Dialog(Context* context,const std::string&resId):Dialog(context){
mWindow=new Window(0,0,640,320);
View*v=LayoutInflater::from(mWindow->getContext())->inflate(resId,mWindow,true);
mWindow = new Window(0,0,640,320);
LayoutInflater::from(mWindow->getContext())->inflate(resId,mWindow,true);
}
Dialog::~Dialog(){

View File

@ -82,8 +82,6 @@ void Keyboard::Key::onReleased(bool inside) {
int Keyboard::Key::parseCSV(const std::string& value,std::vector<int>& codes){
Tokenizer*token;
Tokenizer::fromContents("csv",value.c_str(),&token);
int ret=0;
int idx=0;
do{
std::string s=token->nextToken(",");
token->skipDelimiters(",");

View File

@ -6,9 +6,8 @@
namespace cdroid{
UIEventSource::UIEventSource(View*v,std::function<void()>r){
UIEventSource::UIEventSource(View*v,std::function<void()>r):mLayoutRunner(r){
mAttachedView = dynamic_cast<ViewGroup*>(v);
mLayoutRunner = r;
setOwned(true);
}

View File

@ -129,6 +129,11 @@ int BitmapDrawable::getGravity()const{
return mBitmapState->mGravity;
}
void BitmapDrawable::setDither(bool dither){
//mBitmapState.mPaint.setDither(dither);
invalidateSelf();
}
int BitmapDrawable::getIntrinsicWidth()const{
return mBitmapWidth;
}

View File

@ -65,6 +65,7 @@ public:
void setGravity(int gravity);
void setAntiAlias(bool aa);
bool hasAntiAlias()const;
void setDither(bool)override;
int getIntrinsicWidth()const override;
int getIntrinsicHeight()const override;
int getOpacity()override;

View File

@ -89,6 +89,9 @@ bool Drawable::isAutoMirrored() {
return false;
}
void Drawable::setDither(bool){
}
void Drawable::setColorFilter(ColorFilter*cf) {
delete mColorFilter;
mColorFilter = cf;

View File

@ -118,6 +118,7 @@ public:
int getLayoutDirection()const;
bool setLayoutDirection(int);
void setDither(bool);
virtual int getIntrinsicWidth() const;
virtual int getIntrinsicHeight()const;