forked from zlgopen/awtk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
224 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,29 @@ | ||
<window anim_hint="htranslate" move_focus_prev_key="up" move_focus_next_key="down" text="Basic Controls"> | ||
<view x="0" y="10" w="100%" h="100%" children_layout="default(r=5,c=2,m=10)"> | ||
<column children_layout="default(r=2,c=1,ym=2,s=10)" > | ||
<check_button name="r1" text="icon at left1" focusable="true"/> | ||
<check_button name="r2" text="icon at left2" focusable="true" indeterminate="true" /> | ||
</column> | ||
|
||
<view x="0" y="10" w="100%" h="100%" children_layout="default(r=3,c=2,m=10,s=10)"> | ||
<column children_layout="default(r=2,c=1,ym=2,s=10)" > | ||
<check_button name="r1" text="icon at left1" focusable="true" style="left"/> | ||
<check_button name="r1" text="icon at right1" focusable="true" style="right" /> | ||
<check_button name="r2" text="icon at right2" focusable="true" indeterminate="true" style="right" /> | ||
</column> | ||
|
||
<column children_layout="default(r=2,c=1,ym=2,s=10)" > | ||
<check_button name="r1" text="icon at top1" focusable="true" style="top" /> | ||
<check_button name="r2" text="icon at top2" focusable="true" indeterminate="true" style="top" /> | ||
<check_button name="r1" text="icon at top" focusable="true" style="top" /> | ||
<check_button name="r1" text="icon at bottom" focusable="true" style="bottom" /> | ||
</column> | ||
|
||
<column children_layout="default(r=2,c=1,ym=2,s=10)" > | ||
<check_button name="r1" text="icon at bottom1" focusable="true" style="bottom" /> | ||
<check_button name="r2" text="icon at bottom2" focusable="true" indeterminate="true" style="bottom" /> | ||
<check_button name="r1" text="icon at left_top" focusable="true" style="left_top" /> | ||
<check_button name="r1" text="icon at right_top" focusable="true" style="right_top" /> | ||
</column> | ||
|
||
<column children_layout="default(r=2,c=1,ym=2,s=10)" > | ||
<check_button name="r1" text="icon at center1" focusable="true" style="center" /> | ||
<check_button name="r2" text="icon at center2" focusable="true" indeterminate="true" style="center" /> | ||
<check_button name="r1" text="icon at left_bottom" focusable="true" style="left_bottom" /> | ||
<check_button name="r1" text="icon at right_bottom" focusable="true" style="right_bottom" /> | ||
</column> | ||
|
||
<column children_layout="default(r=2,c=1,ym=2,s=10)" > | ||
<check_button name="r1" text="icon at center1" focusable="true" style="center" /> | ||
<check_button name="r2" text="icon at center2" focusable="true" indeterminate="true" style="center" /> | ||
<check_button name="r1" focusable="true" style="center" /> | ||
<check_button name="r1" focusable="true" style="center" /> | ||
</column> | ||
|
||
<column children_layout="default(r=2,c=1,ym=2,s=10)" > | ||
<check_button name="r1" text="icon at left_top1" focusable="true" style="left_top" /> | ||
<check_button name="r2" text="icon at left_top2" focusable="true" indeterminate="true" style="left_top" /> | ||
</column> | ||
|
||
<column children_layout="default(r=2,c=1,ym=2,s=10)" > | ||
<check_button name="r1" text="icon at right_top1" focusable="true" style="right_top" /> | ||
<check_button name="r2" text="icon at right_top2" focusable="true" indeterminate="true" style="right_top" /> | ||
</column> | ||
|
||
<column children_layout="default(r=2,c=1,ym=2,s=10)" > | ||
<check_button name="r1" text="icon at left_bottom1" focusable="true" style="left_bottom" /> | ||
<check_button name="r2" text="icon at left_bottom2" focusable="true" indeterminate="true" style="left_bottom" /> | ||
</column> | ||
|
||
<column children_layout="default(r=2,c=1,ym=2,s=10)" > | ||
<check_button name="r1" text="icon at right_bottom1" focusable="true" style="right_bottom" /> | ||
<check_button name="r2" text="icon at right_bottom2" focusable="true" indeterminate="true" style="right_bottom" /> | ||
</column> | ||
</view> | ||
</window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
# 用 icon_at 属性设置图标位置 | ||
|
||
## 1. style | ||
|
||
在 style 文件中通过 icon_at 属性设置图标位置。 | ||
|
||
```xml | ||
<style name="right_bottom" icon_at="right_bottom"> | ||
<normal icon="unchecked_right_bottom" /> | ||
<pressed icon="unchecked_right_bottom" /> | ||
<over icon="unchecked_right_bottom" text_color="green"/> | ||
<focused icon="unchecked_right_bottom" text_color="green"/> | ||
<normal_of_checked icon="checked_right_bottom" text_color="blue"/> | ||
<pressed_of_checked icon="checked_right_bottom" text_color="blue"/> | ||
<over_of_checked icon="checked_right_bottom" text_color="green"/> | ||
<focused_of_checked icon="checked_right_bottom" text_color="green"/> | ||
<normal_of_indeterminate icon="indeterminate" text_color="blue"/> | ||
<pressed_of_indeterminate icon="indeterminate" text_color="blue"/> | ||
<over_of_indeterminate icon="indeterminate" text_color="green"/> | ||
<focused_of_indeterminate icon="indeterminate" text_color="green"/> | ||
</style> | ||
``` | ||
|
||
## 2. 示例(多选按钮) | ||
|
||
### 2.1. left 图标在左边中间 | ||
|
||
* 代码 | ||
|
||
```xml | ||
<check_button text="icon at left1" focusable="true" style="left"/> | ||
``` | ||
|
||
* 效果 | ||
|
||
 | ||
