File tree Expand file tree Collapse file tree
crates/tauri-cli/templates/mobile/android/app/src/main/res Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " tauri-cli " : patch:enhance
3+ " @tauri-apps/cli " : patch:enhance
4+ ---
5+
6+ Use ` Theme.Material3.DayNight.NoActionBar ` instead of ` Theme.MaterialComponents.DayNight.NoActionBar ` when running ` tauri android init `
Original file line number Diff line number Diff line change 11<resources xmlns : tools =" http://schemas.android.com/tools" >
22 <!-- Base application theme. -->
3- <style name =" Theme.{{snake-case app.name}}" parent =" Theme.MaterialComponents .DayNight.NoActionBar" >
3+ <style name =" Theme.{{snake-case app.name}}" parent =" Theme.Material3 .DayNight.NoActionBar" >
44 <!-- Customize your theme here. -->
55 </style >
66</resources >
Original file line number Diff line number Diff line change 11<resources xmlns : tools =" http://schemas.android.com/tools" >
22 <!-- Base application theme. -->
3- <style name =" Theme.{{snake-case app.name}}" parent =" Theme.MaterialComponents .DayNight.NoActionBar" >
3+ <style name =" Theme.{{snake-case app.name}}" parent =" Theme.Material3 .DayNight.NoActionBar" >
44 <!-- Customize your theme here. -->
55 </style >
66</resources >
Original file line number Diff line number Diff line change 239239<div
240240 id =" sidebarToggle"
241241 bind:this ={sidebarToggle }
242- class =" z-2000 hidden lt-sm:flex justify-center items-center absolute top-2 left-2 w-8 h-8 rd-8
242+ class =" z-2000 hidden lt-sm:flex justify-center absolute items-center w-8 h-8 rd-8
243243 bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"
244244>
245245 {#if isSideBarOpen }
250250</div >
251251
252252<div
253- class =" flex h-screen w-screen overflow-hidden children-pt4 children-pb-2 text-primaryText dark:text-darkPrimaryText"
253+ class =" flex h-screen w-screen overflow-hidden text-primaryText dark:text-darkPrimaryText"
254254>
255255 <aside
256256 id =" sidebar"
257257 bind:this ={sidebar }
258258 class =" lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999
259- bg-darkPrimaryLighter transition-colors-250 overflow-hidden grid grid-rows-[min-content_auto] select-none px-2"
259+ bg-darkPrimaryLighter transition-colors-250 overflow-hidden grid grid-rows-[min-content_auto] content-start select-none px-2"
260260 >
261261 <img
262262 class =" self-center p-7 cursor-pointer"
Original file line number Diff line number Diff line change @@ -42,9 +42,32 @@ code.code-block {
4242 width : 18.75rem ;
4343}
4444
45- @media screen and ( max- width: 640px ) {
45+ @media screen and ( width < 640px) {
4646 # sidebar {
4747 --translate-x : -18.75rem ;
4848 transform : translateX ( var ( --translate-x ) ) ;
4949 }
5050}
51+
52+ # sidebar ,
53+ main {
54+ padding-top : calc ( env ( safe-area-inset-top) + 1rem ) ;
55+ }
56+
57+ # sidebar {
58+ padding-left : calc ( env ( safe-area-inset-left) + 0.5rem ) ;
59+ }
60+
61+ main {
62+ padding-right : env ( safe-area-inset-right) ;
63+ }
64+
65+ # sidebarToggle {
66+ margin-top : calc ( env ( safe-area-inset-top) + 0.5rem ) ;
67+ margin-left : calc ( env ( safe-area-inset-left) + 0.5rem ) ;
68+ }
69+
70+ # sidebar ,
71+ # console {
72+ padding-bottom : calc ( env ( safe-area-inset-bottom) + 1.5rem ) ;
73+ }
You can’t perform that action at this time.
0 commit comments