use of androidx.annotation.CallSuper in project BottomNavigation by Ashok-Varma.
the class BottomNavigationTab method initialise.
@CallSuper
public void initialise(boolean setActiveColor) {
iconView.setSelected(false);
if (isInActiveIconSet) {
StateListDrawable states = new StateListDrawable();
states.addState(new int[] { android.R.attr.state_selected }, mCompactIcon);
states.addState(new int[] { -android.R.attr.state_selected }, mCompactInActiveIcon);
states.addState(new int[] {}, mCompactInActiveIcon);
iconView.setImageDrawable(states);
} else {
if (setActiveColor) {
DrawableCompat.setTintList(mCompactIcon, new ColorStateList(new int[][] { // 1
new int[] { android.R.attr.state_selected }, // 2
new int[] { -android.R.attr.state_selected }, new int[] {} }, new int[] { // 1
mActiveColor, // 2
mInActiveColor, // 3
mInActiveColor }));
} else {
DrawableCompat.setTintList(mCompactIcon, new ColorStateList(new int[][] { // 1
new int[] { android.R.attr.state_selected }, // 2
new int[] { -android.R.attr.state_selected }, new int[] {} }, new int[] { // 1
mBackgroundColor, // 2
mInActiveColor, // 3
mInActiveColor }));
}
iconView.setImageDrawable(mCompactIcon);
}
if (isNoTitleMode) {
labelView.setVisibility(GONE);
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) iconContainerView.getLayoutParams();
layoutParams.gravity = Gravity.CENTER;
setNoTitleIconContainerParams(layoutParams);
iconContainerView.setLayoutParams(layoutParams);
FrameLayout.LayoutParams iconLayoutParams = (FrameLayout.LayoutParams) iconView.getLayoutParams();
setNoTitleIconParams(iconLayoutParams);
iconView.setLayoutParams(iconLayoutParams);
}
}
use of androidx.annotation.CallSuper in project android-oss by kickstarter.
the class BaseBottomSheetDialogFragment method onCreateView.
/**
* Called when a fragment instantiates its user interface view, between `onCreate` and `onActivityCreated`.
* Can return null for non-graphical fragments.
*/
@CallSuper
@Override
@Nullable
public View onCreateView(@NonNull final LayoutInflater inflater, @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState) {
final View view = super.onCreateView(inflater, container, savedInstanceState);
Timber.d("onCreateView %s", this.toString());
this.lifecycle.onNext(FragmentEvent.CREATE_VIEW);
return view;
}
use of androidx.annotation.CallSuper in project android-oss by kickstarter.
the class BaseBottomSheetDialogFragment method onResume.
@CallSuper
@Override
public void onResume() {
super.onResume();
Timber.d("onResume %s", this.toString());
this.lifecycle.onNext(FragmentEvent.RESUME);
assignViewModel(null);
if (this.viewModel != null) {
this.viewModel.onResume(this);
final FragmentActivity activity = getActivity();
if (activity != null) {
activity.registerReceiver(this.optimizelyReadyReceiver, new IntentFilter(ExperimentsClientTypeKt.EXPERIMENTS_CLIENT_READY));
}
}
}
use of androidx.annotation.CallSuper in project android-oss by kickstarter.
the class BaseBottomSheetDialogFragment method onPause.
@CallSuper
@Override
public void onPause() {
this.lifecycle.onNext(FragmentEvent.PAUSE);
super.onPause();
Timber.d("onPause %s", this.toString());
if (this.viewModel != null) {
this.viewModel.onPause();
final FragmentActivity activity = getActivity();
if (activity != null) {
activity.unregisterReceiver(this.optimizelyReadyReceiver);
}
}
}
use of androidx.annotation.CallSuper in project android-oss by kickstarter.
the class BaseFragment method onCreateView.
/**
* Called when a fragment instantiates its user interface view, between `onCreate` and `onActivityCreated`.
* Can return null for non-graphical fragments.
*/
@CallSuper
@Override
@Nullable
public View onCreateView(@NonNull final LayoutInflater inflater, @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState) {
final View view = super.onCreateView(inflater, container, savedInstanceState);
Timber.d("onCreateView %s", this.toString());
this.lifecycle.onNext(FragmentEvent.CREATE_VIEW);
return view;
}
Aggregations