Back to project page android-mimic-ui.
The source code is released under:
Apache License
If you think the Android project android-mimic-ui 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.mimic.ui.tableview.support; /*w ww. ja v a 2 s.c om*/ import android.content.Context; import android.view.View; import android.widget.LinearLayout; import android.widget.ProgressBar; import android.widget.TextView; import com.mimic.ui.R; import com.mimic.ui.tableview.UITableViewItem; public class UIProgressItem extends UITableViewItem { private ProgressBar mProgressBar = null; private TextView mMessage = null; public UIProgressItem(Context context, String message) { super(context, message); setStyle(STYLE_NONE); setupProgressViews(); setMessage(message); } void setupProgressViews() { LinearLayout progressItemContentView = (LinearLayout) getInflater().inflate( R.layout.uiprogresstem, null); mProgressBar = (ProgressBar) progressItemContentView.findViewById(R.id.progress); mMessage = (TextView) progressItemContentView.findViewById(R.id.message); getItemView().setPadding(0, 0, 0, 0); getItemView().setMinimumHeight(0); getContentView().removeAllViews(); getContentView().setPadding(0, 0, 0, 0); getContentView().addView(progressItemContentView); } public ProgressBar getProgressView() { return mProgressBar; } public TextView getMessageView() { return mMessage; } public void setMessage(String message) { if (message != null) { mMessage.setText(message); mMessage.setVisibility(View.VISIBLE); } else { mMessage.setVisibility(View.GONE); } } public void hide() { getItemView().setVisibility(View.GONE); } public void show() { getItemView().setVisibility(View.VISIBLE); } @Override public boolean isClickable() { return false; } @Override public void setClickable(boolean clickable) { // do nothing } }