
The Fragments and an Activity which tie all of the swap views together has begun. The first bit of implementation is to get the current wifi network displayed, which worked out alright. This commit contains a lot of theme related stuff, particularly involving taking assets from carries mockups and making them suitable to use as drawables. The process for doing this is a story for another day, but I'll document it and put it on the wiki in the future. carrie showed me a script that a mate of hers used on another project, and I've adapted it a little to make it work nicely here (note - it isn't in this commit). The button is blue, and always shown with associated text in the ActionBar. This required a custom drawable which was set as the background in the styles.xml.
126 lines
5.8 KiB
XML
126 lines
5.8 KiB
XML
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
|
|
|
<style name="AppBaseThemeDark" parent="Theme.AppCompat">
|
|
<!-- backward-compatibility theme options go here -->
|
|
</style>
|
|
|
|
<style name="AppBaseThemeLight" parent="Theme.AppCompat.Light">
|
|
<!-- backward-compatibility theme options go here -->
|
|
</style>
|
|
|
|
<style name="AppBaseThemeLightWithDarkActionBar" parent="Theme.AppCompat.Light.DarkActionBar">
|
|
<!-- backward-compatibility theme options go here -->
|
|
</style>
|
|
|
|
<color name="black">#FF000000</color>
|
|
<color name="white">#FFFFFFFF</color>
|
|
<color name="red">#FFFF0000</color>
|
|
|
|
<style name="AboutDialogLight" parent="@android:style/Theme.Dialog">
|
|
<item name="@android:windowBackground">@color/black</item>
|
|
<item name="@android:textColor">@color/white</item>
|
|
</style>
|
|
|
|
<style name="AppThemeDark" parent="AppBaseThemeDark">
|
|
<!-- customizations that are not API-level specific go here. -->
|
|
</style>
|
|
|
|
<style name="AppThemeLight" parent="AppBaseThemeLight">
|
|
<!-- customizations that are not API-level specific go here. -->
|
|
</style>
|
|
|
|
<style name="AppThemeLightWithDarkActionBar" parent="AppBaseThemeLightWithDarkActionBar">
|
|
<!-- customizations that are not API-level specific go here. -->
|
|
</style>
|
|
|
|
<style name="SwapTheme.Wizard" parent="AppThemeDark">
|
|
<item name="android:windowBackground">@drawable/swap_window_background</item>
|
|
<item name="android:actionBarStyle">@style/Widget.AppCompat.ActionBar.Solid</item>
|
|
<item name="android:actionButtonStyle">@style/SwapTheme.Wizard.ActionButton</item>
|
|
</style>
|
|
|
|
<style name="SwapTheme.AppList" parent="AppThemeLightWithDarkActionBar">
|
|
</style>
|
|
|
|
<style name="SwapTheme.AppList.StartButton">
|
|
<item name="android:layout_marginLeft">9dp</item> <!-- 16px * 96dpi / 160dpi -->
|
|
<item name="android:layout_marginRight">9dp</item> <!-- 16px * 96dpi / 160dpi -->
|
|
<item name="android:layout_height">63.3dp</item> <!-- 113px * 96dpi / 160dpi -->
|
|
<item name="android:layout_width">match_parent</item>
|
|
|
|
<item name="android:textSize">18.5sp</item> <!-- 33px * 96dpi / 160dpi -->
|
|
<item name="android:background">@drawable/swap_start_button_skin</item>
|
|
<item name="android:textColor">#fff</item>
|
|
<item name="android:drawableLeft">@drawable/ic_swap</item>
|
|
<item name="android:paddingLeft">10dp</item>
|
|
|
|
</style>
|
|
|
|
<style name="SwapTheme.AppList.MainText">
|
|
<item name="android:textAlignment">center</item>
|
|
<item name="android:textSize">20.1sp</item> <!-- 36px * 96dpi / 160dpi -->
|
|
<item name="android:paddingLeft">28dp</item> <!-- 50px * 96dpi / 160dpi -->
|
|
<item name="android:paddingRight">28dp</item> <!-- 50px * 96dpi / 160dpi -->
|
|
<item name="android:paddingTop">28dp</item> <!-- 50px * 96dpi / 160dpi -->
|
|
<item name="android:paddingBottom">16.8dp</item> <!-- 30px * 96dpi / 160dpi -->
|
|
</style>
|
|
|
|
<style name="SwapTheme.Wizard.Text">
|
|
<item name="android:textAlignment">center</item>
|
|
<item name="android:textColor">#fff</item>
|
|
<item name="android:textColorPrimary">#fff</item>
|
|
<item name="android:textColorSecondary">#fff</item>
|
|
</style>
|
|
|
|
<style name="SwapTheme.Wizard.ActionButton" parent="Widget.AppCompat.ActionButton">
|
|
<item name="android:textAppearance">@style/SwapTheme.Wizard.Text</item>
|
|
<item name="android:paddingLeft">10dp</item>
|
|
<item name="android:paddingRight">10dp</item>
|
|
<item name="android:paddingTop">5dp</item>
|
|
<item name="android:paddingBottom">5dp</item>
|
|
<item name="android:background">@drawable/swap_action_button_skin</item>
|
|
</style>
|
|
|
|
<style name="SwapTheme.Wizard.MainText" parent="@style/SwapTheme.Wizard.Text">
|
|
<item name="android:paddingLeft">40dp</item>
|
|
<item name="android:paddingRight">40dp</item>
|
|
<item name="android:paddingTop">39.3dp</item> <!-- 70px * 96dpi / 160dpi -->
|
|
<item name="android:paddingBottom">29.25dp</item> <!-- 52px * 96dpi / 160dpi -->
|
|
<item name="android:fontFamily">sans-serif-light</item>
|
|
</style>
|
|
|
|
<style name="SwapTheme.Wizard.LocalIpAddress" parent="@style/SwapTheme.Wizard.Text">
|
|
<item name="android:textSize">32.5sp</item> <!-- 58px * 96dpi / 160dpi -->
|
|
<item name="android:paddingLeft">40dp</item>
|
|
<item name="android:paddingRight">40dp</item>
|
|
<item name="android:paddingTop">22.5dp</item> <!-- 40px * 96dpi / 160dpi -->
|
|
<item name="android:paddingBottom">42.5dp</item> <!-- 75px * 96dpi / 160dpi -->
|
|
<item name="android:textStyle">bold</item>
|
|
</style>
|
|
|
|
<style name="SwapTheme.Wizard.WifiSSID" parent="@style/SwapTheme.Wizard.Text">
|
|
<item name="android:textSize">26sp</item> <!-- 46px * 96dpi / 160dpi -->
|
|
<item name="android:paddingLeft">40dp</item>
|
|
<item name="android:paddingRight">40dp</item>
|
|
<item name="android:paddingTop">20dp</item>
|
|
<item name="android:paddingBottom">5dp</item>
|
|
<item name="android:textStyle">bold</item>
|
|
</style>
|
|
|
|
<!--
|
|
Buttons down the bottom of the screen, which prompt the user for further
|
|
info, or to change the process somehow (e.g. Use Bluetooth instead of Wifi).
|
|
-->
|
|
<style name="SwapTheme.Wizard.OptionButton">
|
|
<item name="android:layout_width">match_parent</item>
|
|
<item name="android:layout_height">wrap_content</item>
|
|
<item name="android:padding">19dp</item> <!-- 34px * 96dpi / 160dpi -->
|
|
<item name="android:textSize">20.25sp</item> <!-- 36px * 96dpi / 160dpi -->
|
|
<item name="android:background">@drawable/swap_button_skin</item>
|
|
<item name="android:textColor">#fff</item>
|
|
<item name="android:fontFamily">sans-serif-light</item>
|
|
<item name="android:layout_margin">0dp</item>
|
|
</style>
|
|
|
|
</resources>
|