<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>KeithYokoma</author_name>
  <author_url>https://blog.hatena.ne.jp/KeithYokoma/</author_url>
  <blog_title>Infinito Nirone 7</blog_title>
  <blog_url>https://blog.keithyokoma.dev/</blog_url>
  <categories>
  </categories>
  <description>View の仕組みでは、 TextView のプロパティとして ems が定義してあり、これを利用するとTextView の横幅を ems で指定した文字数分の横幅にしてくれます。 R.attr | Android Developers Jetpack Compose では Text や TextField にそのものズバリな引数や Modifier はないので、自分で計算します。 TextMeasurer で横幅を計算する TextMeasurer はその名の通り文字を描画するのに必要な領域を計算するクラスです。テキストスタイルや親コンポーネントの縦横の大きさを制約として与えることで、テキス…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.keithyokoma.dev%2Fentry%2F2023%2F12%2F11%2F190105&quot; title=&quot;Jetpack Compose TextField の横幅を n 文字分だけ確保したい - Infinito Nirone 7&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-12-11 19:01:05</published>
  <title>Jetpack Compose TextField の横幅を n 文字分だけ確保したい</title>
  <type>rich</type>
  <url>https://blog.keithyokoma.dev/entry/2023/12/11/190105</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
