<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>buchi_orz</author_name>
  <author_url>https://blog.hatena.ne.jp/buchi_orz/</author_url>
  <blog_title>備忘録 〜プログラミング〜</blog_title>
  <blog_url>https://buchi.hatenablog.com/</blog_url>
  <categories>
    <anon>android</anon>
  </categories>
  <description>ScrollViewの中にListViewを入れたとき、ListViewの高さを内容により変えたいときに実装した方法をメモしておきます。 普通に実装すると、一行分の高さにしかならないのですが、全ての行の高さを取得して、その高さをListViewに設定してやります。 こんな感じで private void setListViewHeightBasedOnChildren(ListView listView) { ListAdapter listAdapter = listView.getAdapter(); if (listAdapter == null) { return; } int tot…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbuchi.hatenablog.com%2Fentry%2F2015%2F01%2F28%2F153236&quot; title=&quot;ScrollView内にListViewを設定すると高さが、一行分の高さになってしまう問題 - 備忘録 〜プログラミング〜&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>2015-01-28 15:32:36</published>
  <title>ScrollView内にListViewを設定すると高さが、一行分の高さになってしまう問題</title>
  <type>rich</type>
  <url>https://buchi.hatenablog.com/entry/2015/01/28/153236</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
