mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-04-30 14:24:25 +02:00
fix check resource id is zero when search attribute by name
This commit is contained in:
parent
0e161a4321
commit
5d834d9cd7
@ -244,6 +244,7 @@
|
|||||||
}
|
}
|
||||||
return searchAttributeByResourceId(resourceId);
|
return searchAttributeByResourceId(resourceId);
|
||||||
}
|
}
|
||||||
|
// Searches attribute with resource id = 0
|
||||||
public ResXmlAttribute searchAttributeByName(String name){
|
public ResXmlAttribute searchAttributeByName(String name){
|
||||||
ResXmlStartElement startElement=getStartElement();
|
ResXmlStartElement startElement=getStartElement();
|
||||||
if(startElement!=null){
|
if(startElement!=null){
|
||||||
|
@ -168,12 +168,13 @@
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
// Searches attribute with resource id = 0
|
||||||
public ResXmlAttribute searchAttributeByName(String name){
|
public ResXmlAttribute searchAttributeByName(String name){
|
||||||
if(name==null){
|
if(name==null){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
for(ResXmlAttribute attribute:listResXmlAttributes()){
|
for(ResXmlAttribute attribute:listResXmlAttributes()){
|
||||||
if(name.equals(attribute.getFullName()) || name.equals(attribute.getName())){
|
if(name.equals(attribute.getName()) || name.equals(attribute.getFullName())){
|
||||||
return attribute;
|
return attribute;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user