BaseDialogActivity.java revision 7e3fa36d69ffee874dd364b8e3d9aa3cab9a273b
/*
* FreeOTP
*
* Authors: Nathaniel McCallum <npmccallum@redhat.com>
*
* Copyright (C) 2014 Nathaniel McCallum, Red Hat
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
public abstract class BaseDialogActivity extends Activity {
public static final int BUTTON_NEGATIVE = 0;
public static final int BUTTON_NEUTRAL = 1;
public static final int BUTTON_POSITIVE = 2;
private final int mLayout;
private final int mNegative;
private final int mNeutral;
private final int mPositive;
super();
}
if (text == 0) {
return;
}
b.setOnClickListener(new OnClickListener() {
finish();
}
});
}
super.onCreate(savedInstanceState);
// Inflate the provided content layout.
// Add it to the content area.
if (mNegative == 0)
if (mNeutral == 0)
}
switch (which) {
case BUTTON_NEGATIVE:
case BUTTON_NEUTRAL:
case BUTTON_POSITIVE:
}
return null;
}
}