List of usage examples for android.view View isInEditMode
public boolean isInEditMode()
From source file:Main.java
/** * This method setting layer type to sowftware. * * @param view view which would be set./*from w w w . ja va 2 s .co m*/ */ public static void setLayerToSW(View view) { if (!view.isInEditMode() && Build.VERSION.SDK_INT >= 11) { view.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } }
From source file:jp.tkgktyk.xposed.forcetouchdetector.app.util.fab.FloatingActionButtonLollipop.java
FloatingActionButtonLollipop(View view, ShadowViewDelegate shadowViewDelegate) { super(view, shadowViewDelegate); if (!view.isInEditMode()) { mInterpolator = AnimationUtils.loadInterpolator(mView.getContext(), android.R.interpolator.fast_out_slow_in); }/* ww w. j a v a 2s .com*/ }
From source file:com.kk.binding.view.BindAdapterFrameLayout.java
private void init(AttributeSet attrs) { Context context = getContext(); if (attrs != null && context != null) { TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.BindAdapterFrameLayout); if (a != null) { childLayoutId = a.getResourceId(R.styleable.BindAdapterFrameLayout_childLayout, 0); }/*from w ww . j a v a2 s.com*/ } BindLog.d(TAG, "inflate BindAdapterFrameLayout"); if (childLayoutId > 0) { setOnHierarchyChangeListener(new OnHierarchyChangeListener() { @Override public void onChildViewAdded(View parent, View child) { BindLog.d(TAG, "BindAdapterFrameLayout onChildViewAdded: " + (parent.isInEditMode() ? child.getClass().getName() : child.toString())); if (child instanceof ViewPager) { pagerAdapter = new BindViewPagerAdapter<ViewPager>((ViewPager) child, childLayoutId); } else if (child instanceof ViewGroup) { adapter = new BindViewGroupAdapter<ViewGroup>((ViewGroup) child, childLayoutId); } } @Override public void onChildViewRemoved(View parent, View child) { } }); } }
From source file:pl.wasat.smarthma.ui.dialogs.FacebookDialogFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE); View rootView = inflater.inflate(R.layout.fragment_facebook_dialog, container, false); rootView.isInEditMode(); profilePictureView = (ProfilePictureView) rootView.findViewById(R.id.facebook_dialog_img_user_profile); profilePictureView.isInEditMode();// w w w. j a va 2 s . c o m userInfo = (TextView) rootView.findViewById(R.id.facebook_dialog_tv_user_info); LoginButton loginButton = (LoginButton) rootView.findViewById(R.id.facebook_dialog_btn_login); loginButton.setFragment(this); loginButton.isInEditMode(); loginButton.setUserInfoChangedCallback(new LoginButton.UserInfoChangedCallback() { @Override public void onUserInfoFetched(GraphUser user) { graphUser = user; updateUI(); // It's possible that we were waiting for this.user to // be populated in order to post a // status update. handlePendingAction(); } }); imgViewQLook = (ImageView) rootView.findViewById(R.id.facebook_dialog_img_share_qlook); postPhotoButton = (Button) rootView.findViewById(R.id.facebook_dialog_btn_share_qlook); postPhotoButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { onClickPostPhoto(); } }); // Can we present the share dialog for photos? canPresentShareDialogWithPhotos = FacebookDialog.canPresentShareDialog(getActivity(), FacebookDialog.ShareDialogFeature.PHOTOS); //Target quicklookTarget = this; //Picasso.with(getActivity()).load(paramQLookUrl).into(quicklookTarget); return rootView; }
From source file:com.frostwire.android.gui.views.AbstractListFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(resource, container, false); View progressContainer = v.findViewById(R.id.progressContainer); if (progressContainer != null) { progressContainer.setId(INTERNAL_PROGRESS_CONTAINER_ID); }//from w w w .j a va 2s.c om View listContainer = v.findViewById(R.id.listContainer); if (listContainer != null) { listContainer.setId(INTERNAL_LIST_CONTAINER_ID); } if (!v.isInEditMode()) { initComponents(v); } return v; }
From source file:com.owen.view.views.PieChart.java
private void setLayerToSW(View v) { if (!v.isInEditMode() && Build.VERSION.SDK_INT >= 11) { setLayerType(View.LAYER_TYPE_SOFTWARE, null); }//from ww w .j a va2 s . c o m }
From source file:com.owen.view.views.PieChart.java
private void setLayerToHW(View v) { if (!v.isInEditMode() && Build.VERSION.SDK_INT >= 11) { setLayerType(View.LAYER_TYPE_HARDWARE, null); }//from w w w .j a v a 2s .c om }
From source file:android.support.v7.app.WindowDecorActionBar.java
/** * Only for edit mode. * @hide */ public WindowDecorActionBar(View layout) { assert layout.isInEditMode(); init(layout); }