Add title and icon in panel header

- Add getIcon() and getSubTitle() in PanelContent
- Check icon avalibility to decide header layout
- Add test cases

Bug: 147776885
Test: make -j42 RunSettingsRoboTests
Change-Id: Idb51e81359b6037ca9b90965dd9b370fc5e22c84
This commit is contained in:
timhypeng
2020-01-16 10:14:13 +08:00
parent 07416f4bee
commit adae7475b0
5 changed files with 142 additions and 3 deletions

View File

@@ -28,6 +28,20 @@ import java.util.List;
*/
public interface PanelContent extends Instrumentable {
/**
* @return a icon resource for the title of the Panel.
*/
default int getIcon() {
return -1;
}
/**
* @return a string for the subtitle of the Panel.
*/
default CharSequence getSubTitle() {
return null;
}
/**
* @return a string for the title of the Panel.
*/