mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-02 04:07:42 +08:00
add context.getPackageName
This commit is contained in:
parent
6ef1eb6c4c
commit
a014db4443
@ -59,6 +59,10 @@ const DisplayMetrics& Assets::getDisplayMetrics(){
|
||||
return mDisplayMetrics;
|
||||
}
|
||||
|
||||
const std::string Assets::getPackageName()const{
|
||||
return mName;
|
||||
}
|
||||
|
||||
const std::string Assets::getTheme()const{
|
||||
return mThemeName;
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ public:
|
||||
~Assets();
|
||||
int loadStyles(const std::string&resid);
|
||||
void clearStyles();
|
||||
const std::string getPackageName()const override;
|
||||
const std::string getTheme()const override;
|
||||
void setTheme(const std::string&theme)override;
|
||||
const DisplayMetrics&getDisplayMetrics()override;
|
||||
|
@ -20,7 +20,7 @@ static std::vector<std::string> split(const std::string & path) {
|
||||
return vec;
|
||||
}
|
||||
|
||||
AttributeSet::AttributeSet():AttributeSet(nullptr,std::string()){
|
||||
AttributeSet::AttributeSet():AttributeSet(nullptr,""){
|
||||
}
|
||||
|
||||
AttributeSet::AttributeSet(Context*ctx,const std::string&package){
|
||||
|
@ -15,6 +15,7 @@ class Drawable;
|
||||
class ColorStateList;
|
||||
class Context{
|
||||
public:
|
||||
virtual const std::string getPackageName()const=0;
|
||||
virtual const std::string getTheme()const=0;
|
||||
virtual void setTheme(const std::string&theme)=0;
|
||||
virtual const DisplayMetrics&getDisplayMetrics()=0;
|
||||
|
Loading…
Reference in New Issue
Block a user