Esempio n. 1
0
 /** Show the vertical title for this module (only vertical orientation) */
 public void showVerticalTitle() {
   if (idVerticalTitle == 0) {
     return;
   }
   View activeAssessmentsLabel = dashboardActivity.findViewById(idVerticalTitle);
   activeAssessmentsLabel.setVisibility(View.VISIBLE);
 }
Esempio n. 2
0
 /**
  * Checks if the given container contains a fragment of the given class
  *
  * @param fragmentClass
  * @return
  */
 protected boolean isFragmentActive(Class fragmentClass) {
   Fragment currentFragment = dashboardActivity.getFragmentManager().findFragmentById(getLayout());
   if (fragmentClass.isInstance(currentFragment)) {
     return true;
   }
   return false;
 }
Esempio n. 3
0
 public FragmentTransaction getFragmentTransaction() {
   FragmentTransaction ft = dashboardActivity.getFragmentManager().beginTransaction();
   if (dashboardController.isNavigatingBackwards()) {
     ft.setCustomAnimations(R.animator.anim_slide_in_right, R.animator.anim_slide_out_right);
   } else {
     ft.setCustomAnimations(R.animator.anim_slide_in_left, R.animator.anim_slide_out_left);
   }
   ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
   return ft;
 }
Esempio n. 4
0
  public void replaceFragment(int layout, Fragment fragment) {
    if (fragment instanceof ListFragment) {
      try {
        // fix some visual problems
        View vg = dashboardActivity.findViewById(layout);
        vg.invalidate();
      } catch (Exception e) {
      }
    }

    FragmentTransaction ft = getFragmentTransaction();
    ft.replace(layout, fragment);
    ft.commit();
  }
Esempio n. 5
0
 public int getBackgroundColor() {
   return dashboardActivity.getResources().getColor(moduleSettings.getResBackgroundColor());
 }
Esempio n. 6
0
 public Drawable getIcon() {
   return dashboardActivity.getResources().getDrawable(moduleSettings.getResIcon());
 }
Esempio n. 7
0
 public String getTitle() {
   return dashboardActivity.getResources().getString(moduleSettings.getResTitle());
 }
Esempio n. 8
0
 public String getAppName() {
   return dashboardActivity.getResources().getString(R.string.app_name);
 }
Esempio n. 9
0
 public String getAppNameColorString() {
   int appNameColor = dashboardActivity.getResources().getColor(R.color.appNameColor);
   return String.format("%X", appNameColor).substring(2);
 }