本文整理匯總了Java中de.keyboardsurfer.android.widget.crouton.Crouton.show方法的典型用法代碼示例。如果您正苦於以下問題:Java Crouton.show方法的具體用法?Java Crouton.show怎麽用?Java Crouton.show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類de.keyboardsurfer.android.widget.crouton.Crouton
的用法示例。
在下文中一共展示了Crouton.show方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: enableLocationCapture
import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
public void enableLocationCapture(int action){
expectingLocation = true;
expectingAction = action;
int msg_res;
switch (action) {
case ACTION_NEW_PIN: msg_res = R.string.tap_to_pin;
break;
case ACTION_GET_ORIGIN: msg_res = R.string.tap_origin;
break;
case ACTION_GET_DESTINATION: msg_res = R.string.tap_destination;
break;
default: msg_res = R.string.error;
break;
}
final Crouton crouton = Crouton.makeText(this, msg_res, new Style.Builder()
.setBackgroundColorValue(getResources().getColor(R.color.purple)).setHeight(getActionbarHeight()).build(),
(RelativeLayout)findViewById(R.id.root_layout))
.setConfiguration(new Configuration.Builder().setDuration(Configuration.DURATION_INFINITE).build());
crouton.show();
}
示例2: onAccountResetSent
import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Subscribe
public void onAccountResetSent(OnAccountPasswordResetEvent event) {
Crouton c = getInfoCrouton(getString(R.string.reset_link_sent));
c.setLifecycleCallback(new LifecycleCallback() {
@Override
public void onDisplayed() {
}
@Override
public void onRemoved() {
finish();
}
});
c.show();
}
示例3: crouton1
import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
/**
* This method builds a simple card
*/
private void crouton1() {
LayoutInflater mInflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = mInflater.inflate(R.layout.carddemo_extras_crouton_card, null);
CardView cardView= (CardView)view.findViewById(R.id.carddemo_card_crouton_id);
Card card = new Card(getActivity());
card.setTitle("Crouton Card");
card.setBackgroundResourceId(R.color.demoextra_card_background_color2);
CardThumbnail thumb = new CardThumbnail(getActivity());
thumb.setDrawableResource(R.drawable.ic_action_bulb);
card.addCardThumbnail(thumb);
cardView.setCard(card);
final Crouton crouton;
crouton = Crouton.make(getActivity(), view);
crouton.show();
}
示例4: onPostExecute
import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Override
protected void onPostExecute(Void result) {
super.onPostExecute(result);
// Dismiss the progress dialog
if (pDialog.isShowing())
pDialog.dismiss();
System.out.println("done " );
Crouton crouton ;
if (EvmaApp.isError) {
crouton = Crouton.makeText(getActivity(), "une erreur est survenue lors la mise jour", de.keyboardsurfer.android.widget.crouton.Style.ALERT);
}else{
crouton = Crouton.makeText(getActivity(), "L'�v�nement a �t� mise jour avec succ�s", de.keyboardsurfer.android.widget.crouton.Style.CONFIRM);
}
crouton.show();
}
示例5: onPostExecute
import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Override
protected void onPostExecute(Void result) {
super.onPostExecute(result);
// Dismiss the progress dialog
if (pDialog.isShowing())
pDialog.dismiss();
Crouton crouton;
if (EvmaApp.isError) {
crouton = Crouton.makeText(OrderOverview.this,
"une erreur est survenue lors la creation du commande",
de.keyboardsurfer.android.widget.crouton.Style.ALERT);
} else {
crouton = Crouton.makeText(OrderOverview.this,
"Vous y serez! Nous avons Saved une place pour vous.",
de.keyboardsurfer.android.widget.crouton.Style.CONFIRM);
}
crouton.show();
Intent intx = new Intent(OrderOverview.this,OrderBilletOverview.class);
intx.putExtra("uuids", CommandeController.UnkUUID);
intx.putExtra("pack_id",pack_id);
//evpk
startActivity(intx);
}
示例6: onPostExecute
import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Override
protected void onPostExecute(Void result) {
super.onPostExecute(result);
// Dismiss the progress dialog
if (pDialog.isShowing())
pDialog.dismiss();
System.out.println("done " );
Crouton crouton ;
if (EvmaApp.isError) {
crouton = Crouton.makeText(getActivity(), "une erreur est survenue lors la mise à jour", de.keyboardsurfer.android.widget.crouton.Style.ALERT);
}else{
if (PackAction.equals("Update")) {
crouton = Crouton.makeText(getActivity(), "Le forfait a été mise jour avec succès", de.keyboardsurfer.android.widget.crouton.Style.CONFIRM);
}else{
crouton = Crouton.makeText(getActivity(), "Le forfait a été ajouté avec succès", de.keyboardsurfer.android.widget.crouton.Style.CONFIRM);
}
}
crouton.show();
btn_ShowFreeForm.setVisibility(Button.GONE);
btn_ShowPaidForm.setVisibility(Button.GONE);
ClearFields();
new GetForfaits().execute();
ShowForfaits();
}
示例7: refreshFragments
import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
private void refreshFragments() {
if (vertretungsplan != null) {
vertretungFragment.setVertretungsplan(vertretungsplan);
nachrichtenFragment.setVertretungsplan(vertretungsplan);
} else {
Crouton crouton = Crouton.makeText(this,
"Konnte nicht auf den Vertretungsplan zugreifen",
Style.ALERT);
crouton.show();
}
setProgress(false);
}
示例8: crouton2
import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
/**
* This method builds a simple card
*/
private void crouton2() {
LayoutInflater mInflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = mInflater.inflate(R.layout.carddemo_extras_crouton_card, null);
CardView cardView= (CardView)view.findViewById(R.id.carddemo_card_crouton_id);
Card card = new Card(getActivity());
card.setTitle("Crouton Card");
CardThumbnail thumb = new CardThumbnail(getActivity());
thumb.setDrawableResource(R.drawable.ic_action_halt);
card.addCardThumbnail(thumb);
cardView.setCard(card);
final Crouton crouton;
crouton = Crouton.make(getActivity(), view);
crouton.show();
}
示例9: onListItemClick
import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
System.out.println("Click yaay :v");
String EvForfaitiD = ((TextView) v.findViewById(R.id.tv_event_forf_id))
.getText().toString();
String Soldetickets = ((TextView) v
.findViewById(R.id.tvforfaitSoldetickets)).getText().toString();
String EvForfaitPrice = ((TextView) v.findViewById(R.id.tvForfaitType))
.getText().toString();
String EvForfaitQty = ((TextView) v.findViewById(R.id.tvforfaittickets))
.getText().toString();
String EvForfaitTitle = ((TextView) v.findViewById(R.id.tvforfaitTitle))
.getText().toString();
Crouton crouton;
System.out.println("Soldetickets=>" + Soldetickets + "EvForfaitQty==>" + EvForfaitQty);
int Soldeticketsx = Integer.valueOf(Soldetickets);
int EvForfaitQtyx = Integer.valueOf(EvForfaitQty);
if (Soldetickets.equals(EvForfaitQty) || Soldeticketsx > EvForfaitQtyx ) {
crouton = Crouton.makeText(getActivity(),
":( Tous les billets de cet forfait sont vendus",
de.keyboardsurfer.android.widget.crouton.Style.ALERT);
crouton.show();
return;
}
evpk = mForfaitController.getSingleForfaitByID(EvForfaitiD,
"getAllofit");
Intent in = new Intent(getActivity(), Event_Forfait_cmd.class);
in.putExtra(ForfaitController.TAG_pack_id, EvForfaitiD);
in.putExtra(ForfaitController.TAG_pack_Title, evpk.getTAG_pack_Title());
in.putExtra(ForfaitController.TAG_pack_Qty, evpk.getTAG_pack_Qty());
in.putExtra(ForfaitController.TAG_pack_Price, evpk.getTAG_pack_Price());
in.putExtra(ForfaitController.TAG_pack_Description,
evpk.getTAG_pack_Description());
in.putExtra(ForfaitController.TAG_pack_fees, evpk.getTAG_pack_fees());
in.putExtra(ForfaitController.TAG_pack_Solde, evpk.getTAG_pack_Solde());
in.putExtra(EventsController.TAG_ID, EvID);
startActivity(in);
}
示例10: onPostExecute
import de.keyboardsurfer.android.widget.crouton.Crouton; //導入方法依賴的package包/類
@Override
protected void onPostExecute(Void result) {
super.onPostExecute(result);
System.out.println("done adding us ID " );
if (EvmaApp.isError == false) {
Crouton crouton = Crouton.makeText(SignUp.this,
"F�licitations, votre compte a �t� cr�� avec succ�s ",
de.keyboardsurfer.android.widget.crouton.Style.CONFIRM);
crouton.show();
// Toast.makeText(LoginEv.this,"Login Success",
// Toast.LENGTH_SHORT).show();
dialog.dismiss();
SharedPreferences mPrefs = getSharedPreferences("Mypref" , MODE_PRIVATE);
Editor prefsEditor = mPrefs.edit();
Gson gson = new Gson();
String json = gson.toJson(EvmaApp.CurrentUser);
prefsEditor.putString("CurrentUser", json);
prefsEditor.commit();
if (EvmaApp.CurrentUser.getRole().equals("Utilisateur")) {
EvmaApp.CurrentUsername = EvmaApp.CurrentUser.getUsername();
EvmaApp.CurrentUserEmail = EvmaApp.CurrentUser.getEmail();
EvmaApp.CurrentOrganizer = "";
EvmaApp.CurrentUsernameID = Integer.valueOf(EvmaApp.CurrentUser.getUser_id()) ;
Intent inToMain = new Intent(SignUp.this,MainEv.class);
startActivity(inToMain);
}else{
EvmaApp.CurrentOrganizer = EvmaApp.CurrentUser.getUsername();
EvmaApp.CurrentUsername = "";
EvmaApp.CurrentUsernameID = Integer.valueOf(EvmaApp.CurrentUser.getUser_id()) ;
Intent intUser = new Intent(SignUp.this,MainEv.class);
startActivity(intUser);
}
// EvmaApp.CurrentOrganizer = "";
// EvmaApp.CurrentUser = us;
// Intent inToMain = new Intent(SignUp.this, MainEv.class);
// startActivity(inToMain);
}
}