android.view.animation.LinearInterpolator#android.widget.ProgressBar源码实例Demo

下面列出了android.view.animation.LinearInterpolator#android.widget.ProgressBar 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: NetEasyNews   文件: WebViewActivity.java
private void initTitle() {
    StatusBarUtil.setColor(this, CommonUtils.getColor(R.color.colorTheme),0);
    mProgressBar = (ProgressBar) findViewById(R.id.pb_progress);
    webView = (WebView) findViewById(R.id.webview_detail);
    videoFullView = (FrameLayout) findViewById(R.id.video_fullView);
    mTitleToolBar = (Toolbar) findViewById(R.id.title_tool_bar);
    setSupportActionBar(mTitleToolBar);
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        //去除默认Title显示
        actionBar.setDisplayShowTitleEnabled(false);
        actionBar.setDisplayShowTitleEnabled(false);
        actionBar.setDisplayHomeAsUpEnabled(true);
        actionBar.setHomeAsUpIndicator(R.drawable.icon_back);
    }
    setTitle(mTitle);
    mTitleToolBar.setNavigationOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            onBackPressed();
        }
    });
}
 
private void saveRssToFile(final ProgressBar progressBar, ObtainRssData obtainRssData, String fileStr) {
	/*
	 * save RSS data and position coordinate to file.
	 */
	mainAty.runOnUiThread(new Runnable() {
		
		@Override
		public void run() {
			progressBar.setVisibility(View.GONE);
			Toast.makeText(mainAty, "saving", Toast.LENGTH_SHORT).show();
		}
	});
	
	try {
		FileOperation.appendToFile(record_data.toString(), fileStr); 
		acquireSignalNum = 0;
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}
 
源代码3 项目: MediaPlayer-Extended   文件: VideoViewActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_videoview);
    Utils.setActionBarSubtitleEllipsizeMiddle(this);

    mVideoView = (VideoView) findViewById(R.id.vv);
    mProgress = (ProgressBar) findViewById(R.id.progress);

    mMediaPlayerControl = mVideoView; //new MediaPlayerDummyControl();
    mMediaController = new MediaController(this);
    mMediaController.setAnchorView(findViewById(R.id.container));
    mMediaController.setMediaPlayer(mMediaPlayerControl);
    mMediaController.setEnabled(false);

    mProgress.setVisibility(View.VISIBLE);

    // Init video playback state (will eventually be overwritten by saved instance state)
    mVideoUri = getIntent().getData();
    mVideoPosition = 0;
    mVideoPlaybackSpeed = 1;
    mVideoPlaying = false;
}
 
源代码4 项目: FastAccess   文件: ColorPickerDialog.java
@SuppressLint("InflateParams") @NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) {
    View view = LayoutInflater.from(getActivity()).inflate(R.layout.color_picker_dialog, null, false);
    final Activity activity = getActivity();
    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(activity)
            .setTitle(mTitleResId)
            .setView(view)
            .create();
    mAlertDialog.setCanceledOnTouchOutside(true);
    return mAlertDialog;
}
 
源代码5 项目: ColorPicker   文件: ColorPickerDialog.java
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    final Activity activity = getActivity();

    View view = LayoutInflater.from(getActivity()).inflate(R.layout.color_picker_dialog, null);
    mProgress = (ProgressBar) view.findViewById(android.R.id.progress);
    mPalette = (ColorPickerPalette) view.findViewById(R.id.color_picker);
    mPalette.init(mSize, mColumns, this, mBackwardsOrder);

    if (mColors != null) {
        showPaletteView();
    }

    mAlertDialog = new AlertDialog.Builder(activity)
            .setTitle(mTitleResId)
            .setView(view)
            .create();
    mAlertDialog.setCanceledOnTouchOutside(true);
    return mAlertDialog;
}
 
源代码6 项目: zhangshangwuda   文件: NewsFragmentWithTopic.java
/**
 * 初始化View
 */
