Search in sources :

Example 21 with ProgressBar

use of android.widget.ProgressBar in project baseAdapter by hongyangAndroid.

the class ViewHolder method setMax.

public ViewHolder setMax(int viewId, int max) {
    ProgressBar view = getView(viewId);
    view.setMax(max);
    return this;
}
Also used : ProgressBar(android.widget.ProgressBar)

Example 22 with ProgressBar

use of android.widget.ProgressBar in project qksms by moezbhatti.

the class ColorPickerDialog method onCreateDialog.

public Dialog onCreateDialog(Bundle bundle) {
    View view = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_color_picker_led, null);
    mProgress = ((ProgressBar) view.findViewById(android.R.id.progress));
    mPalette = ((ColorPickerPalette) view.findViewById(R.id.color_picker));
    mPalette.init(mSize, mColumns, this);
    if (mColors != null) {
        showPaletteView();
    }
    mAlertDialog = new AlertDialog.Builder(getActivity()).setTitle(mTitleResId).setView(view).create();
    return mAlertDialog;
}
Also used : View(android.view.View) ProgressBar(android.widget.ProgressBar)

Example 23 with ProgressBar

use of android.widget.ProgressBar in project openkit-android by OpenKit.

the class OKAchievementsListAdapter method getView.

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    View row = convertView;
    int text1id = getContext().getResources().getIdentifier("text1", "id", getContext().getPackageName());
    int text2id = getContext().getResources().getIdentifier("text2", "id", getContext().getPackageName());
    int progressID = getContext().getResources().getIdentifier("io_openkit_achievement_progress", "id", getContext().getPackageName());
    int smartImageViewID = getContext().getResources().getIdentifier("smartImageView", "id", getContext().getPackageName());
    int leaderboardRowID = getContext().getResources().getIdentifier("io_openkit_row_okachievement", "layout", getContext().getPackageName());
    if (row == null) {
        LayoutInflater inflater = LayoutInflater.from(this.getContext());
        row = inflater.inflate(leaderboardRowID, parent, false);
    }
    TextView label1 = (TextView) row.findViewById(text1id);
    TextView label2 = (TextView) row.findViewById(text2id);
    SmartImageView imageView = (SmartImageView) row.findViewById(smartImageViewID);
    ProgressBar progressBar = (ProgressBar) row.findViewById(progressID);
    OKAchievement currentAchievement = this.getItem(position);
    row.setTag(position);
    label1.setText(currentAchievement.getName());
    label2.setText(currentAchievement.getDescription());
    progressBar.setMax(currentAchievement.getGoal());
    progressBar.setProgress(currentAchievement.getProgress());
    if (currentAchievement.getProgress() >= currentAchievement.getGoal()) {
        imageView.setImageUrl(currentAchievement.getUnlockedIconURL());
    } else {
        imageView.setImageUrl(currentAchievement.getLockedIconURL());
    }
    return row;
}
Also used : LayoutInflater(android.view.LayoutInflater) TextView(android.widget.TextView) SmartImageView(io.openkit.smartimageview.SmartImageView) TextView(android.widget.TextView) View(android.view.View) SmartImageView(io.openkit.smartimageview.SmartImageView) ProgressBar(android.widget.ProgressBar) OKAchievement(io.openkit.OKAchievement)

Example 24 with ProgressBar

use of android.widget.ProgressBar in project FastDev4Android by jiangqqlmj.

the class BaseQuickAdapter method createIndeterminateProgressView.

/**
     * 创建进度条 显示在view的结尾
     * @param convertView
     * @param parent
     * @return
     */
private View createIndeterminateProgressView(View convertView, ViewGroup parent) {
    if (convertView == null) {
        FrameLayout container = new FrameLayout(context);
        container.setForegroundGravity(Gravity.CENTER);
        ProgressBar progress = new ProgressBar(context);
        container.addView(progress);
        convertView = container;
    }
    return convertView;
}
Also used : FrameLayout(android.widget.FrameLayout) ProgressBar(android.widget.ProgressBar)

Example 25 with ProgressBar

use of android.widget.ProgressBar in project FastDev4Android by jiangqqlmj.

the class BaseAdapterHelper method setMax.

/**
     * Sets the range of a ProgressBar to 0...max.
     * 设置进度bar的最大进度
     * @param viewId The view id.
     * @param max    The max value of a ProgressBar.
     * @return The BaseAdapterHelper for chaining.
     */
public BaseAdapterHelper setMax(int viewId, int max) {
    ProgressBar view = retrieveView(viewId);
    view.setMax(max);
    return this;
}
Also used : ProgressBar(android.widget.ProgressBar)

Aggregations

ProgressBar (android.widget.ProgressBar)193 TextView (android.widget.TextView)66 View (android.view.View)63 ImageView (android.widget.ImageView)41 LinearLayout (android.widget.LinearLayout)30 Context (android.content.Context)18 ViewGroup (android.view.ViewGroup)16 WindowManager (android.view.WindowManager)14 FrameLayout (android.widget.FrameLayout)14 Drawable (android.graphics.drawable.Drawable)13 Dialog (android.app.Dialog)12 Button (android.widget.Button)12 RelativeLayout (android.widget.RelativeLayout)12 LayoutInflater (android.view.LayoutInflater)11 SuppressLint (android.annotation.SuppressLint)10 LayoutParams (android.widget.LinearLayout.LayoutParams)9 Intent (android.content.Intent)8 LayoutParams (android.view.ViewGroup.LayoutParams)8 AlertDialog (android.app.AlertDialog)7 TypedArray (android.content.res.TypedArray)7