Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions apps/toolbox/src/pages/tabview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ class TabViewDemoModel extends Observable {
this.applyFontFamily('ns-playground-font');
};

useResIcons = () => {
if (!this.tabView || !this.tabView.items) return;
if (!__ANDROID__) return;
const resIcons = ['res://outline_home_24', 'res://outline_list_alt_24', 'res://outline_info_24'];
this.setIcons(resIcons);
};

clearIcons = () => {
if (!this.tabView || !this.tabView.items) return;
this.tabView.items.forEach((item) => {
Expand Down
16 changes: 9 additions & 7 deletions apps/toolbox/src/pages/tabview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@
</Page.actionBar>


<TabView id="demoTabView" selectedIndex="0" androidTabsPosition="top" class="m-t-10">
<TabView id="demoTabView" selectedIndex="0" androidTabsPosition="bottom" class="m-t-10">
<!-- First tab -->
<TabViewItem title="First" iconSource="font://&#x41;">
<StackLayout padding="20">
<Label class="description" textWrap="true" text="Test TabViewItem iconSource with sys:// (iOS SF Symbols) and font:// (custom/font glyph)." />

<GridLayout columns="*, *" rows="auto, auto, auto, auto" class="m-y-10">
<GridLayout columns="*, *" rows="auto, auto, auto, auto, auto" class="m-y-10">
<Button text="Use sys:// icons" col="0" row="0" tap="{{ useSysIcons }}" class="btn btn-primary" />
<Button text="Use font:// icons" col="1" row="0" tap="{{ useFontIcons }}" class="btn btn-primary" />
<Button text="Clear icons" colSpan="2" row="1" tap="{{ clearIcons }}" class="btn btn-primary" />
<!-- res:// icons live in App_Resources/Android — Android-only demo -->
<Button text="Use res:// icons (Android)" colSpan="2" row="1" tap="{{ useResIcons }}" class="btn btn-primary" />
<Button text="Clear icons" colSpan="2" row="2" tap="{{ clearIcons }}" class="btn btn-primary" />

<!-- iOS 26+ bottom accessory demo -->
<Button text="Add accessory" col="0" row="2" tap="{{ attachBottomAccessory }}" class="btn btn-primary" />
<Button text="Clear accessory" col="1" row="2" tap="{{ clearBottomAccessory }}" class="btn btn-secondary" />
<Button text="Add accessory" col="0" row="3" tap="{{ attachBottomAccessory }}" class="btn btn-primary" />
<Button text="Clear accessory" col="1" row="3" tap="{{ clearBottomAccessory }}" class="btn btn-secondary" />

<!-- iOS 26+ minimize behavior demo -->
<Button text="Minimize: Down" col="0" row="3" tap="{{ setMinimizeScrollDown }}" class="btn btn-primary" />
<Button text="Minimize: Never" col="1" row="3" tap="{{ setMinimizeNever }}" class="btn btn-secondary" />
<Button text="Minimize: Down" col="0" row="4" tap="{{ setMinimizeScrollDown }}" class="btn btn-primary" />
<Button text="Minimize: Never" col="1" row="4" tap="{{ setMinimizeNever }}" class="btn btn-secondary" />
</GridLayout>

<Label textWrap="true" class="t-12" text="Note: sys:// icons are iOS-only and map to SF Symbols via UIImage.systemImageNamed. On Android, sys:// will not render and is expected to show no icon." />
Expand Down
9 changes: 9 additions & 0 deletions packages/core/platforms/android/include.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repositories {
google()
mavenCentral()
}

dependencies {
def androidXMaterialVersion = project.hasProperty("androidXMaterial") ? androidXMaterial : (project.hasProperty("ns_default_androidx_material_version") ? ns_default_androidx_material_version : "1.8.0")
implementation "com.google.android.material:material:$androidXMaterialVersion"
}
Loading
Loading