Android Make this member "protected"
时间: 2023-07-19 16:36:18 浏览: 192
To make a member "protected" in Android, simply add the keyword "protected" before the data type or method name in the class definition. For example:
```
protected int myProtectedInt;
protected void myProtectedMethod() {
// method body
}
```
This will make the member accessible within the class and its subclasses, but not accessible outside of the class hierarchy.
阅读全文