コード例 #1
0
  @Override
  public void preInit(Bundle savedInstanceState) {
    super.preInit(savedInstanceState);
    parentFragment = this;

    String description;
    if (kernelContent != null && (description = kernelContent.getShortDescription()) != null)
      descriptionText.setText(Html.fromHtml(description));
    logoContainer = ((KernelActivity) getActivity()).getLogoContainer();
    toolbar = ((KernelActivity) getActivity()).getToolbar();
    animation = AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_out);
    animation.setAnimationListener(
        new Animation.AnimationListener() {
          @Override
          public void onAnimationStart(Animation animation) {
            descriptionText.setVisibility(View.GONE);
          }

          @Override
          public void onAnimationEnd(Animation animation) {
            viewContainerBackground.setBackgroundColor(Color.TRANSPARENT);
          }

          @Override
          public void onAnimationRepeat(Animation animation) {}
        });
  }
コード例 #2
0
      @Override
      public void init(Bundle savedInstanceState) {
        super.init(savedInstanceState);

        if (kernelContent != null
            && kernelContent.getShortDescription() != null
            && kernelContent.getLongDescription() != null)
          addView(new DownloadInfoCardView.DDDownloadInfoCard(kernelContent));
      }