Skip to content

Commit

Permalink
Merge pull request #38 from charithag/master-uiux-improvements
Browse files Browse the repository at this point in the history
Master uiux improvements
  • Loading branch information
chaturadilan authored May 4, 2017
2 parents c994bc9 + 151544a commit 638f879
Show file tree
Hide file tree
Showing 70 changed files with 9 additions and 733 deletions.
2 changes: 1 addition & 1 deletion client/client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ android {
targetSdkVersion 25
multiDexEnabled true

versionCode 331
versionCode 332
versionName "3.1.17"
}
buildTypes {
Expand Down
4 changes: 0 additions & 4 deletions client/client/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,6 @@
<activity
android:name=".AuthenticationErrorActivity"
android:screenOrientation="portrait" />
<activity
android:name=".NotifyActivity"
android:label="@string/title_activity_notify"
android:screenOrientation="portrait" />
<activity
android:name=".activities.ServerConfigsActivity"
android:windowSoftInputMode="stateVisible|adjustResize" />
Expand Down
68 changes: 0 additions & 68 deletions client/client/src/main/java/org/wso2/iot/agent/NotifyActivity.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public void onClick(View v) {
110);
}
}
if (Build.VERSION.SDK_INT >= 19) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
try {
int locationSetting = Settings.Secure.getInt(context.getContentResolver(), Settings.Secure.LOCATION_MODE);
if (locationSetting == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1021,9 +1021,7 @@ private void cancelEntry() {
Preference.putBoolean(context, Constants.PreferenceFlag.REGISTERED, false);
Preference.putString(context, Constants.PreferenceFlag.IP, null);

Intent intentIP = new Intent(AuthenticationActivity.this, ServerConfigsActivity.class);
intentIP.putExtra(getResources().getString(R.string.intent_extra_from_activity),
AuthenticationActivity.class.getSimpleName());
Intent intentIP = new Intent(AuthenticationActivity.this, SplashActivity.class);
intentIP.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intentIP);
finish();
Expand Down Expand Up @@ -1067,9 +1065,6 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {
@Override
public void onClick(DialogInterface dialog,
int which) {
// etUsername.setText(Constants.EMPTY_STRING);
// etPassword.setText(Constants.EMPTY_STRING);
// etDomain.setText(Constants.EMPTY_STRING);
btnSignIn.setBackgroundResource(R.drawable.btn_orange);
btnSignIn.setTextColor(ContextCompat.getColor(AuthenticationActivity.this, R.color.white));
btnSignIn.setEnabled(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public void onReceiveAPIResult(Map<String, String> result, int requestCode) {
LocalNotification.stopPolling(context);
Preference.putBoolean(context, Constants.TOKEN_EXPIRED, true);
CommonUtils.displayNotification(context,
R.drawable.notification,
R.drawable.ic_error_outline_white_24dp,
context.getResources().getString(R.string.title_need_to_sign_in),
context.getResources().getString(R.string.msg_need_to_sign_in),
AuthenticationActivity.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void showNotification(int operationId, String messageTitle, String messag
PendingIntent dismiss = PendingIntent.getBroadcast(context, operationId, notification, PendingIntent.FLAG_ONE_SHOT);
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(context)
.setSmallIcon(R.drawable.notification)
.setSmallIcon(R.drawable.ic_notifications_white_24dp)
.setContentTitle(messageTitle)
.setContentText(messageText)
.setPriority(android.app.Notification.PRIORITY_MAX)
Expand All @@ -141,7 +141,7 @@ public void showNotification(int operationId, String messageTitle, String messag
.setOngoing(true)
.setOnlyAlertOnce(true)
.setTicker(context.getResources().getString(R.string.txt_notification))
.addAction(R.drawable.notification, "Dismiss", dismiss);
.addAction(R.drawable.dismiss, "Dismiss", dismiss);

notifyManager.notify(operationId, mBuilder.build());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@
import android.provider.Settings;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.widget.Toast;

import org.wso2.iot.agent.activities.WorkProfileSelectionActivity;
import org.wso2.iot.agent.R;
import org.wso2.iot.agent.activities.WorkProfileSelectionActivity;
import org.wso2.iot.agent.utils.CommonUtils;
import org.wso2.iot.agent.utils.Constants;

Expand Down Expand Up @@ -75,7 +74,7 @@ public int onStartCommand(Intent intent, int flags, int startId) {
Settings.Secure.LOCATION_MODE);
if (locationSetting == 0) {
CommonUtils.displayNotification(context,
R.drawable.notification,
R.drawable.ic_warning_white_24dp,
context.getResources().getString(R.string.title_need_location),
context.getResources().getString(R.string.msg_need_location),
WorkProfileSelectionActivity.class,
Expand All @@ -86,7 +85,6 @@ public int onStartCommand(Intent intent, int flags, int startId) {
Log.w(TAG, "Location setting is not available on this device");
}
} else {
Toast.makeText(context, R.string.msg_need_location, Toast.LENGTH_LONG).show();
Log.w(TAG, "Location setting retrieval is not supported by API level "
+ android.os.Build.VERSION.SDK_INT);
}
Expand Down Expand Up @@ -236,7 +234,7 @@ public void onProviderDisabled(String provider) {

private void displayPermissionMissingNotification() {
CommonUtils.displayNotification(context,
R.drawable.notification,
R.drawable.ic_warning_white_24dp,
context.getResources().getString(R.string.title_need_permissions),
context.getResources().getString(R.string.msg_need_permissions),
WorkProfileSelectionActivity.class,
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed client/client/src/main/res/drawable-hdpi/top_bar.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed client/client/src/main/res/drawable-mdpi/top_bar.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed client/client/src/main/res/drawable-xhdpi/camera.png
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed client/client/src/main/res/drawable-xhdpi/info.png
Diff not rendered.
Diff not rendered.
Binary file removed client/client/src/main/res/drawable-xhdpi/lock.png
Diff not rendered.
Binary file removed client/client/src/main/res/drawable-xhdpi/mute.png
Diff not rendered.
Diff not rendered.
Binary file removed client/client/src/main/res/drawable-xhdpi/wifi.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
24 changes: 0 additions & 24 deletions client/client/src/main/res/drawable/custom_checkbox.xml

This file was deleted.

Binary file removed client/client/src/main/res/drawable/dot.png
Diff not rendered.
38 changes: 0 additions & 38 deletions client/client/src/main/res/layout/list_row.xml

This file was deleted.

87 changes: 0 additions & 87 deletions client/client/src/main/res/layout/notify.xml

This file was deleted.

26 changes: 0 additions & 26 deletions client/client/src/main/res/menu/agent_settings.xml

This file was deleted.

26 changes: 0 additions & 26 deletions client/client/src/main/res/menu/alert.xml

This file was deleted.

Loading

0 comments on commit 638f879

Please sign in to comment.