Subversion Repository Public Repository

Nextrek

Diff Revisions 547 vs 599 for /Android/SmartCharging/SmartCharging/app/src/main/java/it/fedeloper/smartcharging/Manager/Utils.java

Diff revisions: vs.
  @@ -118,19 +118,20 @@
118 118
119 119 }
120 120
121 - public static void toast(Context c,int source)
122 - {
123 - LayoutInflater inflater = LayoutInflater.from(c);
124 - View layout = inflater.inflate(R.layout.toast_layout, null);
121 + public static void toast(Context c,int source) {
122 + Toast.makeText(c, c.getText(source), Toast.LENGTH_SHORT).show();
125 123
126 - TextView text = (TextView) layout.findViewById(R.id.text);
127 - text.setText(c.getString(source));
128 -
129 - Toast toast = new Toast(c.getApplicationContext());
130 - toast.setGravity(Gravity.BOTTOM, 0, -100);
131 - toast.setDuration(Toast.LENGTH_LONG);
132 - toast.setView(layout);
133 -
134 - toast.show();
124 + // LayoutInflater inflater = LayoutInflater.from(c);
125 + // View layout = inflater.inflate(R.layout.toast_layout, null);
126 + //
127 + // TextView text = (TextView) layout.findViewById(R.id.text);
128 + // text.setText(c.getString(source));
129 + //
130 + // Toast toast = new Toast(c.getApplicationContext());
131 + // toast.setGravity(Gravity.BOTTOM, 0, -100);
132 + // toast.setDuration(Toast.LENGTH_LONG);
133 + // toast.setView(layout);
134 + //
135 + // toast.show();
135 136 }
136 137 }