Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
?
Keishin Yokomaku
February 18, 2015
Technology
2
350
?
Keishin Yokomaku
February 18, 2015
Tweet
Share
More Decks by Keishin Yokomaku
See All by Keishin Yokomaku
持続的なアプリ開発のためのDXを支える技術
keithyokoma
2
4.1k
Make the objects serializable with kotlinx.serialization
keithyokoma
0
3.2k
Kotlin で書く Gradle Custom Tasks
keithyokoma
0
400
DX Improvements
keithyokoma
3
310
Get Things Done with Gradle Custom Tasks
keithyokoma
1
82
詳解 Android Auto - 使い方からそれを支える技術まで -
keithyokoma
1
2k
Fail fast, Fail cheap, Fail automatically: Localization
keithyokoma
0
120
WebView😇😇😇
keithyokoma
0
630
Android 1.5 - 8.0 Walk through - Retro/Prospective Android Application Development
keithyokoma
4
250
Other Decks in Technology
See All in Technology
本社オフィスを移転し、 オフィスファシリティ・コーポレートIT を刷新した話
rotomx
3
1.2k
USB PD で迎える AC アダプター大統一時代
puhitaku
2
1.5k
データ分析基盤の要件分析の話(202201_JEDAI)
yabooun
0
170
WebLogic Server for OCI 概要
oracle4engineer
PRO
3
840
Pentesting Password Reset Functionality
anugrahsr
0
200
Deep dive in Reserved Instance ~脳死推奨量購入からの脱却~
kzkmaeda
0
380
2年で10→70人へ! スタートアップの 情報セキュリティ課題と施策
miekobayashi
1
200
Astroで始める爆速個人サイト開発
takanorip
12
8.4k
Multi-Cloud Gatewayでデータを統治せよ!/ Data Federation with MCG
tutsunom
1
140
lt53
98_justdoit
0
110
ECテックカンファレンス2023 EC事業部のモバイル開発2023
tatsumi0000
0
180
ERC3525 Semi-Fungible token
sbtechnight
0
330
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
689
180k
Building a Modern Day E-commerce SEO Strategy
aleyda
6
4.5k
Scaling GitHub
holman
453
140k
The Invisible Side of Design
smashingmag
292
48k
How To Stay Up To Date on Web Technology
chriscoyier
779
250k
Intergalactic Javascript Robots from Outer Space
tanoku
261
26k
Building Adaptive Systems
keathley
27
1.3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
239
19k
Docker and Python
trallard
30
1.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
270
12k
Making the Leap to Tech Lead
cromwellryan
116
7.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
56
2.5k
Transcript
? @KeithYokoma - Drivemode, Inc. potatotips #14
KeithYokoma Keishin Yokomaku Drivemode, Inc. Android Engineer GitHub: https://github.com/KeithYokoma Qiita:
http://qiita.com/KeithYokoma e-Book: http://amzn.to/1mZNydv
?
<RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android" android:layout_width=“match_parent” android:layout_height=“wrap_content” android:minHeight=“?android:attr/listPreferredItemHeight”> <!—— content ——> </RelativeLayout>
<RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android" android:layout_width=“match_parent” android:layout_height=“wrap_content” android:minHeight=“?android:attr/listPreferredItemHeight”> <!—— content ——> </RelativeLayout>
<RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android" android:layout_width=“match_parent” android:layout_height=“wrap_content” android:minHeight=“?android:attr/listPreferredItemHeight”> <!—— content ——> </RelativeLayout>
?
Referencing style attributes Allows us to reference the value of
the attribute in the currently-applied theme. Format: ?[<package_name>:][<resource_type>/]<resource_name>
<RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android" android:layout_width=“match_parent” android:layout_height=“wrap_content” android:minHeight=“?android:attr/listPreferredItemHeight”> <!—— content ——> </RelativeLayout> <resources>
<style name=“MyTheme” parent=“Theme.Light”> <item name=“android:listPreferredItemHeight”>64dp</item> </style> </resources>
<RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android" android:layout_width=“match_parent” android:layout_height=“wrap_content” android:minHeight=“?android:attr/listPreferredItemHeight”> <!—— content ——> </RelativeLayout> <resources>
<style name=“MyTheme” parent=“Theme.Light”> <item name=“android:listPreferredItemHeight”>64dp</item> </style> </resources>
<RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android" android:layout_width=“match_parent” android:layout_height=“wrap_content” android:minHeight=“64dp”> <!—— content ——> </RelativeLayout> <resources>
<style name=“MyTheme” parent=“Theme.Light”> <item name=“android:listPreferredItemHeight”>64dp</item> </style> </resources>
Your own “?”
<resources> <attr name=“my_custom_attribute” format=“reference”/> </resources>
<RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android" android:layout_width=“match_parent” android:layout_height=“wrap_content” android:minHeight=“?attr/my_custom_attribute”> <!—— content ——> </RelativeLayout>
<RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android" android:layout_width=“match_parent” android:layout_height=“wrap_content” android:minHeight=“?attr/my_custom_attribute”> <!—— content ——> </RelativeLayout> <resources>
<style name=“MyTheme” parent=“Theme.Light”> <item name=“my_custom_attribute”>64dp</item> </style> </resources>
<RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android" android:layout_width=“match_parent” android:layout_height=“wrap_content” android:minHeight=“?attr/my_custom_attribute”> <!—— content ——> </RelativeLayout> <resources>
<style name=“MyTheme” parent=“Theme.Light”> <item name=“my_custom_attribute”>64dp</item> </style> </resources>
<RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android" android:layout_width=“match_parent” android:layout_height=“wrap_content” android:minHeight=“64dp”> <!—— content ——> </RelativeLayout> <resources>
<style name=“MyTheme” parent=“Theme.Light”> <item name=“my_custom_attribute”>64dp</item> </style> </resources>
Abstract Theme Using style attributes reference. ✓ Reduce costs to
change styles ✓ Reusable styling
themes_holo.xml <resources> <style name=“Theme.Holo”> <—— … ——> <item name="colorPrimary">@color/holo_primary</item> <item
name=“colorEdgeEffect”>?attr/colorPrimary</item> <—— … ——> </style> </resources>
themes_holo.xml <resources> <style name=“Theme.Holo.Light” parent=“Theme.Light”> <—— … ——> <item name="colorPrimary">@color/holo_light_primary</item>
<—— … ——> </style> </resources>
themes_holo.xml <resources> <style name=“Theme.Holo.Light” parent=“Theme.Light”> <—— … ——> <item name="colorPrimary">@color/holo_light_primary</item>
<—— … ——> </style> <style name=“Theme.Holo.Light.DarkActionBar"> </style> </resources>
–Ryan Brush “Code is design”
? @KeithYokoma - Drivemode, Inc. potatotips #14