@Override
 public void addContentView(View view, LayoutParams params) {
   if (mFrom == DLConstants.FROM_INTERNAL) {
     super.addContentView(view, params);
   } else {
     mProxyActivity.addContentView(view, params);
   }
 }
Пример #2
0
 private void addContentView() {
   ((Activity) context)
       .addContentView(
           getBaseView(),
           new LinearLayout.LayoutParams(
               LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.FILL_PARENT));
 }
Пример #3
0
 public static void setActivity(Activity activity) {
   sActivity = activity;
   sAdCLayout = new FrameLayout(activity);
   activity.addContentView(
       sAdCLayout,
       new FrameLayout.LayoutParams(
           FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT));
   // Log.d("appC", "call setActivity");
 }
  public static LinearLayout setProgressBarLayout(Activity activity) {

    LinearLayout progressBarLayout = new LinearLayout(activity);
    progressBarLayout.setGravity(Gravity.CENTER);
    ProgressBar spinner = new ProgressBar(activity);
    progressBarLayout.addView(spinner);
    activity.addContentView(
        progressBarLayout, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));

    return progressBarLayout;
  }