use of org.holoeverywhere.app.Activity in project mobile-android by photo.
the class GoogleLoginFragment method processLoginCredentials.
@Override
public void processLoginCredentials(com.trovebox.android.common.model.Credentials credentials) {
Activity activity = getSupportActivity();
CredentialsUtils.saveCredentials(activity, credentials);
LoginUtils.onLoggedIn(activity, true);
}
use of org.holoeverywhere.app.Activity in project mobile-android by photo.
the class PhotoDetailsFragment method adjustDetailsVisibility.
void adjustDetailsVisibility(final boolean visible) {
detailsVisible = visible;
if (getActivity() == null) {
return;
}
Animation animation = AnimationUtils.loadAnimation(getActivity(), visible ? android.R.anim.fade_in : android.R.anim.fade_out);
long animationDuration = 500;
animation.setDuration(animationDuration);
thumbnailsList.startAnimation(animation);
detailsView.startAnimation(animation);
thumbnailsList.postDelayed(new Runnable() {
@Override
public void run() {
detailsVisible = visible;
thumbnailsList.setVisibility(detailsVisible ? View.VISIBLE : View.GONE);
detailsView.setVisibility(detailsVisible ? View.VISIBLE : View.GONE);
if (detailsVisible && nextPageLoaded.getAndSet(false)) {
ensureThumbVisible(getActivePhoto());
}
}
}, animationDuration);
ActionBar actionBar = ((Activity) getSupportActivity()).getSupportActionBar();
if (visible) {
actionBar.show();
} else {
actionBar.hide();
}
}
use of org.holoeverywhere.app.Activity in project little-bear-dictionary by daimajia.
the class PreferenceScreen method getThemeResId.
protected int getThemeResId(Context context) {
try {
if (context instanceof Activity) {
int t = ((Activity) context).getLastThemeResourceId();
if (t > 0) {
return t;
}
}
Class<?> clazz = context.getClass();
while (clazz != Context.class) {
clazz = clazz.getSuperclass();
}
Method method = clazz.getDeclaredMethod("getThemeResId");
method.setAccessible(true);
return (Integer) method.invoke(context);
} catch (Exception e) {
Log.e(TAG, "Failed getting context theme", e);
return R.style.Holo_Theme_NoActionBar;
}
}
Aggregations