@@ -0,0 +1,2051 @@
+package com.lsjwzh.loadingeverywhere;%0A%0Aimport android.content.Context;%0Aimport android.util.AttributeSet;%0Aimport android.view.Gravity;%0Aimport android.view.View;%0Aimport android.widget.FrameLayout;%0Aimport android.widget.LinearLayout;%0Aimport android.widget.ProgressBar;%0A%0A/**%0A * Created by panwenye on 14-8-11.%0A */%0Apublic class ProgressLayout extends LoadingLayout %7B%0A    /**%0A     * create a ProgressLayout to wrap and replace the targetView.%0A     * Note: if you attachTo targetView on 'onCreate' method,targetView may be not layout complete.%0A     *%0A     * @param targetView%0A     * @return%0A     */%0A    public static ProgressLayout wrap(final View targetView)%7B%0A        if(targetView==null)%7B%0A            throw new IllegalArgumentException();%0A        %7D%0A%0A        final ProgressLayout progressLayout = new ProgressLayout(targetView.getContext());%0A        progressLayout.attachTo(targetView);%0A        return progressLayout;%0A    %7D%0A    protected ProgressBar mProgressBar;%0A    protected int mProgress = -1;%0A    protected int mMax = -1;%0A%0A%0A%0A    public ProgressLayout(Context context) %7B%0A        super(context);%0A    %7D%0A%0A    public ProgressLayout(Context context, AttributeSet attrs) %7B%0A        super(context, attrs);%0A    %7D%0A%0A    public ProgressLayout(Context context, AttributeSet attrs, int defStyle) %7B%0A        super(context, attrs, defStyle);%0A    %7D%0A    %0A    public void setMax(int max)%7B%0A        mMax = max;%0A        if(mProgressBar!=null)%7B%0A            mProgressBar.setMax(max);%0A        %7D%0A    %7D%0A    public void setProgress(int progress)%7B%0A        mProgress = progress;%0A        if(mProgressBar!=null)%7B%0A            mProgressBar.setProgress(progress);%0A        %7D%0A    %7D%0A%0A    /**%0A     * create progressbar%0A     * @return%0A     */%0A    @Override%0A    protected View createProgressBar() %7B%0A        mProgressBar = new ProgressBar(getContext(), null, android.R.attr.progressBarStyleHorizontal);%0A        if(mProgress%3E=0)%7B%0A            mProgressBar.setProgress(mProgress);%0A        %7D%0A        if(mMax%3E=0)%7B%0A            mProgressBar.setMax(mMax);%0A        %7D%0A        return mProgressBar;%0A    %7D%0A%0A%7D%0A

add progresslayout