天天看點

一個簡單的時間軸實作

一個簡單的時間軸實作

如何使用:

<com.example.administrator.buzhouview.UnderLineLinearLayout
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:id="@+id/underline_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:line_margin_side="25dp"
            app:line_dynamic_dimen="8dp"
            android:orientation="vertical"
            android:background="@android:color/white">

        </com.example.administrator.buzhouview.UnderLineLinearLayout>
           

添加節點

View v = LayoutInflater.from(this).inflate(R.layout.item_test, mUnderLineLinearLayout, false);
((TextView) v.findViewById(R.id.tx_action)).setText("this is test " + i);
((TextView) v.findViewById(R.id.tx_action_time)).setText("2016-01-21");
((TextView) v.findViewById(R.id.tx_action_status)).setText("finish");
mUnderLineLinearLayout.addView(v);
           

demo下載下傳http://download.csdn.net/detail/qq_35549248/9849963