当前位置: 首页>>代码示例>>Java>>正文


Java View.isInEditMode方法代码示例

本文整理汇总了Java中android.view.View.isInEditMode方法的典型用法代码示例。如果您正苦于以下问题:Java View.isInEditMode方法的具体用法?Java View.isInEditMode怎么用?Java View.isInEditMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.view.View的用法示例。


在下文中一共展示了View.isInEditMode方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ViewGroupMvpViewStateDelegateImpl

import android.view.View; //导入方法依赖的package包/类
/**
 * Creates a new instance
 *
 * @param delegateCallback the callback
 * @param keepPresenter true, if you want to keep the presenter and view state during screen
 * orientation changes etc.
 */
public ViewGroupMvpViewStateDelegateImpl(@NonNull View view,
    @NonNull ViewGroupMvpViewStateDelegateCallback<V, P, VS> delegateCallback,
    boolean keepPresenter) {
  if (view == null) {
    throw new NullPointerException("View is null!");
  }
  if (delegateCallback == null) {
    throw new NullPointerException("MvpDelegateCallback is null!");
  }
  this.delegateCallback = delegateCallback;
  this.keepPresenter = keepPresenter;
  this.isInEditMode = view.isInEditMode();
  if (!isInEditMode) {
    this.activity = PresenterManager.getActivity(delegateCallback.getContext());
  } else {
    this.activity = null;
  }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:26,代码来源:ViewGroupMvpViewStateDelegateImpl.java

示例2: ViewGroupMvpDelegateImpl

import android.view.View; //导入方法依赖的package包/类
public ViewGroupMvpDelegateImpl(@NonNull View view,
    @NonNull ViewGroupDelegateCallback<V, P> delegateCallback,
    boolean keepPresenterDuringScreenOrientationChange) {
  if (view == null) {
    throw new NullPointerException("View is null!");
  }

  if (delegateCallback == null) {
    throw new NullPointerException("MvpDelegateCallback is null!");
  }

  this.delegateCallback = delegateCallback;
  this.keepPresenterDuringScreenOrientationChange = keepPresenterDuringScreenOrientationChange;

  isInEditMode = view.isInEditMode();

  if (!isInEditMode) {
    this.activity = PresenterManager.getActivity(delegateCallback.getContext());
  } else {
    this.activity = null;
  }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:23,代码来源:ViewGroupMvpDelegateImpl.java

示例3: ViewGroupMviDelegateImpl

import android.view.View; //导入方法依赖的package包/类
public ViewGroupMviDelegateImpl(@NonNull View view,
    @NonNull ViewGroupMviDelegateCallback<V, P> delegateCallback,
    boolean keepPresenterDuringScreenOrientationChange) {
  if (view == null) {
    throw new NullPointerException("View is null!");
  }
  if (delegateCallback == null) {
    throw new NullPointerException("MvpDelegateCallback is null!");
  }
  this.delegateCallback = delegateCallback;
  this.keepPresenterDuringScreenOrientationChange = keepPresenterDuringScreenOrientationChange;
  this.isInEditMode = view.isInEditMode();
  if (!isInEditMode) {
    this.activity = PresenterManager.getActivity(delegateCallback.getContext());
  } else {
    this.activity = null;
  }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:19,代码来源:ViewGroupMviDelegateImpl.java

示例4: Resources

import android.view.View; //导入方法依赖的package包/类
public Resources(Context context, View v) {
    final android.content.res.Resources r = context.getResources();
    Theme t = null;
    if(!v.isInEditMode()) {
        t = Theme.getCurrentTheme(context);
    }
    if(t != null) {
        incoming = t.getDrawableResource("ic_call_incoming");
        outgoing = t.getDrawableResource("ic_call_outgoing");
        missed = t.getDrawableResource("ic_call_missed");
        iconMargin = t.getDimension("call_log_icon_margin");
    }
    if(incoming == null) {
        incoming = r.getDrawable(R.drawable.ic_call_incoming_holo_dark);
    }
    if(outgoing == null) {
        outgoing = r.getDrawable(R.drawable.ic_call_outgoing_holo_dark);
    }
    if(missed == null) {
        missed = r.getDrawable(R.drawable.ic_call_missed_holo_dark);
    }
    if(iconMargin == null) {
        iconMargin = r.getDimensionPixelSize(R.dimen.call_log_icon_margin);
    }
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:26,代码来源:CallTypeIconsView.java

示例5: refreshHeight

import android.view.View; //导入方法依赖的package包/类
public static boolean refreshHeight(View view, int aimHeight) {
    if (view.isInEditMode()) {
        return false;
    }
    Log.d(TAG, String.format("refresh Height %d %d", new Object[]{Integer.valueOf(view.getHeight()), Integer.valueOf(aimHeight)}));
    if (view.getHeight() == aimHeight || Math.abs(view.getHeight() - aimHeight) == StatusBarHeightUtil.getStatusBarHeight(view.getContext())) {
        return false;
    }
    int validPanelHeight = KeyboardUtil.getValidPanelHeight(view.getContext());
    LayoutParams layoutParams = view.getLayoutParams();
    if (layoutParams == null) {
        view.setLayoutParams(new LayoutParams(-1, validPanelHeight));
    } else {
        layoutParams.height = validPanelHeight;
        view.requestLayout();
    }
    return true;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:19,代码来源:ViewUtil.java

示例6: changeViewHeight

import android.view.View; //导入方法依赖的package包/类
public static boolean changeViewHeight(final View view, final int aimHeight) {
    if (view.isInEditMode()) {
        return false;
    }

    if (view.getHeight() == aimHeight) {
        return false;
    }

    ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
    if (layoutParams == null) {
        layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                aimHeight);
        view.setLayoutParams(layoutParams);
    } else {
        layoutParams.height = aimHeight;
        view.requestLayout();
    }

    return true;
}
 
开发者ID:hsj-xiaokang,项目名称:OSchina_resources_android,代码行数:22,代码来源:UiUtil.java

示例7: refreshHeight

import android.view.View; //导入方法依赖的package包/类
public static boolean refreshHeight(final View view, final int aimHeight) {
    if (view.isInEditMode()) {
        return false;
    }

    if (view.getHeight() == aimHeight) {
        return false;
    }

    if (Math.abs(view.getHeight() - aimHeight) ==
            StatusBarHeightUtil.getStatusBarHeight(view.getContext())) {
        return false;
    }

    final int validPanelHeight = KeyboardManagerImpl.getValidPanelHeight(view.getContext());
    ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
    if (layoutParams == null) {
        layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                validPanelHeight);
        view.setLayoutParams(layoutParams);
    } else {
        layoutParams.height = validPanelHeight;
        view.requestLayout();
    }

    return true;
}
 
开发者ID:nickyangjun,项目名称:EasyEmoji,代码行数:28,代码来源:ViewUtil.java

示例8: getResourceEntryName

import android.view.View; //导入方法依赖的package包/类
/**
 * getResourceEntryName
 * @param view
 * @param id
 * @return
 */
private static String getResourceEntryName(View view, @IdRes int id) {
    if (view.isInEditMode()) {
        return "<unavailable while editing>";
    }
    return view.getContext().getResources().getResourceEntryName(id);
}
 
开发者ID:wangzailfm,项目名称:ImitateButterKnife,代码行数:13,代码来源:Utils.java

示例9: refreshHeight

import android.view.View; //导入方法依赖的package包/类
public static boolean refreshHeight(final View view, final int aimHeight) {
    if (view.isInEditMode()) {
        return false;
    }
    Log.d(TAG, String.format("refresh Height %d %d", view.getHeight(), aimHeight));

    if (view.getHeight() == aimHeight) {
        return false;
    }

    if (Math.abs(view.getHeight() - aimHeight) ==
            StatusBarHeightUtil.getStatusBarHeight(view.getContext())) {
        return false;
    }

    final int validPanelHeight = KeyboardUtil.getValidPanelHeight(view.getContext());
    ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
    if (layoutParams == null) {
        layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                validPanelHeight);
        view.setLayoutParams(layoutParams);
    } else {
        layoutParams.height = validPanelHeight;
        view.requestLayout();
    }

    return true;
}
 
开发者ID:fengdongfei,项目名称:CXJPadProject,代码行数:29,代码来源:ViewUtil.java

示例10: WindowDecorActionBar

import android.view.View; //导入方法依赖的package包/类
public WindowDecorActionBar(View layout) {
    if ($assertionsDisabled || layout.isInEditMode()) {
        init(layout);
        return;
    }
    throw new AssertionError();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:8,代码来源:WindowDecorActionBar.java

示例11: getResourceEntryName

import android.view.View; //导入方法依赖的package包/类
private static String getResourceEntryName(View view, @IdRes int id) {
  if (view.isInEditMode()) {
    return "<unavailable while editing>";
  }
  return view.getContext().getResources().getResourceEntryName(id);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:Utils.java

示例12: calledFromTools

import android.view.View; //导入方法依赖的package包/类
public static void calledFromTools(View view) {
    if (!view.isInEditMode()) {
        throw new IllegalArgumentException("should be called only from AndroidStudioTools");
    }
}
 
开发者ID:roshakorost,项目名称:Phial,代码行数:6,代码来源:Precondition.java


注:本文中的android.view.View.isInEditMode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。