• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ProgressBar类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.holoeverywhere.widget.ProgressBar的典型用法代码示例。如果您正苦于以下问题:Java ProgressBar类的具体用法?Java ProgressBar怎么用?Java ProgressBar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ProgressBar类属于org.holoeverywhere.widget包,在下文中一共展示了ProgressBar类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: LazyImageLoader

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
@SuppressLint("NewApi")
@SuppressWarnings("deprecation")
private LazyImageLoader(String file, ImageView img, ProgressBar pb) {
	mFilePath = file;
	mImgView = img;
	mProgressBar = pb;
	float scale = BaseContactSelectFrag.this.getActivity().getResources().getDisplayMetrics().density;
	mWidth = (int) (250 * scale + 0.5f);
	Display display = BaseContactSelectFrag.this.getActivity().getWindowManager().getDefaultDisplay();
	if (Build.VERSION.SDK_INT < 13) {
		mHeight = display.getHeight() - (int) (40 * scale + 0.5f);
	} else {
		Point size = new Point();
		display.getSize(size);
		mHeight = size.y - (int) (40 * scale + 0.5f);
	}
}
 
开发者ID:saltisgood,项目名称:opensnap,代码行数:18,代码来源:BaseContactSelectFrag.java


示例2: onCreate

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_web);

	webView = (WebView)findViewById(R.id.web_view);
	progressBar = (ProgressBar)findViewById(R.id.progress);

	initWebView();

	Bundle extras = getIntent().getExtras();
	currentUrl = extras.getString(EXTRA_URL);

	if (currentUrl == null) {
		currentUrl = "";
	}

	webView.loadUrl(currentUrl);
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:20,代码来源:GeneralWebActivity.java


示例3: onLocationChanged

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
public void onLocationChanged(Location newLocation) {
	// Called when a new location is found
	ProgressBar spn_Locating = (ProgressBar) findViewById(R.id.spn_Locating);
	System.out.println("New Location from: "
			+ newLocation.getProvider());

	if (isBetterLocation(newLocation, getLocation())) {
		spn_Locating.setVisibility(View.VISIBLE);
		setLastLookup(newLocation.getTime());
		new SearchVenuesTask().execute(newLocation);
	} else {
		spn_Locating.setVisibility(View.INVISIBLE);
	}

	spn_Locating.postInvalidate();
}
 
开发者ID:seawolf,项目名称:KeepingTracks,代码行数:17,代码来源:CheckinActivity.java


示例4: onCreateView

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {       
View view = inflater.inflate(R.layout.fragment_vertretung, container, false);

appContext = getActivity().getApplicationContext();
startActivity = (StartActivity) getActivity();

// Restore preferences
      settings = PreferenceManager.getDefaultSharedPreferences(appContext);
      list = (ListView) view.findViewById(R.id.listView1);
      klassen = (Spinner) view.findViewById(R.id.spinner1);
      txtStand = (TextView) view.findViewById(R.id.txtStand);
      pBar = (ProgressBar) view.findViewById(R.id.progressBar1);
      
      listadapter = new VertretungAdapter(startActivity);
list.setAdapter(listadapter);

new LoadClassesTask().execute();

// Inflate the layout for this fragment
      return view;
  }
 
开发者ID:johan12345,项目名称:ls-vertretungsplan,代码行数:23,代码来源:VertretungFragment.java


示例5: onLoginClick

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
/**
 * Called when clicking on the login button in the login screen.
 * @param v The button that was pressed.
 */
public void onLoginClick(View v)
{
	EditText vEdit = (EditText)this.findViewById(R.id.loginEdit);
	EditText vPword = (EditText)this.findViewById(R.id.pwordEdit);
	if (vEdit == null || vPword == null)
		return;
	
	String login = vEdit.getText().toString().trim().toLowerCase();
	String pWord = vPword.getText().toString().trim();
	if (StatMethods.IsStringNullOrEmpty(login)) {
		StatMethods.hotBread(this, "Login field is empty", Toast.LENGTH_SHORT);
		return;
	}
	else if (StatMethods.IsStringNullOrEmpty(pWord)) {
		StatMethods.hotBread(this, "Password field is empty", Toast.LENGTH_SHORT);
		return;
	}
	
	if (!StatMethods.isNetworkAvailable(this, true))
		return;
	
	Button loginButton = (Button)this.findViewById(R.id.button1);
	loginButton.setVisibility(View.INVISIBLE);
	ProgressBar pb1 = (ProgressBar)this.findViewById(R.id.progressBar1);
	pb1.setVisibility(View.VISIBLE);
	//new BGLogin(this.getApplicationContext(), null).execute("login", login, pWord);
       new LoginTask(this.getApplicationContext(), login, pWord).execute();
}
 
开发者ID:saltisgood,项目名称:opensnap,代码行数:33,代码来源:LaunchActivity.java