private void InitView() {
	// System.out.println("InitViewPager");
	// 设置首页
	// loadMoreButton = getLoadMoreButton();
	newsList = new ArrayList<Map<String, String>>();
	ListView = (PullToRefreshListView) rootView
			.findViewById(R.id.news_all_ListView);
	PB = (ProgressBar) rootView
			.findViewById(R.id.news_all_ListView_progressBar);
	ListView.setOnItemClickListener(new ListViewItemClickListener());
	ListView.setOnRefreshListener(new PullToRefreshListView.OnRefreshListener() {
		public void onRefresh() {
			refreshData();
		}
	});
	ListView.setOnLoadMoreListener(new PullToRefreshListView.OnLoadMoreListener() {

		@Override
		public void onLoadMore() {
			loadMore();
		}
	});
}
 
源代码7 项目: Passbook   文件: HomeActivity.java
private void startSync(boolean animationOn) {
    Resources r = getResources();
    int[] strRes = {R.string.sync_none, R.string.sync_gpg, R.string.sync_gdrive};
    mButtonContainer = findViewById(R.id.btn_container);
    if(animationOn) {
        mButtonContainer.animate().scaleY(0.0f).setListener(this);
    }
    else {
        mButtonContainer.setVisibility(View.INVISIBLE);
    }
    mSyncText = findViewById(R.id.sync_hint);
    mSyncText.setText(r.getString(R.string.contacting,
            r.getString(strRes[Application.Options.mSync])));
    ProgressBar pb = findViewById(R.id.pb);
    if(animationOn) {
        pb.animate().alpha(1.0f).setStartDelay(300);
        mSyncText.animate().alpha(1.0f).setStartDelay(300);
    }
    else {
        pb.setAlpha(1.0f);
        mSyncText.setAlpha(1.0f);
    }
    SyncService ss = SyncService.getInstance(Application.Options.mSync);
    ss.initialize(this).setListener(this).connect(this, 0);
}
 
源代码8 项目: quickhybrid-android   文件: QuickFragment.java
/**
 * 初始化布局控件
 */
protected void initView() {
    pb = (ProgressBar) findViewById(R.id.pb);
    wv = (QuickWebView) findViewById(R.id.wv);

    //初始化控制器
    control = new WebloaderControl(this, bean, wv);


    //设置错误状态页点击事件
    pageControl.getStatusPage().setClickButton(getString(R.string.status_page_reload),new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            //加载历史记录最近一页
            control.loadLastPage(true);
        }
    });

    //加载页面
    control.loadPage();
}
 
源代码9 项目: callerid-for-android   文件: LoaderImageView.java
/**
 *  First time loading of the LoaderImageView
 *  Sets up the LayoutParams of the view, you can change these to
 *  get the required effects you want
 */
private void instantiate(final Context context, final String imageUrl) {
	mContext = context;
	
	mImage = new ImageView(mContext);
	
	mImage.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
	
	mSpinner = new ProgressBar(mContext);
	mSpinner.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
		
	mSpinner.setIndeterminate(true);
	
	addView(mSpinner);
	addView(mImage);
	
	if(imageUrl == null){
		spin();
	}else{
		setImageDrawable(imageUrl);
	}
}
 
源代码10 项目: InteractiveChart   文件: ChartActivity.java
/**
 * 数据开始加载
 *
 * @param loadingType 加载框出现类型
 */
public void loadBegin(int loadingType, ProgressBar bar, Chart chart) {
  this.constraintSet.setVisibility(bar.getId(), VISIBLE);
  this.constraintSet.connect(bar.getId(), ConstraintSet.START, chart.getId(),
      ConstraintSet.START, Utils.dpTopx(this, 30));
  this.constraintSet.connect(bar.getId(), ConstraintSet.END, chart.getId(),
      ConstraintSet.END, Utils.dpTopx(this, 30));
  switch (loadingType) {
    case LEFT_LOADING:
      this.constraintSet.clear(bar.getId(), ConstraintSet.END);
      break;
    case RIGHT_LOADING:
      this.constraintSet.clear(bar.getId(), ConstraintSet.START);
      break;
  }
  this.chartLayout.setConstraintSet(constraintSet);
}
 
