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
100
Viewの再利用方法まとめ
potatotips#15でのLTです。
http://connpass.com/event/12140/
konifar
March 12, 2015
Tweet
Share
More Decks by konifar
See All by konifar
オーナーシップを持つ領域を明確にする
konifar
13
3.2k
雑に思考を整理する技術と効能
konifar
60
29k
何のための個人目標設定?
konifar
27
13k
30点で打席に立つ
konifar
79
47k
Linterでチョット安心 iOS多言語化対応 / ios-i18n-linter
konifar
1
870
VPoEとして1年 もっとこうすればよかった3選 / VPoE Retrospective
konifar
13
6k
Introduction to API Testing Automation by Postman
konifar
1
3.4k
Kyash iOSアプリのQAの歴史
konifar
1
9.6k
エンジニアから見たKyashのPdMのおしごと / An engineer's perspective for PdM roles in Kyash
konifar
3
1.7k
Other Decks in Programming
See All in Programming
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
340
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
670
エンターテイメント業界で利用されるAWS
demuyan
0
210
Anthropic Cookbook のおすすめレシピ
schroneko
7
980
Blue/Greenデプロイの導入による 運用フローの改善
kudoas
1
380
Apache Hive 4 on Treasure Data
ryukobayashi
0
340
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
380
コーンフレークから始める モデリング会話入門
ogurotakayuki
0
370
PostmanでAPIの動作確認が楽になった話
h455h1
0
170
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
1
180
Ruby GitHub Packages
bkuhlmann
0
630
Site Reliability Engineering for GMO
pyama86
8
1k
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
32
12k
Teambox: Starting and Learning
jrom
128
8.4k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Creatively Recalculating Your Daily Design Routine
revolveconf
210
11k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
19
1.7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
244
20k
The Invisible Customer
myddelton
114
12k
Building Applications with DynamoDB
mza
88
5.6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
9
8.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
17
1.4k
Design by the Numbers
sachag
274
18k
Into the Great Unknown - MozCon
thekraken
10
990
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 σβΠϯʹ߹Θͤͯ༻
͋Γ͕ͱ͏͍͟͝·ͨ͠ ٩ ๑❛ᴗ❛๑ ۶ גࣜձࣾحฌୂ ΤϯδχΞେืूதͰ͢