示例6: onLoginComplete

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
public void onLoginComplete(boolean wasSuccessful) {
    if (wasSuccessful) {
        if (GCMUtil.checkPlayServices(this)) {
            new SnapGCMRegistrar(this).setupGoogleCloudManager(true);
        }

        LoadMenu(3, 1);
    } else {
        ProgressBar pb = (ProgressBar)this.findViewById(R.id.progressBar1);
        pb.setVisibility(View.INVISIBLE);
        Button butt = (Button)this.findViewById(R.id.button1);
        butt.setVisibility(View.VISIBLE);
    }
}
 
开发者ID:saltisgood,项目名称:opensnap,代码行数:15,代码来源:LaunchActivity.java


示例7: updateProgressBars

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
/**
 * Progress Bar function. Mostly extracted from PhoneWindow.java
 */
private void updateProgressBars(int value) {
    ProgressBar circularProgressBar = getCircularProgressBar();
    ProgressBar horizontalProgressBar = getHorizontalProgressBar();

    if (value == Window.PROGRESS_VISIBILITY_ON) {
        if (mFeatureProgress) {
            int level = horizontalProgressBar.getProgress();
            int visibility = (horizontalProgressBar.isIndeterminate() || level < 10000) ?
                    View.VISIBLE : View.INVISIBLE;
            horizontalProgressBar.setVisibility(visibility);
        }
        if (mFeatureIndeterminateProgress) {
            circularProgressBar.setVisibility(View.VISIBLE);
        }
    } else if (value == Window.PROGRESS_VISIBILITY_OFF) {
        if (mFeatureProgress) {
            horizontalProgressBar.setVisibility(View.GONE);
        }
        if (mFeatureIndeterminateProgress) {
            circularProgressBar.setVisibility(View.GONE);
        }
    } else if (value == Window.PROGRESS_INDETERMINATE_ON) {
        horizontalProgressBar.setIndeterminate(true);
    } else if (value == Window.PROGRESS_INDETERMINATE_OFF) {
        horizontalProgressBar.setIndeterminate(false);
    } else if (Window.PROGRESS_START <= value && value <= Window.PROGRESS_END) {
        // We want to set the progress value before testing for visibility
        // so that when the progress bar becomes visible again, it has the
        // correct level.
        horizontalProgressBar.setProgress(value - Window.PROGRESS_START);

        if (value < Window.PROGRESS_END) {
            showProgressBars(horizontalProgressBar, circularProgressBar);
        } else {
            hideProgressBars(horizontalProgressBar, circularProgressBar);
        }
    }
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:42,代码来源:ActionBarActivityDelegateBase.java


示例8: showProgressBars

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
private void showProgressBars(ProgressBar horizontalProgressBar,
                              ProgressBar spinnyProgressBar) {
    if (mFeatureIndeterminateProgress && spinnyProgressBar.getVisibility() == View.INVISIBLE) {
        spinnyProgressBar.setVisibility(View.VISIBLE);
    }
    // Only show the progress bars if the primary progress is not complete
    if (mFeatureProgress && horizontalProgressBar.getProgress() < 10000) {
        horizontalProgressBar.setVisibility(View.VISIBLE);
    }
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:11,代码来源:ActionBarActivityDelegateBase.java


示例9: hideProgressBars

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
private void hideProgressBars(ProgressBar horizontalProgressBar,
                              ProgressBar spinnyProgressBar) {
    if (mFeatureIndeterminateProgress && spinnyProgressBar.getVisibility() == View.VISIBLE) {
        spinnyProgressBar.setVisibility(View.INVISIBLE);
    }
    if (mFeatureProgress && horizontalProgressBar.getVisibility() == View.VISIBLE) {
        horizontalProgressBar.setVisibility(View.INVISIBLE);
    }
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:10,代码来源:ActionBarActivityDelegateBase.java


示例10: getCircularProgressBar

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
private ProgressBar getCircularProgressBar() {
    ProgressBar pb = (ProgressBar) mActionBarView.findViewById(R.id.progress_circular);
    if (pb != null) {
        pb.setVisibility(View.INVISIBLE);
    }
    return pb;
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:8,代码来源:ActionBarActivityDelegateBase.java


示例11: getHorizontalProgressBar

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
private ProgressBar getHorizontalProgressBar() {
    ProgressBar pb = (ProgressBar) mActionBarView.findViewById(R.id.progress_horizontal);
    if (pb != null) {
        pb.setVisibility(View.INVISIBLE);
    }
    return pb;
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:8,代码来源:ActionBarActivityDelegateBase.java


示例12: initProgress

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
public void initProgress() {
    mProgressView = new ProgressBar(mContext, null, 0, mProgressStyle);
    mProgressView.setId(R.id.progress_horizontal);
    mProgressView.setMax(10000);
    mProgressView.setVisibility(GONE);
    addView(mProgressView);
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:8,代码来源:ActionBarView.java


示例13: initIndeterminateProgress

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
public void initIndeterminateProgress() {
    mIndeterminateProgressView = new ProgressBar(mContext, null, 0,
            mIndeterminateProgressStyle);
    mIndeterminateProgressView.setId(R.id.progress_circular);
    mIndeterminateProgressView.setVisibility(GONE);
    addView(mIndeterminateProgressView);
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:8,代码来源:ActionBarView.java


示例14: onCreateView

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
	viewGroup = (ViewGroup)inflater.inflate(R.layout.fragment_achievements, container, false);

	itemsList = (ListView)viewGroup.findViewById(R.id.items);
	progressBar = (ProgressBar)viewGroup.findViewById(R.id.progress);

	refreshAdapter();

	((Button)viewGroup.findViewById(R.id.back)).setOnClickListener(new View.OnClickListener() {
		@Override
		public void onClick(View v) {
			activity.soundManager.playSound(SoundManager.SOUND_BTN_PRESS);
			activity.showFragment(activity.menuFragment);
		}
	});

	((TextView)viewGroup.findViewById(R.id.exp)).setText(getString(R.string.achievements_exp, profile.exp));

	updatePlayerName();
	ensureSelectedTab();
	isActive = true;

	MyApplication.self.getLocalBroadcastManager().registerReceiver(
		leaderboardLoadedReceiver,
		new IntentFilter(LoadLeaderboardProvider.BROADCAST_ACTION)
	);

	MyApplication.self.getLocalBroadcastManager().registerReceiver(
		leaderboardUpdatedReceiver,
		new IntentFilter(UpdateLeaderboardProvider.BROADCAST_ACTION)
	);

	return viewGroup;
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:36,代码来源:AchievementsFragment.java


示例15: onPostExecute

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
protected void onPostExecute(Boolean venuesUpdated) {
	amUpdatingLocation(false);
	Location location = getLocation();

	System.out.println("Post-Execute!");

	ProgressBar spn_Locating = (ProgressBar) findViewById(R.id.spn_Locating);
	spn_Locating.setVisibility(View.INVISIBLE);
	spn_Locating.postInvalidate();

	if (venuesUpdated) {
		System.out.println(location.getProvider() + " > "
				+ "Venues Updated!");

		setListAdapter(new ArrayAdapter<String>(CheckinActivity.this,
				R.layout.foursquare_checkin_venue, getVenues()));

		Toast.makeText(
				getApplicationContext(),
				getString(R.string.foursquare_updates_from,
						location.getProvider()), Toast.LENGTH_SHORT)
				.show();
	} else {
		System.out.println(location.getProvider()
				+ " > Venues not updated.");
	}

}
 
开发者ID:seawolf,项目名称:KeepingTracks,代码行数:29,代码来源:CheckinActivity.java


示例16: onCreateView

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {       
View view = inflater.inflate(R.layout.fragment_nachrichten, container, false);

      pBar = (ProgressBar) view.findViewById(R.id.progressBar2);
      list = (ListView) view.findViewById(R.id.listView2);
      progress(true);
      
      listadapter = new NachrichtenAdapter(activity);
list.setAdapter(listadapter);

// Inflate the layout for this fragment
      return view;
  }
 
开发者ID:johan12345,项目名称:ls-vertretungsplan,代码行数:15,代码来源:NachrichtenFragment.java


示例17: onCreateView

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
	viewGroup = (ViewGroup)inflater.inflate(R.layout.fragment_prepare, container, false);

	progressView = (ProgressBar)viewGroup.findViewById(R.id.progress);
	infoView = (TextView)viewGroup.findViewById(R.id.info);
	cancelBtn = (Button)viewGroup.findViewById(R.id.cancel);

	cancelBtn.setOnClickListener(new View.OnClickListener() {
		public void onClick(View v) {
			if (MyApplication.self.dlcTask != null) {
				MyApplication.self.dlcTask.cancel(false);
			}

			activity.showFragment(activity.menuFragment);
		}
	});

	boolean needToUpdateCache = (MyApplication.self.cachedTexturesTask != null || CachedTexturesProvider.needToUpdateCache());
	boolean needToDownloadMusic = (MyApplication.self.dlcTask != null || DlcProvider.needToDownloadMusic());

	if (!needToUpdateCache && !needToDownloadMusic) {
		activity.showFragment(activity.menuFragment);
	} else {
		MyApplication.self.getLocalBroadcastManager().registerReceiver(
			cacheUpdateProgressReceiver,
			new IntentFilter(CachedTexturesProvider.BROADCAST_ACTION)
		);

		MyApplication.self.getLocalBroadcastManager().registerReceiver(
			musicDownloadProgressReceiver,
			new IntentFilter(DlcProvider.BROADCAST_ACTION)
		);

		if (MyApplication.self.cachedTexturesTask == null && needToUpdateCache) {
			CachedTexturesProvider.updateCache();
		}

		if (!needToUpdateCache) {
			startDownload();
		}
	}

	return viewGroup;
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:46,代码来源:PrepareFragment.java


示例18: GeneralWebChromeClient

import org.holoeverywhere.widget.ProgressBar; //导入依赖的package包/类
public GeneralWebChromeClient(ProgressBar progressBar) {
	super();
	this.progressBar = progressBar;
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:5,代码来源:GeneralWebChromeClient.java



注:本文中的org.holoeverywhere.widget.ProgressBar类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RPCProtos类代码示例发布时间:2022-05-22
下一篇:
Java JDBC42PreparedStatement类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap