Dynamic BoxAuthentication lauout
Opened this issue · 0 comments
andy61i commented
Please remove resources used in BoxAuthentication. This will allow using this library in other apps as a compiled .jar file, not as source-based library.
This can be done easily:
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mApiKey = getIntent().getStringExtra("API_KEY").trim();
if (mApiKey == null || mApiKey.length() == 0) {
setResult(AUTH_RESULT_FAIL);
finish();
return;
}
// setContentView(R.layout.box_authentication);
FrameLayout layout = new FrameLayout(this);
layout.setLayoutParams(new ViewGroup.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
mLoginWebView = new WebView(this);
mLoginWebView.setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
layout.addView(mLoginWebView);
setContentView(layout);
...
}