Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Viewの再利用方法まとめ
Search
konifar
March 12, 2015
Programming
0
120
Viewの再利用方法まとめ
potatotips#15でのLTです。
http://connpass.com/event/12140/
konifar
March 12, 2015
Tweet
Share
More Decks by konifar
See All by konifar
Android開発以外のAndroid開発経験の活かしどころ
konifar
3
2.4k
初めてのiOS関連GitHub ActionsをMarketplaceに公開するまでの実録
konifar
3
320
オーナーシップを持つ領域を明確にする
konifar
15
5.3k
雑に思考を整理する技術と効能
konifar
76
41k
何のための個人目標設定?
konifar
28
14k
30点で打席に立つ
konifar
85
54k
Linterでチョット安心 iOS多言語化対応 / ios-i18n-linter
konifar
2
1.3k
VPoEとして1年 もっとこうすればよかった3選 / VPoE Retrospective
konifar
13
6.3k
Introduction to API Testing Automation by Postman
konifar
1
3.8k
Other Decks in Programming
See All in Programming
Grafana Cloudとソラカメ
devoc
0
180
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2.2k
Honoとフロントエンドの 型安全性について
yodaka
7
1.4k
データベースのオペレーターであるCloudNativePGがStatefulSetを使わない理由に迫る
nnaka2992
0
210
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
790
Open source software: how to live long and go far
gaelvaroquaux
0
650
SpringBoot3.4の構造化ログ #kanjava
irof
3
1k
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
4
1.9k
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
550
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
190
color-scheme: light dark; を完全に理解する
uhyo
6
460
データの整合性を保つ非同期処理アーキテクチャパターン / Async Architecture Patterns
mokuo
53
18k
Featured
See All Featured
Statistics for Hackers
jakevdp
797
220k
The Invisible Side of Design
smashingmag
299
50k
Done Done
chrislema
182
16k
Designing for humans not robots
tammielis
250
25k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Navigating Team Friction
lara
183
15k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Embracing the Ebb and Flow
colly
84
4.6k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
250
GraphQLとの向き合い方2022年版
quramy
44
13k
Transcript
7JFXͷ࠶ར༻ํ๏·ͱΊ ʢʣ খ༟հ
!LPOJGBS w "OESPJE࡞ͬͯ·͢ɻ w ࠷ۙ8FCɻ w ಙౡݝࠤಹՏଜग़ɻ 4BOTBOਆࢁΦϑΟεͷྡͷଜ
7JFXͷ࠶ར༻ํ๏ EJNFOTYNMɺDPMPSTYNM ESBXBCMFYNM TUZMFTYNM JODMVEF
$VTUPN7JFX
EJNFOTYNMɺDPMPSTYNM <TextView android:textColor="#757575" android:gravity="center_vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="2" android:textSize="12dp" />
EJNFOTYNMɺDPMPSTYNM <TextView android:textColor="#757575" android:gravity="center_vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="2" android:textSize="12dp" />
EJNFOTYNMɺDPMPSTYNM <TextView android:textColor="@color/grey600" android:gravity="center_vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="2" android:textSize="@dimen/text_small" /> <color
name=“grey600">#757575</color> <dimen name="text_small">12sp</dimen>
ESBXBCMF <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white"> … </RelativeLayout>
ESBXBCMF <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white"> … </RelativeLayout>
ESBXBCMF <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable_bg_feedback"> … </RelativeLayout>
ESBXBCMF <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.~~android"> ! <item android:state_pressed="true"> <shape
android:shape="rectangle"> <solid android:color="#0a000000" /> </shape> </item> ! </selector>
ESBXBCMF <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.~~android"> ! <item android:state_pressed="true"> <shape
android:shape="rectangle"> <solid android:color="#0a000000" /> </shape> </item> ! </selector> ͑ΔTUBUFɺ4UBUF-JTU%SBXBCMFͷϖʔδࢀরɻ
TUZMFTYNM <TextView android:textColor="@color/grey600" android:gravity="center_vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="2" android:textSize="@dimen/text_small" />
TUZMFTYNM <TextView android:textColor="@color/grey600" android:gravity="center_vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="2" android:textSize="@dimen/text_small" />
TUZMFTYNM <TextView style="@style/TextSub" android:layout_width="match_parent" android:layout_height="wrap_content" /> <style name="TextSub"> <item name="android:textSize">@dimen/text_small</item>
<item name="android:textColor">@color/grey600</item> <item name=“android:gravity">center_vertical</item> <item name="android:maxLines">2</item> </style>
TUZMFTYNM TUZMFTෳͷYNMʹ͚ͯཧͨ͠ํ͕͍͍͔ ͠Ε·ͤΜɻ ྫ TUZMFT@IPNFYNMɺTUZMFT@EFUBJMTYNM ! ৄ͘͠<༁>BOESPJECFTUQSBDUJDFΛࢀরɻ
JODMVEF <RelativeLayout android:layout_width="match_parent" android:layout_height=“wrap_content”> ! <ImageView … /> ! <RelativeLayout
android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView … /> <TextView … /> <TextView … /> </RelativeLayout> ! </RelativeLayout>
JODMVEF <RelativeLayout android:layout_width="match_parent" android:layout_height=“wrap_content”> ! <ImageView … /> ! <RelativeLayout
android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView … /> <TextView … /> <TextView … /> </RelativeLayout> ! </RelativeLayout>
JODMVEF <RelativeLayout android:layout_width="match_parent" android:layout_height=“wrap_content”> ! <ImageView … /> ! <include
layout=“@layout/part_character_info" /> ! </RelativeLayout> 7JFXͷωετ͕ଟ͘ͳΓ͕ͪͳͷͰɺNFSHFͷ͍ํΛ֮͑ͯ ͓͘ͱΑ͍ɻ 㱺8IBUJTUIFQVSQPTFPG"OESPJETUBHJO9.-MBZPVUT
$VTUPN7JFX <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"> ! <FrameLayout android:id="@+id/triangle" android:background=“@drawable/left_triangle" … />
! <TextView android:id=“@+id/txt_balloon" android:background="@drawable/bg_word_balloon" … /> ! </RelativeLayout>
$VTUPN7JFX <com.konifar.whovoice.views.WordBalloonView android:id="@+id/balloon_word" android:layout_width="match_parent" android:layout_height=“wrap_content" />
$VTUPN7JFX public class WordBalloonView extends RelativeLayout { ... public WordBalloonView(Context
context, AttributeSet attrs) { super(context, attrs); inflate(context, R.layout.ui_word_balloon, this); ButterKnife.inject(this); ! TypedArray a = context.obtainStyledAttributes( attrs, R.styleable.WordBalloonView); try { balloonText = a.getString( R.styleable.WordBalloonView_balloonText); } finally { a.recycle(); } ! mTxtBalloon.setText(balloonText); } ! public void setBalloonText(String balloonText) { mTxtBalloon.setText(balloonText); } }
$VTUPN7JFX public class WordBalloonView extends RelativeLayout { ... public WordBalloonView(Context
context, AttributeSet attrs) { super(context, attrs); inflate(context, R.layout.ui_word_balloon, this); ButterKnife.inject(this); ! TypedArray a = context.obtainStyledAttributes( attrs, R.styleable.WordBalloonView); try { balloonText = a.getString( R.styleable.WordBalloonView_balloonText); } finally { a.recycle(); } ! mTxtBalloon.setText(balloonText); } ! public void setBalloonText(String balloonText) { mTxtBalloon.setText(balloonText); } }
$VTUPN7JFX public class WordBalloonView extends RelativeLayout { ... public WordBalloonView(Context
context, AttributeSet attrs) { super(context, attrs); inflate(context, R.layout.ui_word_balloon, this); ButterKnife.inject(this); ! TypedArray a = context.obtainStyledAttributes( attrs, R.styleable.WordBalloonView); try { balloonText = a.getString( R.styleable.WordBalloonView_balloonText); } finally { a.recycle(); } ! mTxtBalloon.setText(balloonText); } ! public void setBalloonText(String balloonText) { mTxtBalloon.setText(balloonText); } }
$VTUPN7JFX public class WordBalloonView extends RelativeLayout { ... public WordBalloonView(Context
context, AttributeSet attrs) { super(context, attrs); inflate(context, R.layout.ui_word_balloon, this); ButterKnife.inject(this); ! TypedArray a = context.obtainStyledAttributes( attrs, R.styleable.WordBalloonView); try { balloonText = a.getString( R.styleable.WordBalloonView_balloonText); } finally { a.recycle(); } ! mTxtBalloon.setText(balloonText); } ! public void setBalloonText(String balloonText) { mTxtBalloon.setText(balloonText); } }
$VTUPN7JFX public class WordBalloonView extends RelativeLayout { ... public WordBalloonView(Context
context, AttributeSet attrs) { super(context, attrs); inflate(context, R.layout.ui_word_balloon, this); ButterKnife.inject(this); ! TypedArray a = context.obtainStyledAttributes( attrs, R.styleable.WordBalloonView); try { balloonText = a.getString( R.styleable.WordBalloonView_balloonText); } finally { a.recycle(); } ! mTxtBalloon.setText(balloonText); } ! public void setBalloonText(String balloonText) { mTxtBalloon.setText(balloonText); } }
·ͱΊ EJNFOTYNM DPMPSTYNM ESBXBCMFYNM Կग़ͯ͘Δ ϨΠΞτ͔ TUZMFTYNM JODMVEF $VTUPN7JFX ෳͷ7JFXͰ
ߏ͞Ε͍ͯΔ͔ ϩδοΫؚ͕· ΕΔ͔ ϨΠΞτYNMʹهड़ /P :FT /P :FT /P :FT σβΠϯʹ߹Θͤͯ༻
͋Γ͕ͱ͏͍͟͝·ͨ͠ ٩ ๑❛ᴗ❛๑ ۶ גࣜձࣾحฌୂ ΤϯδχΞେืूதͰ͢