在安卓开发中,或多或少的会用到目录结构,也就是tree的实现,下面是实现的步骤。
1.首先应该导入包的依赖。
compile 'com.github.bmelnychuk:atv:1.2.+'
2.第二步对树型结构进行布局,我自己设置的是一个图片后有一段文字。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"/>
<TextView
android:id</