private class HelloWebViewClient extends WebViewClient
{
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
return true;
}
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
}
}
и измените программно высоту WebView на WRAP_CONTENT по этому примеру ТЫЦwebView.setWebViewClient(new HelloWebViewClient()); //в onCreate();
mProgressBar.setIndeterminateDrawable(new SmoothProgressDrawable.Builder(context)
[...]
.progressiveStopSpeed(3.4)
.progressiveStart(false)
[...]
.build());
/*В onCreate*/
listView.setOnItemClickListener(new DrawerItemClickListener());
/*После onCreate*/
private class DrawerItemClickListener implements ListView.OnItemClickListener {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
selectItem(position);
}
}
private void selectItem(int position) {
switch (position) {
case 0:
break;
case 1:
break;
default:
;
}
TextWatcher watcher1 = new TextWatcher() {
@SuppressWarnings("static-access")
public void afterTextChanged(Editable s) {
if(text1.length()==0)
{
return;
}
if (text1.hasFocus() == true && !text1.getText().equals("-")) {
try{
double inputValue = Float.parseFloat(text1.getText().toString());
DecimalFormat df = new DecimalFormat("###,###,###,###.####################");
BigDecimal a = new BigDecimal(Value1(inputValue));
BigDecimal b = new BigDecimal(Value2(inputValue));
text2.setText(df.format(a));
text3.setText(df.format(b));
}
catch (NumberFormatException e){
return;
}
}
}
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
}
public void onTextChanged(CharSequence s, int start, int before,
int count) {
}
};
...
protected void onOpenDialog(int id) {
switch (id) {
case R.id.ххх:
final Dialog dialog = new Dialog(MainActivity.this);
dialog.setTitle("Title");
dialog.setContentView(R.layout.activity_[xxx);
dialog.getWindow().getAttributes().windowAnimations = R.style.CustomDialogAnim;
dialog.show();
}
}
public class CustomAlertDialog extends AlertDialog {
public CustomAlertDialog(Context context) {
super(context, R.style.CustomDialogAnimationTheme);
}}
...