コード例 #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);
 }
コード例 #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;
 }
コード例 #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;
 }
コード例 #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();
  }
コード例 #5
0
 public int getBackgroundColor() {
   return dashboardActivity.getResources().getColor(moduleSettings.getResBackgroundColor());
 }
コード例 #6
0
 public Drawable getIcon() {
   return dashboardActivity.getResources().getDrawable(moduleSettings.getResIcon());
 }
コード例 #7
0
 public String getTitle() {
   return dashboardActivity.getResources().getString(moduleSettings.getResTitle());
 }
コード例 #8
0
 public String getAppName() {
   return dashboardActivity.getResources().getString(R.string.app_name);
 }
コード例 #9
0
 public String getAppNameColorString() {
   int appNameColor = dashboardActivity.getResources().getColor(R.color.appNameColor);
   return String.format("%X", appNameColor).substring(2);
 }