Back to project page DEVIEW2014_AndroidApp_Demo.
The source code is released under:
Apache License
If you think the Android project DEVIEW2014_AndroidApp_Demo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.nhn.android.deview.ui.main; //from www.j av a2 s . c om import com.nhn.android.deview.R; import com.nhn.android.deview.R.id; import com.nhn.android.deview.R.layout; import com.nhn.android.deview.core.listview.ListCellView; import com.nhn.android.deview.core.view.DeclareView; import com.nhn.android.deview.core.view.ViewMapper; import com.nhn.android.deview.dao.program.ProgramData; import android.content.Context; import android.graphics.Color; import android.view.View; import android.widget.TextView; public class ProgramCellView extends ListCellView<ProgramData> implements View.OnClickListener { @DeclareView(id = R.id.lecTitle) public TextView mTitle; @DeclareView(id = R.id.speaker,click="this") public TextView mSpeaker; @DeclareView(id = R.id.lecTime,click="this") public TextView mTime; public ProgramCellView(Context context) { super(context); } @Override public View onCreateView(Context context) { return inflateView(R.layout.program_listcell); } @Override public void setData(int position, ProgramData data) { super.setData(position, data); mTitle.setText(data.name); mSpeaker.setText("????? : " + data.speaker); mTime.setText(String.format("?? : %s ~ %s",data.programStrt,data.programEnd)); if (position % 2 == 1) { this.setBackgroundColor(0xFFE0E0E0); } else { this.setBackgroundColor(Color.WHITE); } } @Override public void onClick(View v) { switch (v.getId()) { case R.id.lecTitle: break; case R.id.lecTime: break; } } }