源代码11 项目: RxTools-master   文件: ActivityWebView.java
private void initView() {
    // TODO Auto-generated method stub
    mRxTextAutoZoom = (RxTextAutoZoom) findViewById(R.id.afet_tv_title);
    llIncludeTitle = (LinearLayout) findViewById(R.id.ll_include_title);
    tvTitle = (TextView) findViewById(R.id.tv_title);
    pbWebBase = (ProgressBar) findViewById(R.id.pb_web_base);
    webBase = (WebView) findViewById(R.id.web_base);
    ivFinish = (ImageView) findViewById(R.id.iv_finish);
    ivFinish.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            if (webBase.canGoBack()) {
                webBase.goBack();
            } else {
                finish();
            }
        }
    });

    initAutoFitEditText();
}
 
源代码12 项目: iBeebo   文件: ReadWorker.java
public ReadWorker(IWeiboDrawable view, String url, FileLocationMethod method, boolean isMultiPictures) {

        this(view.getImageView(), url, method, false);
        this.IWeiboDrawable = view;
        this.pbWeakReference = new WeakReference<ProgressBar>(view.getProgressBar());
        view.setGifFlag(false);
        if (SettingUtils.getEnableBigPic()) {
            if (view.getProgressBar() != null) {
                view.getProgressBar().setVisibility(View.VISIBLE);
                view.getProgressBar().setProgress(0);
            }
        } else {
            if (view.getProgressBar() != null) {
                view.getProgressBar().setVisibility(View.INVISIBLE);
                view.getProgressBar().setProgress(0);
            }
        }
        this.isMultiPictures = isMultiPictures;

    }
 
源代码13 项目: ChatMessagesAdapter-android   文件: ChatActivity.java
@SuppressWarnings("unchecked")
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_chat);
    ArrayList<QBUser> qbUsers = (ArrayList<QBUser>) getIntent().getExtras().getSerializable(EXTRA_QB_USERS);
    chatDialog = new QBChatDialog(DIALOG_ID);

    messagesListView = (RecyclerView) findViewById(R.id.list_chat_messages);
    progressBar = (ProgressBar) findViewById(R.id.progress_chat);
    audioLayout = (LinearLayout) findViewById(R.id.layout_chat_audio_container);
    recordButton = (QBRecordAudioButton) findViewById(R.id.button_chat_record_audio);
    recordChronometer = (Chronometer) findViewById(R.id.chat_audio_record_chronometer);
    bucketView = (ImageView) findViewById(R.id.chat_audio_record_bucket_imageview);
    audioRecordTextView = (TextView) findViewById(R.id.chat_audio_record_textview);
    vibro = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);

    requestPermission();
    initAudioRecorder();
    recordButton.setRecordTouchListener(new RecordTouchListenerImpl());

    loadChatHistory(qbUsers);
}
 
源代码14 项目: ns-usbloader-mobile   文件: MainActivity.java
private void blockUI(boolean shouldBlock){
    if (shouldBlock) {
        selectBtn.setEnabled(false);
        recyclerView.suppressLayout(true);
        uploadToNsBtn.setCompoundDrawablesWithIntrinsicBounds(null, getResources().getDrawable(R.drawable.ic_cancel), null, null);
        uploadToNsBtn.setText(R.string.interrupt_btn);
        uploadToNsBtn.setOnClickListener(e -> stopService(new Intent(this, CommunicationsService.class)));
        progressBarMain.setVisibility(ProgressBar.VISIBLE);
        progressBarMain.setIndeterminate(true);//TODO
        uploadToNsBtn.setEnabled(true);
        return;
    }
    selectBtn.setEnabled(true);
    recyclerView.suppressLayout(false);
    uploadToNsBtn.setCompoundDrawablesWithIntrinsicBounds(null, getResources().getDrawable(R.drawable.ic_upload_btn), null, null);
    uploadToNsBtn.setText(R.string.upload_btn);
    uploadToNsBtn.setOnClickListener(e -> this.uploadFiles() );
    progressBarMain.setVisibility(ProgressBar.INVISIBLE);
    this.updateUploadBtnState();
}
 
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    vContainer = inflater.inflate(R.layout.fragment_qr_code_single_page, null);
    flQrContainer = (FrameLayout) vContainer.findViewById(R.id.fl_qr_container);
    ivQr = (ImageView) vContainer.findViewById(R.id.iv_qrcode);
    ivAvatar = (ImageView) vContainer.findViewById(R.id.iv_avatar);
    pb = (ProgressBar) vContainer.findViewById(R.id.pb);
    ivQr.getLayoutParams().height = ivQr.getLayoutParams().width = QrCodeSize;
    ivAvatar.getLayoutParams().height = ivAvatar.getLayoutParams().width = (int) (QrCodeSize
            * FancyQrCodeThread.AvatarSizeRate);
    vContainer.setOnClickListener(clickListener);
    if (AppSharedPreference.getInstance().hasUserAvatar() && isShowAvatar) {
        ivAvatar.setVisibility(View.VISIBLE);
    } else {
        ivAvatar.setVisibility(View.GONE);
    }
    configureImages();
    configureVanityAddress();
    return vContainer;
}
 