|
||
### 2.2. right 图标在右边中间 | ||
|
||
* 代码 | ||
|
||
```xml | ||
<check_button text="icon at right1" focusable="true" style="right" /> | ||
``` | ||
|
||
* 效果 | ||
|
||
 | ||
|
||
### 2.3. top 图标在上边中间 | ||
|
||
* 代码 | ||
|
||
```xml | ||
<check_button text="icon at top" focusable="true" style="top" /> | ||
``` | ||
|
||
* 效果 | ||
|
||
 | ||
|
||
### 2.4. bottom 图标在下边中间 | ||
|
||
* 代码 | ||
|
||
```xml | ||
<check_button text="icon at bottom" focusable="true" style="bottom" /> | ||
``` | ||
|
||
* 效果 | ||
|
||
 | ||
|
||
### 2.5. left_top 图标在左上角 | ||
|
||
* 代码 | ||
|
||
```xml | ||
<check_button text="icon at left_top" focusable="true" style="left_top" /> | ||
``` | ||
|
||
* 效果 | ||
|
||
 | ||
|
||
### 2.6. right_top 图标在右上角 | ||
|
||
* 代码 | ||
|
||
```xml | ||
<check_button text="icon at right_top" focusable="true" style="right_top" /> | ||
``` | ||
|
||
* 效果 | ||
|
||
 | ||
|
||
|
||
### 2.7. left_bottom 图标在左下角 | ||
|
||
* 代码 | ||
|
||
```xml | ||
<check_button text="icon at left_bottom" focusable="true" style="left_bottom" /> | ||
``` | ||
|
||
* 效果 | ||
|
||
 | ||
|
||
### 2.8. right_bottom 图标在右下角 | ||
|
||
* 代码 | ||
|
||
```xml | ||
<check_button text="icon at right_bottom" | ||
focusable="true" style="right_bottom" /> | ||
``` | ||
|
||
* 效果 | ||
|
||
 | ||
|
||
### 2.9. center 图标在中间 | ||
|
||
> 注意:center 属性不要 text 属性,否则退化为 left 属性。 | ||
* 代码 | ||
|
||
```xml | ||
<check_button focusable="true" style="center" /> | ||
``` | ||
|
||
* 效果 | ||
|
||
 | ||
|
||
|
||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.