user name and password was change to as per requirement

parent 5a7d3502
package com.vsoft.uoflservicenow.utils; package com.vsoft.uoflservicenow.utils;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.support.v7.app.AlertDialog;
import android.view.ContextThemeWrapper; import android.view.ContextThemeWrapper;
import com.vsoft.uoflservicenow.R; import com.vsoft.uoflservicenow.R;
/** /**
* Created by npadhy on 9/7/2016. * Created by krishna on 9/7/2016.
*/ */
public class DialogUtils { public class DialogUtils {
private static AlertDialog alertDialog; public static void showNoConnectionDialog(final Activity activity) {
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
new ContextThemeWrapper(activity,
public static void showNoConnectionDialog(final Activity activity) { android.R.style.Theme_Holo));
try { alertDialogBuilder.setTitle(activity
activity.runOnUiThread(new Runnable() { .getString(R.string.connection_alert_dialog_title));
alertDialogBuilder
@Override .setMessage(R.string.connection_alert_dialog_message)
public void run() { .setCancelable(true)
if (alertDialog == null) { .setPositiveButton(
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder( activity.getString(R.string.settings),
new ContextThemeWrapper(activity, new DialogInterface.OnClickListener() {
android.R.style.Theme_Holo)); @Override
alertDialogBuilder.setTitle(activity public void onClick(
.getString(R.string.connection_alert_dialog_title)); DialogInterface dialog,
alertDialogBuilder int id) {
.setMessage(R.string.connection_alert_dialog_message) activity.startActivity(new Intent(android.provider.Settings.ACTION_SETTINGS));
.setCancelable(true) }
.setPositiveButton( })
activity.getString(R.string.settings), .setNegativeButton(
new DialogInterface.OnClickListener() { activity.getString(R.string.cancel),
@Override new DialogInterface.OnClickListener() {
public void onClick( @Override
DialogInterface dialog, public void onClick(DialogInterface dialog,int which) {
int id) { }
activity });
.startActivity(new Intent( AlertDialog alertDialog = alertDialogBuilder.create();
android.provider.Settings.ACTION_SETTINGS)); alertDialog.show();
alertDialog = null; }
}
})
.setNegativeButton(
activity.getString(R.string.cancel),
new DialogInterface.OnClickListener() {
@Override
public void onClick(
DialogInterface dialog,
int which) {
alertDialog = null;
}
});
alertDialog = alertDialogBuilder.create();
alertDialog.show();
}
}
});
} catch (Exception e) {
}
}
} }
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:layout_marginRight="20dp" android:layout_marginRight="20dp"
android:padding="10dp" android:padding="10dp"
android:text=""
android:drawableLeft="@mipmap/ic_user_icon" android:drawableLeft="@mipmap/ic_user_icon"
android:singleLine="true" /> android:singleLine="true" />
<EditText <EditText
...@@ -47,7 +46,6 @@ ...@@ -47,7 +46,6 @@
android:drawableLeft="@mipmap/ic_password_icon" android:drawableLeft="@mipmap/ic_password_icon"
android:inputType="textPassword" android:inputType="textPassword"
android:padding="10dp" android:padding="10dp"
android:text=""
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:layout_marginRight="20dp" android:layout_marginRight="20dp"
android:singleLine="true" /> android:singleLine="true" />
...@@ -68,6 +66,19 @@ ...@@ -68,6 +66,19 @@
android:text="@string/login_screen_login_string" android:text="@string/login_screen_login_string"
android:textAlignment="center" /> android:textAlignment="center" />
<TextView
android:id="@+id/errormessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:textColor="@color/error_color"
android:textSize="@dimen/small_text_size"
android:text=""
android:gravity="center"
android:visibility="gone"
android:layout_gravity="center_horizontal"
/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
......
...@@ -7,8 +7,10 @@ ...@@ -7,8 +7,10 @@
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
card_view:cardBackgroundColor="@color/item_gb_color" card_view:cardBackgroundColor="@color/item_gb_color"
card_view:cardCornerRadius="8dp" card_view:cardCornerRadius="8dp"
card_view:cardElevation="3sp" card_view:cardElevation="10dp"
card_view:cardUseCompatPadding="true"> card_view:cardUseCompatPadding="true"
>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<string name="rejected">Rejected</string> <string name="rejected">Rejected</string>
<string name="user_error">Please Enter UserName</string> <string name="user_error">Please enter username</string>
<string name="pasw_error">Please Enter Password</string> <string name="pasw_error">Please enter password</string>
<string name="date_string">%1$s %2$s, %3$s</string> <string name="date_string">%1$s %2$s, %3$s</string>
<string name="date_and_time_string"> %1$s:%2$s</string> <string name="date_and_time_string"> %1$s:%2$s</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment