Groups
Groups
Sign in
Groups
Groups
日本Androidの会
Conversations
About
Send feedback
Help
ウィジェットの実サイズの取得について
599 views
Skip to first unread message
横井
unread,
Apr 26, 2013, 3:16:00 AM
4/26/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-g...@googlegroups.com
横井と申します。
ウィジェットにTextViewを置いてテキストを描画するアプリを作成しているのですが、
テキストの全文がTextViewに入りきっているかの判断が出来ずに困っています。
下記のいずれかが取得できれば判断できると思っているのですが、
方法をご存じの方がいれば教えていただけないでしょうか。
・ウィジェットの実サイズ
・ウィジェットのTextViewの実サイズ
・ウィジェットの1セルの実サイズ
appwidget-providerで指定したminHeight,minWidthではなく、
実サイズを取得する方法が知りたいです。
noxi
unread,
Apr 28, 2013, 1:51:22 AM
4/28/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-g...@googlegroups.com
noxiです。
残念ながらAppWidget提供側からサイズを取得することは不可能です。
(API16以降であればリサイズ時にサイズ情報が来るとかなんとか)
端末によってフォントはバラバラですので、十分なマージンを取り、
Googleが定義しているAppWidgetのサイズに対して見切れない文字数を表示すべきだと思います。
または文字を画像に保存してImageViewで表示すれば見切れることは無くなります。
(やり方はググって下さい)
2013年4月26日 16:16 横井 <
yo...@bbreak.co.jp
>:
> --
> このメールは Google グループのグループ「日本Androidの会」の登録者に送られています。
> このグループから退会し、メールの受信を停止するには、
android-group-j...@googlegroups.com
> にメールを送信します。
> このグループに投稿するには、
android-g...@googlegroups.com
にメールを送信してください。
>
http://groups.google.com/group/android-group-japan?hl=ja
> からこのグループにアクセスしてください。
> その他のオプションについては、
https://groups.google.com/groups/opt_out
にアクセスしてください。
>
>
Reply all
Reply to author
Forward
0 new messages