Skip to content

Commit

Permalink
Change prefix of resources
Browse files Browse the repository at this point in the history
  • Loading branch information
hzalaz committed Sep 15, 2016
1 parent 59afb6c commit f239d83
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ public void onRequestPermissionsResult(@NonNull Activity activity, int requestCo
requestAuth(activity, authenticationRequestCode);
} else if (callback != null) {
Log.e(TAG, "Permission Request failed. Some permissions were not granted!");
String message = String.format(activity.getString(R.string.com_auth0_lock_permission_missing_description), declinedPermissions);
String message = String.format(activity.getString(R.string.com_auth0_webauth_permission_missing_description), declinedPermissions);
Dialog permissionDialog = new AlertDialog.Builder(activity)
.setTitle(R.string.com_auth0_lock_permission_missing_title)
.setTitle(R.string.com_auth0_webauth_permission_missing_title)
.setMessage(message)
.setPositiveButton(android.R.string.ok, null)
.create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import android.webkit.WebChromeClient;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
Expand Down Expand Up @@ -71,7 +72,7 @@ protected void onCreate(Bundle savedInstanceState) {
setFullscreenMode();
}

setContentView(R.layout.com_auth0_lock_activity_web_auth);
setContentView(R.layout.com_auth0_activity_web_auth);
final ActionBar bar = getSupportActionBar();
if (bar != null) {
String serviceName = getIntent().getStringExtra(CONNECTION_NAME_EXTRA);
Expand Down Expand Up @@ -113,7 +114,7 @@ public void onWindowFocusChanged(boolean hasFocus) {

private void startUrlLoading() {
if (!isNetworkAvailable()) {
renderLoadError(getString(R.string.com_auth0_lock_network_error));
renderLoadError(getString(R.string.com_auth0_webauth_network_error));
return;
}

Expand Down Expand Up @@ -178,9 +179,10 @@ public void onReceivedError(WebView view, WebResourceRequest request, WebResourc
}

});
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setSupportZoom(true);
webView.getSettings().setBuiltInZoomControls(true);
final WebSettings settings = webView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setSupportZoom(true);
settings.setBuiltInZoomControls(true);
webView.loadUrl(uri.toString());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
~ com_auth0_lock_activity_web_auth.xml
~ com_auth0_activity_web_auth.xml
~
~ Copyright (c) 2016 Auth0 (http://auth0.com)
~
Expand Down Expand Up @@ -64,7 +64,7 @@
android:layout_below="@id/com_auth0_lock_text"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:text="@string/com_auth0_lock_webview_loading_retry" />
android:text="@string/com_auth0_webauth_webview_loading_retry" />

</RelativeLayout>

Expand Down
8 changes: 4 additions & 4 deletions auth0/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
-->

<resources>
<string name="com_auth0_lock_permission_missing_title">Missing permissions</string>
<string name="com_auth0_lock_permission_missing_description">Some permissions required by this provider were not granted. You can try to authenticate again or go to the application\'s permission screen in the phone settings and grant them. The missing permissions are:\n%s</string>
<string name="com_auth0_webauth_permission_missing_title">Missing permissions</string>
<string name="com_auth0_webauth_permission_missing_description">Some permissions required by this provider were not granted. You can try to authenticate again or go to the application\'s permission screen in the phone settings and grant them. The missing permissions are:\n%s</string>

<string name="com_auth0_lock_network_error">Network error</string>
<string name="com_auth0_lock_webview_loading_retry">Retry</string>
<string name="com_auth0_webauth_network_error">Network error</string>
<string name="com_auth0_webauth_webview_loading_retry">Retry</string>
</resources>

0 comments on commit f239d83

Please sign in to comment.