use of android.view.View.OnClickListener in project coursera-android by aporter.
the class LoggingServiceClient method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final Button buttonStart = (Button) findViewById(R.id.buttonStart);
buttonStart.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
if (mIsBound) {
// Send Message to the Logging Service
logMessageToService();
}
}
});
}
use of android.view.View.OnClickListener in project coursera-android by aporter.
the class SimpleThreadingExample method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mImageView = (ImageView) findViewById(R.id.imageView);
final Button button = (Button) findViewById(R.id.loadButton);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
loadIcon();
}
});
final Button otherButton = (Button) findViewById(R.id.otherButton);
otherButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(SimpleThreadingExample.this, "I'm Working", Toast.LENGTH_SHORT).show();
}
});
}
use of android.view.View.OnClickListener in project coursera-android by aporter.
the class SimpleThreadingViewPostActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mImageView = (ImageView) findViewById(R.id.imageView);
final Button button = (Button) findViewById(R.id.loadButton);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
loadIcon();
}
});
final Button otherButton = (Button) findViewById(R.id.otherButton);
otherButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(SimpleThreadingViewPostActivity.this, "I'm Working", Toast.LENGTH_SHORT).show();
}
});
}
use of android.view.View.OnClickListener in project box-android-apptoapp-sdk by box.
the class ZipActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.zip);
if (getIntent().getParcelableExtra(EXTRA_ONE_CLOUD_DATA) == null) {
finish();
return;
}
// The OneCloud object is what we want to keep track of in our app. It is parcelable so it is easily transferred between activities, receivers, etc.
ocd = (OneCloudData) getIntent().getParcelableExtra(EXTRA_ONE_CLOUD_DATA);
TextView txtFileName = (TextView) findViewById(R.id.txtFileName);
txtFileName.setText(ocd.getFileName());
Button btnZip = (Button) findViewById(R.id.btnZip);
btnZip.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
doZip();
}
});
}
use of android.view.View.OnClickListener in project FirebaseUI-Android by firebase.
the class WelcomeBackIdpPrompt method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.welcome_back_idp_prompt_layout);
IdpResponse newUserIdpResponse = IdpResponse.fromResultIntent(getIntent());
mPrevCredential = AuthCredentialHelper.getAuthCredential(newUserIdpResponse);
User oldUser = User.getUser(getIntent());
String providerId = oldUser.getProvider();
for (IdpConfig idpConfig : mActivityHelper.getFlowParams().providerInfo) {
if (providerId.equals(idpConfig.getProviderId())) {
switch(providerId) {
case GoogleAuthProvider.PROVIDER_ID:
mIdpProvider = new GoogleProvider(this, idpConfig, oldUser.getEmail());
break;
case FacebookAuthProvider.PROVIDER_ID:
mIdpProvider = new FacebookProvider(this, idpConfig, mActivityHelper.getFlowParams().themeId);
break;
case TwitterAuthProvider.PROVIDER_ID:
mIdpProvider = new TwitterProvider(this);
break;
default:
Log.w(TAG, "Unknown provider: " + providerId);
finish(ResultCodes.CANCELED, IdpResponse.getErrorCodeIntent(ErrorCodes.UNKNOWN_ERROR));
return;
}
}
}
if (mIdpProvider == null) {
Log.w(TAG, "Firebase login unsuccessful." + " Account linking failed due to provider not enabled by application: " + providerId);
finish(ResultCodes.CANCELED, IdpResponse.getErrorCodeIntent(ErrorCodes.UNKNOWN_ERROR));
return;
}
((TextView) findViewById(R.id.welcome_back_idp_prompt)).setText(getIdpPromptString(oldUser.getEmail()));
mIdpProvider.setAuthenticationCallback(this);
findViewById(R.id.welcome_back_idp_button).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
mActivityHelper.showLoadingDialog(R.string.progress_dialog_signing_in);
mIdpProvider.startLogin(WelcomeBackIdpPrompt.this);
}
});
}
Aggregations