本文整理汇总了Java中com.dd.CircularProgressButton类的典型用法代码示例。如果您正苦于以下问题:Java CircularProgressButton类的具体用法?Java CircularProgressButton怎么用?Java CircularProgressButton使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CircularProgressButton类属于com.dd包,在下文中一共展示了CircularProgressButton类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initView
import com.dd.CircularProgressButton; //导入依赖的package包/类
private void initView() {
client = new LocationClient(getApplicationContext());
client.registerLocationListener(new RunningActivity.MyLocationListener());
rootLayout = (LinearLayout) findViewById(R.id.running_root_layout);
mapView = (MapView) findViewById(R.id.bmapView);
startButton = (CircularProgressButton) findViewById(R.id.cpb_button);
latLngText = (TextView) findViewById(R.id.lat_lng_text);
speedNumber = (TextView) findViewById(R.id.speed_text);
distanceNumber = (ImageNumberDisplayView) findViewById(R.id.distance_text);
stepNumber = (ImageNumberDisplayView) findViewById(R.id.running_step);
energyNumber = (ImageNumberDisplayView) findViewById(R.id.running_energy);
setToolbar(R.id.running_toolbar, true);
timer = (Chronometer) findViewById(R.id.timer);
baiduMap = mapView.getMap();
startButton.setClickable(false);
startButton.setIndeterminateProgressMode(true);
}
示例2: initViews
import com.dd.CircularProgressButton; //导入依赖的package包/类
private void initViews(View view)
{
// 上传照片的View
uploadPhotoLayout = (RelativeLayout) view.findViewById(R.id.upload_photo);
detectPhotoButton = (CircularProgressButton) uploadPhotoLayout.findViewById(R.id.detect_photo_button);
detectPhotoButton.setOnClickListener(this);
photoImageView = (ImageView) view.findViewById(R.id.photo_img);
photoImageView.setOnClickListener(this);
// 显示结果的View
this.containerView = view.findViewById(R.id.face_detect_container);
photoResultImageView = (ImageView) view.findViewById(R.id.detect_result_img);
photoResultImageView.setOnClickListener(this);
ageTextView = (TextView) view.findViewById(R.id.age_text);
genderTextView = (TextView) view.findViewById(R.id.gender_text);
smileTextView = (TextView) view.findViewById(R.id.smile_text);
raceTextView = (TextView) view.findViewById(R.id.race_text);
}
示例3: simulateErrorProgress
import com.dd.CircularProgressButton; //导入依赖的package包/类
private void simulateErrorProgress(final CircularProgressButton button) {
ValueAnimator widthAnimation = ValueAnimator.ofInt(1, 99);
widthAnimation.setDuration(1500);
widthAnimation.setInterpolator(new AccelerateDecelerateInterpolator());
widthAnimation.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
Integer value = (Integer) animation.getAnimatedValue();
button.setProgress(value);
if (value == 99) {
button.setProgress(-1);
}
}
});
widthAnimation.start();
}
示例4: onCreateView
import com.dd.CircularProgressButton; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.frag_controlview_connect,
container, false);
helpText = (TextView)rootView.findViewById(R.id.helpConnectText);
startButton = (CircularProgressButton) rootView.findViewById(R.id.startConnectButton);
mIsInBackground = false;
stopScan();
scannerState = SCANNER_STATE_SCAN_STOP;
drawStopScreen();
return rootView;
}
示例5: onCreateView
import com.dd.CircularProgressButton; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
provider = getArguments().getParcelable(ARG_PROVIDER);
View rootView = inflater.inflate(R.layout.fragment_details_query, container, false);
TextView help = (TextView) rootView.findViewById(R.id.help);
help.setText(getResources().getString(R.string.help_info));
button = (CircularProgressButton) rootView.findViewById(R.id.injection_button);
button.setOnClickListener(this);
et = (EditText) rootView.findViewById(R.id.injection_et);
et.setText(R.string.sql_injection);
return rootView;
}
示例6: ViewHolder
import com.dd.CircularProgressButton; //导入依赖的package包/类
public ViewHolder(View view) {
super(view);
mAuthorityView = (TextView) view.findViewById(R.id.tv_name);
mTvReadPermissions = (TextView) view.findViewById(R.id.tv_version);
mTvWritePermissions = (TextView) view.findViewById(R.id.tv_api_level);
button = (CircularProgressButton) view.findViewById(R.id.progress);
}
示例7: initViews
import com.dd.CircularProgressButton; //导入依赖的package包/类
private void initViews(View view)
{
// 上传照片的View
uploadPhotoLayout = (RelativeLayout) view.findViewById(R.id.upload_photo);
detectPhotoButton = (CircularProgressButton) uploadPhotoLayout.findViewById(R.id.detect_photo_button);
detectPhotoButton.setText(R.string.funnyChartlet);
detectPhotoButton.setOnClickListener(this);
photoImageView = (ImageView) view.findViewById(R.id.photo_img);
photoImageView.setOnClickListener(this);
// 趣味贴图的View
this.containerView = view.findViewById(R.id.funny_chartlet_container);
funnyChartletPhoto = (ImageView) view.findViewById(R.id.funny_chartlet_photo);
funnyChartletPhoto.setOnClickListener(this);
eye1Button = (ImageButton) view.findViewById(R.id.eye1);
eye1Button.setOnClickListener(this);
eye2Button = (ImageButton) view.findViewById(R.id.eye2);
eye2Button.setOnClickListener(this);
eye3Button = (ImageButton) view.findViewById(R.id.eye3);
eye3Button.setOnClickListener(this);
eye4Button = (ImageButton) view.findViewById(R.id.eye4);
eye4Button.setOnClickListener(this);
eye5Button = (ImageButton) view.findViewById(R.id.eye5);
eye5Button.setOnClickListener(this);
eye6Button = (ImageButton) view.findViewById(R.id.eye6);
eye6Button.setOnClickListener(this);
eye7Button = (ImageButton) view.findViewById(R.id.eye7);
eye7Button.setOnClickListener(this);
eye8Button = (ImageButton) view.findViewById(R.id.eye8);
eye8Button.setOnClickListener(this);
eye9Button = (ImageButton) view.findViewById(R.id.eye9);
eye9Button.setOnClickListener(this);
}
示例8: initViews
import com.dd.CircularProgressButton; //导入依赖的package包/类
private void initViews(View view)
{
this.containerView = view.findViewById(R.id.similar_face_container);
similarResultTextView = (HTextView) view.findViewById(R.id.similar_result_text);
similarFace1ImageView = (ImageView) view.findViewById(R.id.similar_face_img1);
similarFace1ImageView.setOnClickListener(this);
similarFace2ImageView = (ImageView) view.findViewById(R.id.similar_face_img2);
similarFace2ImageView.setOnClickListener(this);
getSimilarIndexButton = (CircularProgressButton) view.findViewById(R.id.similar_index_button);
getSimilarIndexButton.setOnClickListener(this);
}
示例9: simulateSuccessProgress
import com.dd.CircularProgressButton; //导入依赖的package包/类
private void simulateSuccessProgress(final CircularProgressButton button) {
ValueAnimator widthAnimation = ValueAnimator.ofInt(1, 100);
widthAnimation.setDuration(1500);
widthAnimation.setInterpolator(new AccelerateDecelerateInterpolator());
widthAnimation.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
Integer value = (Integer) animation.getAnimatedValue();
button.setProgress(value);
}
});
widthAnimation.start();
}
示例10: onCreate
import com.dd.CircularProgressButton; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_layout);
username = (EditText) findViewById(R.id.main_username_editText);
password = (EditText) findViewById(R.id.main_password_editText);
loginButton = (CircularProgressButton) findViewById(R.id.main_login_button);
loginButton.setOnClickListener(listener);
}
示例11: getButton
import com.dd.CircularProgressButton; //导入依赖的package包/类
public CircularProgressButton getButton() {
return button;
}
示例12: onCreate
import com.dd.CircularProgressButton; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
initTaskDescriptionConfig();
accountManager = AccountManager.get(getBaseContext());
Account[] accounts = accountManager.getAccountsByType(AccountGeneral.ACCOUNT_TYPE);
if(accounts.length > 0) {
Toast.makeText(this, getString(R.string.warning_multiple_account), Toast.LENGTH_LONG).show();
finish();
return;
}
mAuthTokenType = getIntent().getStringExtra(ARG_AUTH_TYPE);
if (mAuthTokenType == null)
mAuthTokenType = AccountGeneral.AUTHTOKEN_TYPE_FULL_ACCESS;
// Set up the login form.
mRegistrationView = (EditText) findViewById(R.id.registration);
//Allow only digits or hyphen
InputFilter filter = new InputFilter() {
//TODO: Fix some bugs
@Override
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
if (dest.length() >= 11) return "";
for (int i = start; i < end; i++) {
if (!Character.isDigit(source.charAt(i))) return "";
if (dstart == 9) return "-" + source.charAt(i);
}
return null;
}
};
mRegistrationView.setFilters(new InputFilter[]{filter});
mPasswordView = (EditText) findViewById(R.id.password);
mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
if (id == R.id.login || id == EditorInfo.IME_NULL) {
attemptLogin();
return true;
}
return false;
}
});
mRegistrationSignInButton = (CircularProgressButton) findViewById(R.id.registration_sign_in_button);
mRegistrationSignInButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
attemptLogin();
}
});
}
示例13: onViewCreated
import com.dd.CircularProgressButton; //导入依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mListView = (ListView) view.findViewById(android.R.id.list);
ViewCompat.setOverScrollMode(mListView, ViewCompat.OVER_SCROLL_NEVER);
mListView.setOnItemClickListener(this);
final LayoutInflater inflater = LayoutInflater.from(getActivity());
final View headerView = inflater.inflate(R.layout.navigation_drawer_header,
mListView, false);
mListView.addHeaderView(headerView);
// Register for the login event
mUserClient.getBus().register(mUserListener);
final View headerUser = headerView.findViewById(R.id.navigation_drawer_header_background);
headerUser.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(final View v) {
startActivityForResult(new Intent(getActivity(), UserProfileActivity.class), 100);
}
});
mUsernameTextView = (TextView) headerView
.findViewById(R.id.navigation_drawer_fragment_username);
mAvatar = (ImageView) headerView.findViewById(R.id.navigation_drawer_fragment_avatar);
mLoginLogout = (CircularProgressButton) headerView
.findViewById(R.id.navigation_drawer_login_logout);
mLoginLogout.setOnClickListener(new LoginLogoutListener());
mLoginLogout.setIndeterminateProgressMode(true);
final XDAAccount selectedAccount = AccountUtils.getAccount(getActivity());
if (selectedAccount == null) {
RetrofitClient.setAuthToken(null);
} else {
RetrofitClient.setAuthToken(selectedAccount.getAuthToken());
mUserClient.getUserProfileAsync();
}
onUserAccountSelected(selectedAccount);
mAdapter.onUserProfileChanged(selectedAccount);
mSectionAdapter.notifyDataSetChanged();
mListView.setAdapter(mSectionAdapter);
}