【移動(dòng)應(yīng)用開(kāi)發(fā)技術(shù)】Android中怎么實(shí)現(xiàn)一個(gè)簡(jiǎn)易時(shí)間軸_第1頁(yè)
【移動(dòng)應(yīng)用開(kāi)發(fā)技術(shù)】Android中怎么實(shí)現(xiàn)一個(gè)簡(jiǎn)易時(shí)間軸_第2頁(yè)
【移動(dòng)應(yīng)用開(kāi)發(fā)技術(shù)】Android中怎么實(shí)現(xiàn)一個(gè)簡(jiǎn)易時(shí)間軸_第3頁(yè)
【移動(dòng)應(yīng)用開(kāi)發(fā)技術(shù)】Android中怎么實(shí)現(xiàn)一個(gè)簡(jiǎn)易時(shí)間軸_第4頁(yè)
【移動(dòng)應(yīng)用開(kāi)發(fā)技術(shù)】Android中怎么實(shí)現(xiàn)一個(gè)簡(jiǎn)易時(shí)間軸_第5頁(yè)
已閱讀5頁(yè),還剩9頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

【移動(dòng)應(yīng)用開(kāi)發(fā)技術(shù)】Android中怎么實(shí)現(xiàn)一個(gè)簡(jiǎn)易時(shí)間軸

這期內(nèi)容當(dāng)中在下將會(huì)給大家?guī)?lái)有關(guān)Android中怎么實(shí)現(xiàn)一個(gè)簡(jiǎn)易時(shí)間軸,文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。1.新建一個(gè)自定義控件:public

class

WorkExcView

extends

LinearLayout

{

private

TextView

dataLeft;

private

TextView

dataRight;

private

TextView

company;

private

TextView

job;

private

TextView

jobAsses;

private

TextView

xiTong;

private

TextView

ziTian;

private

LinearLayout

jobContentContainer;

private

TextView

jobContent;

private

LinearLayout

commentContainer;

private

LinearLayout

nianContentContainer;

private

TextView

nianContent;

private

LinearLayout

base;

private

LinearLayout

yueXingContainer;

private

TextView

yueContent;

private

LinearLayout

nianXingContainer;

private

TextView

yueMoreContent;

private

TextView

nianMoreContent;

private

String

company_id;

public

WorkExcView(Context

context)

{

this(context,null);

}

public

WorkExcView(Context

context,

AttributeSet

attrs)

{

super(context,

attrs);

init();

}

private

void

init()

{

View

inflate

=

View.inflate(getContext(),

R.layout.activity_four_workexcview,

this);

dataLeft

=

(TextView)

inflate.findViewById(R.id.workexcview_data_left);

dataRight=

(TextView)

inflate.findViewById(R.id.workexcview_data_right);

company

=

(TextView)

inflate.findViewById(R.id.workexcview_company);

job

=

(TextView)

inflate.findViewById(R.id.workexcview_job);

jobAsses

=

(TextView)

inflate.findViewById(R.id.workexcview__job_asses);

xiTong

=

(TextView)

inflate.findViewById(R.id.workexcview_xitong);

ziTian

=

(TextView)

inflate.findViewById(R.id.workexcview_zitian);

jobContent

=

(TextView)

inflate.findViewById(R.id.workexcview_jobcontent);

nianContent

=

(TextView)

inflate.findViewById(R.id.workexcview_niancontent);

jobContentContainer

=

(LinearLayout)inflate.findViewById(R.id.workexcview_jobcontent_container);

commentContainer

=

(LinearLayout)inflate.findViewById(R.id.workexcview__comment_container);

nianContentContainer=

(LinearLayout)inflate.findViewById(R.id.workexcview__niancontent_container);

base

=

(LinearLayout)inflate.findViewById(R.id.workexcview__base);

yueXingContainer

=

(LinearLayout)inflate.findViewById(R.id.workexcview_yuexing_container);

yueContent

=

(TextView)inflate.findViewById(R.id.workexcview_yuecontent);

nianXingContainer

=

(LinearLayout)inflate.findViewById(R.id.workexcview_nianxing_container);

yueMoreContent

=

(TextView)inflate.findViewById(R.id.workexcview_yuecontentmore);

nianMoreContent

=

(TextView)inflate.findViewById(R.id.workexcview_niancontentmore);

}

public

void

initData(final

FourBean.JobsBean

jobsBean)

{

//賦值代碼

}XML文件:<?xml

version="1.0"

encoding="utf-8"?>

<LinearLayout

xmlns:android="/apk/res/android"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="vertical"

android:id="@+id/workexcview__base"

android:paddingLeft="8dp">

<RelativeLayout

android:layout_width="match_parent"

android:layout_height="wrap_content">

<ImageView

android:id="@+id/workexcview_landian"

android:layout_width="15dp"

android:layout_height="15dp"

android:layout_centerVertical="true"

android:src="@mipmap/landian"

/>

<TextView

android:id="@+id/workexcview_data_left"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_centerVertical="true"

android:layout_marginLeft="3dp"

android:layout_toRightOf="@+id/workexcview_landian"

android:text="2016.03"

android:textColor="@color/text"

android:textSize="15sp"

/>

<TextView

android:id="@+id/workexcview__data_zhong"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_toRightOf="@id/workexcview_data_left"

android:text="

——

"

android:textColor="@color/text"

/>

<TextView

android:id="@+id/workexcview_data_right"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_centerVertical="true"

android:layout_toRightOf="@+id/workexcview__data_zhong"

android:text="2016.03"

android:textColor="@color/text"

android:textSize="15sp"

/>

<TextView

android:id="@+id/workexcview_zitian"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_alignParentRight="true"

android:background="@drawable/four_select"

android:padding="4dp"

android:paddingRight="6dp"

android:text="自填"

android:textColor="@color/red"

android:textSize="12sp"

android:visibility="gone"

/>

<!--

<ImageView

android:id="@+id/workexcview_xitong"

android:layout_width="40dp"

android:layout_height="20dp"

android:layout_alignParentRight="true"

android:layout_centerVertical="true"

android:paddingRight="10dp"

android:src="@mipmap/xitong"

android:visibility="gone"

/>-->

<TextView

android:id="@+id/workexcview_xitong"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_alignParentRight="true"

android:background="@drawable/textview_shape"

android:padding="4dp"

android:paddingRight="6dp"

android:text="系統(tǒng)"

android:textColor="@color/holo_blue_light"

android:textSize="12sp"

android:visibility="gone"

/>

<RelativeLayout

android:id="@+id/four_setting_workexc_container"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_alignParentRight="true"

android:visibility="gone">

<TextView

android:id="@+id/four_setting_workexc_logo"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_alignParentRight="true"

android:layout_centerVertical="true"

android:text="編輯"

android:textColor="@android:color/holo_blue_light"

android:textSize="16sp"

/>

<ImageView

android:layout_width="20dp"

android:layout_height="20dp"

android:layout_centerVertical="true"

android:layout_toLeftOf="@+id/four_setting_workexc_logo"

android:src="@drawable/xierijidianji3x"

/>

</RelativeLayout>

</RelativeLayout>

<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="horizontal">

<RelativeLayout

android:layout_width="wrap_content"

android:layout_height="match_parent">

<TextView

android:layout_width="1dp"

android:layout_height="match_parent"

android:layout_marginLeft="7dp"

android:background="@color/black"

/>

</RelativeLayout>

<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="vertical">

<RelativeLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:padding="8dp">

<TextView

android:id="@+id/workexcview_company"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_centerVertical="true"

android:text="某某公司"

android:textColor="@color/text"

android:textSize="14sp"

/>

<TextView

android:id="@+id/workexcview_company_zhong"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_centerVertical="true"

android:layout_toRightOf="@id/workexcview_company"

android:text="

/

"

android:textColor="@color/text"

android:textSize="14sp"

/>

<TextView

android:id="@+id/workexcview_job"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_centerVertical="true"

android:layout_toRightOf="@id/workexcview_company_zhong"

android:text="web前段工程師"

android:textColor="@color/text"

android:textSize="14sp"

/>

</RelativeLayout>

<LinearLayout

android:id="@+id/workexcview_jobcontent_container"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginLeft="5dp"

android:orientation="vertical"

android:padding="8dp">

<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="工作描述:"

android:textColor="@color/text"

/>

<TextView

android:id="@+id/workexcview_jobcontent"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginTop="3dp"

android:text="巴拉巴拉"

/>

</LinearLayout>

<LinearLayout

android:id="@+id/workexcview__yuecontent_container"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginLeft="5dp"

android:orientation="vertical"

android:padding="8dp"

android:visibility="visible">

<RelativeLayout

android:layout_width="match_parent"

android:layout_height="wrap_content">

<TextView

android:id="@+id/workexcview_yuecontent_logo"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_centerVertical="true"

android:text="最新月評(píng)價(jià):"

android:textColor="@color/text"

/>

<LinearLayout

android:layout_centerVertical="true"

android:id="@+id/workexcview_yuexing_container"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:orientation="horizontal"

android:layout_toRightOf="@+id/workexcview_yuecontent_logo"

>

</LinearLayout>

<TextView

android:layout_alignParentRight="true"

android:id="@+id/workexcview_yuecontentmore"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginTop="3dp"

android:gravity="center"

android:padding="2dp"

android:layout_centerVertical="true"

android:background="@drawable/textview_shape"

android:text="更多"

android:textColor="@color/blue_title"

/>

</RelativeLayout>

<TextView

android:id="@+id/workexcview_yuecontent"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginTop="3dp"

android:text="無(wú)"

android:textColor="@color/gray"

/>

</LinearLayout>

<LinearLayout

android:id="@+id/workexcview__niancontent_container"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginLeft="5dp"

android:orientation="vertical"

android:padding="8dp"

android:visibility="visible">

<RelativeLayout

android:layout_width="match_parent"

android:layout_height="wrap_content">

<TextView

android:id="@+id/workexcview_niancontent_logo"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_centerVertical="true"

android:text="最新年評(píng)價(jià):"

android:textColor="@color/text"

/>

<LinearLayout

android:layout_centerVertical="true"

android:id="@+id/workexcview_nianxing_container"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:orientation="horizontal"

android:layout_toRightOf="@id/workexcview_niancontent_logo"

>

</LinearLayout>

<TextView

android:id="@+id/workexcview_niancontentmore"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginTop="3dp"

android:padding="2dp"

android:layout_centerVertical="true"

android:background="@drawable/textview_shape"

android:text="更多"

android:layout_alignParentRight="true"

android:textColor="@color/blue_title"

/>

</RelativeLayout>

<TextView

android:id="@+id/workexcview_niancontent"

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論