源代码16 项目: green_android   文件: WordsFragment.java
@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
                         final Bundle savedInstanceState) {
    final View view = inflater.inflate(R.layout.fragment_onboarding_words, container, false);

    // Get arguments: words and offset
    final Bundle b = this.getArguments();
    if (b == null)
        return view;
    final List<String> words = b.getStringArrayList("words");
    final int offset = b.getInt("offset");
    final int index = offset / 6;

    final ProgressBar progressBar = UI.find(view, R.id.progressBar);
    progressBar.setProgress(25+index*25);

    // Setup words recyclerview
    final WordsViewAdapter wordsViewAdapter = new WordsViewAdapter(getContext(), words, offset);
    final RecyclerView wordsRecyclerView = UI.find(view, R.id.wordsRecyclerView);
    wordsRecyclerView.setHasFixedSize(true);
    wordsRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    wordsRecyclerView.setAdapter(wordsViewAdapter);
    return view;
}
 
源代码17 项目: letv   文件: ListFragment.java
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    Context context = getActivity();
    FrameLayout root = new FrameLayout(context);
    LinearLayout pframe = new LinearLayout(context);
    pframe.setId(INTERNAL_PROGRESS_CONTAINER_ID);
    pframe.setOrientation(1);
    pframe.setVisibility(8);
    pframe.setGravity(17);
    pframe.addView(new ProgressBar(context, null, 16842874), new LayoutParams(-2, -2));
    root.addView(pframe, new LayoutParams(-1, -1));
    FrameLayout lframe = new FrameLayout(context);
    lframe.setId(INTERNAL_LIST_CONTAINER_ID);
    TextView tv = new TextView(getActivity());
    tv.setId(INTERNAL_EMPTY_ID);
    tv.setGravity(17);
    lframe.addView(tv, new LayoutParams(-1, -1));
    ListView lv = new ListView(getActivity());
    lv.setId(16908298);
    lv.setDrawSelectorOnTop(false);
    lframe.addView(lv, new LayoutParams(-1, -1));
    root.addView(lframe, new LayoutParams(-1, -1));
    root.setLayoutParams(new LayoutParams(-1, -1));
    return root;
}
 
源代码18 项目: Cirrus_depricated   文件: FolderPickerActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
    Log_OC.d(TAG, "onCreate() start");

    super.onCreate(savedInstanceState);

    setContentView(R.layout.files_folder_picker);

    if (savedInstanceState == null) {
        createFragments();
    }


    fpToolbar = (Toolbar) findViewById(R.id.toolbar);
    if (fpToolbar != null)
    {
        setSupportActionBar(fpToolbar);
    }
    // sets callback listeners for UI elements
    initControls();

    // Action bar setup
    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayShowTitleEnabled(true);
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);

    mProgressBar = (ProgressBar) findViewById(R.id.progressBar);
    mProgressBar.setIndeterminateDrawable(
            getResources().getDrawable(
                    R.drawable.actionbar_progress_indeterminate_horizontal));
    mProgressBar.setIndeterminate(mSyncInProgress);
    // always AFTER setContentView(...) ; to work around bug in its implementation

    // sets message for empty list of folders
    setBackgroundText();

    Log_OC.d(TAG, "onCreate() end");
}
 
源代码19 项目: repay-android   文件: FriendHistoryFragment.java
@Override
protected void onPreExecute()
{
	mList.setAdapter(null);
	mList.setVisibility(ListView.GONE);
	mNoDebtsMsg.setVisibility(TextView.GONE);
	mProgressBar.setVisibility(ProgressBar.VISIBLE);
}
 
源代码20 项目: MobileGuard   文件: MsgSafeActivity.java
/**
 * 1
 */
@Override
protected void initView() {
    setContentView(R.layout.activity_msg_safe);
    // bind view
    pbLoading = (ProgressBar) findViewById(R.id.pb_loading);
    tvNoData = (TextView) findViewById(R.id.tv_no_data);
    lvBlacklist = (ListView) findViewById(R.id.lv_blacklist);

}
 
@Override
protected void init(Context context) {
    super.init(context);
    bottomProgressBar = (ProgressBar) findViewById(R.id.bottom_progressbar);
    titleTextView = (TextView) findViewById(R.id.title);
    backButton = (ImageView) findViewById(R.id.back);
    thumbImageView = (ImageView) findViewById(R.id.thumb);
    coverImageView = (ImageView) findViewById(R.id.cover);
    loadingProgressBar = (ProgressBar) findViewById(R.id.loading);

    thumbImageView.setOnClickListener(this);
    backButton.setOnClickListener(this);

}
 
源代码22 项目: sctalk   文件: BaseMsgRenderView.java
@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    portrait = (IMBaseImageView) findViewById(R.id.user_portrait);
    messageFailed = (ImageView) findViewById(R.id.message_state_failed);
    loadingProgressBar = (ProgressBar) findViewById(R.id.progressBar1);
    name = (TextView) findViewById(R.id.name);
}
 
源代码23 项目: WeexOne   文件: WXPageActivity.java
private void initUIAndData() {

    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setTitle(mUri.toString().substring(mUri.toString().lastIndexOf(File.separator) + 1));

    mContainer = (ViewGroup) findViewById(R.id.container);
    mProgressBar = (ProgressBar) findViewById(R.id.progress);
  }
 
源代码24 项目: aurora-imui   文件: SelectPhotoView.java
private void init(Context context, AttributeSet attrs) {
    inflate(context, R.layout.layout_chatinput_selectphoto, this);
    mContext = context;

    mProgressBar = (ProgressBar) findViewById(R.id.aurora_progressbar_selectphoto);
    mRvPhotos = (RecyclerView) findViewById(R.id.aurora_recyclerview_selectphoto);
    mRvPhotos.setLayoutManager(new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false));
    mRvPhotos.setHasFixedSize(true);
    mMediaHandler = new MediaHandler(this);
}
 
private void bindViews(View view) {
    mSearch = (SearchView) view.findViewById(R.id.search_cities__search);
    mListGroup = view.findViewById(R.id.search_cities__list_group);
    mList = (ListView) view.findViewById(R.id.search_cities__list);
    mEmpty = (TextView) view.findViewById(R.id.search_cities__empty);
    mProgress = (ProgressBar) view.findViewById(R.id.search_cities__progress);
}
 
源代码26 项目: monolog-android   文件: EaseChatRow.java
private void initView() {
    onInflatView();
    timeStampView = (TextView) findViewById(R.id.timestamp);
    userAvatarView = (ImageView) findViewById(R.id.iv_userhead);
    bubbleLayout = findViewById(R.id.bubble);
    usernickView = (TextView) findViewById(R.id.tv_userid);

    progressBar = (ProgressBar) findViewById(R.id.progress_bar);
    statusView = (ImageView) findViewById(R.id.msg_status);
    ackedView = (TextView) findViewById(R.id.tv_ack);
    deliveredView = (TextView) findViewById(R.id.tv_delivered);

    onFindViewById();
}
 
源代码27 项目: RePlugin-GameSdk   文件: HWWebView.java
@SuppressLint("SetJavaScriptEnabled")
@SuppressWarnings("deprecation")
public HWWebView(Context context) {
	super(context);
	mMebView=this;
	this.mContext = context;

	int screenWidth = ((Activity) context).getWindowManager()
			.getDefaultDisplay().getWidth(); // 屏幕宽(像素,如:480px)
	int screenHeight = ((Activity) context).getWindowManager()
			.getDefaultDisplay().getHeight(); // 屏幕高(像素,如:800p)

	progressBar = new ProgressBar(context, null,
			android.R.attr.progressBarStyle);
	progressBar.setVisibility(View.GONE);

	AbsoluteLayout.LayoutParams progressBarParams = new AbsoluteLayout.LayoutParams(
			60, 60, (screenWidth - 60) / 2, (screenHeight - 60) / 2);

	this.addView(progressBar, progressBarParams);

	WebSettings set = this.getSettings();
	set.setSavePassword(false);
	set.setSaveFormData(false);
	set.setJavaScriptEnabled(true);
	set.setJavaScriptCanOpenWindowsAutomatically(true);

	this.setWebViewClient(new HWWebViewClient());
}
 
源代码28 项目: fingerpoetry-android   文件: PRTHeader.java
public PRTHeader(Context context) {
	super(context);
	int[] size = R.getScreenSize(context);
	float screenWidth = size[0] < size[1] ? size[0] : size[1];
	float ratio = screenWidth / DESIGN_SCREEN_WIDTH;

	setOrientation(VERTICAL);

	LinearLayout llInner = new LinearLayout(context);
	LayoutParams lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
	lp.gravity = Gravity.CENTER_HORIZONTAL;
	addView(llInner, lp);

	ivArrow = new RotateImageView(context);
	int resId = R.getBitmapRes(context, "ssdk_oks_ptr_ptr");
	if (resId > 0) {
		ivArrow.setImageResource(resId);
	}
	int avatarWidth = (int) (ratio * DESIGN_AVATAR_WIDTH);
	lp = new LayoutParams(avatarWidth, avatarWidth);
	lp.gravity = Gravity.CENTER_VERTICAL;
	int avataPadding = (int) (ratio * DESIGN_AVATAR_PADDING);
	lp.topMargin = lp.bottomMargin = avataPadding;
	llInner.addView(ivArrow, lp);

	pbRefreshing = new ProgressBar(context);
	resId = R.getBitmapRes(context, "ssdk_oks_classic_progressbar");
	Drawable pbdrawable = context.getResources().getDrawable(resId);
	pbRefreshing.setIndeterminateDrawable(pbdrawable);
	llInner.addView(pbRefreshing, lp);
	pbRefreshing.setVisibility(View.GONE);

	tvHeader = new TextView(getContext());
	tvHeader.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
	tvHeader.setPadding(avataPadding, 0, avataPadding, 0);
	tvHeader.setTextColor(0xff09bb07);
	lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
	lp.gravity = Gravity.CENTER_VERTICAL;
	llInner.addView(tvHeader, lp);
}
 
源代码29 项目: Swface   文件: FaceDetailActivity.java
private void showPictureDetail(int position) {
	String faceToken = getFaceTokenAndUrl(position).split("#")[0];
	showNormalDialog("人脸详情","正在玩命分析中...",true,new ProgressBar(this),false);
	DatabaseAdapter db = new DatabaseAdapter(this);
	Face face = db.findFaceByFaceToken_Faces(faceToken,myHandler);
	if(face!=null){
		dialog.dismiss();
		showDetailDialog(face);
	}
}
 
源代码30 项目: KJGallery   文件: SamplePagerAdapter.java
@Override
public View instantiateItem(ViewGroup container, int position) {
    View root = View.inflate(aty, R.layout.item_pager, null);
    final PhotoView photoView = (PhotoView) root.findViewById(R.id.images);
    final GifImageView gifView = (GifImageView) root.findViewById(R.id.gifimage);
    final ProgressBar mProgressBar = (ProgressBar) root.findViewById(R.id.progress);

    GifRequest request = new GifRequest(imageUrls[position], new HttpCallBack() {
        @Override
        public void onPreStart() {
            super.onPreStart();
            mProgressBar.setVisibility(View.VISIBLE);
        }

        @Override
        public void onSuccess(byte[] t) {
            super.onSuccess(t);
            //根据图片类型的不同选择不同的加载方案
            if (TYPE_GIF == getType(t)) {
                displayGif(gifView, t);
            } else {
                displayImage(photoView, t);
            }
        }

        @Override
        public void onFinish() {
            super.onFinish();
            mProgressBar.setVisibility(View.GONE);
        }
    });
    kjh.doRequest(request);

    container.addView(root, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams
            .MATCH_PARENT);
    return root;
}