public GSYVideoHelper(Context context, StandardGSYVideoPlayer player) { mGsyVideoPlayer = player; this.mContext = context; this.mWindowViewContainer = (ViewGroup) (CommonUtil.scanForActivity(context)).findViewById(Window.ID_ANDROID_CONTENT); }
public SmallVideoHelper(Context context, StandardGSYVideoPlayer player) { gsyVideoPlayer = player; this.context = context; this.windowViewContainer = (ViewGroup) (CommonUtil.scanForActivity(context)).findViewById(Window.ID_ANDROID_CONTENT); }
@Implementation protected TabWidget getTabWidget() { Context context = realView.getContext(); if (context instanceof Activity) { return (TabWidget) ((Activity)context).findViewById(R.id.tabs); } else { return null; } }
/** * Construct a Drawer by passing the activity to use for the generation * * @param activity current activity which will contain the drawer */ public DrawerBuilder(@NonNull Activity activity) { this.mRootView = (ViewGroup) activity.findViewById(android.R.id.content); this.mActivity = activity; this.mLayoutManager = new LinearLayoutManager(mActivity); getAdapter(); }
/** * Sets the rootView which will host the DrawerLayout * The content of this view will be extracted and added as the new content inside the drawerLayout * * @param rootViewRes the id of a view which will get switched out by the DrawerLayout and added as its child */ public DrawerBuilder withRootView(@IdRes int rootViewRes) { if (mActivity == null) { throw new RuntimeException("please pass an activity first to use this call"); } return withRootView((ViewGroup) mActivity.findViewById(rootViewRes)); }
@Override public void run() { scrollable = (ObservableScrollView) activity.findViewById(R.id.scrollable); scrollable.setScrollViewCallbacks(null); } });
@Override public void run() { scrollable = (ObservableWebView) activity.findViewById(R.id.scrollable); scrollable.setScrollViewCallbacks(null); } });
@Override public void run() { scrollable = (ObservableListView) activity.findViewById(R.id.scrollable); scrollable.setScrollViewCallbacks(null); } });
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_scrollview_noheader, container, false); final ObservableScrollView scrollView = (ObservableScrollView) view.findViewById(R.id.scroll); Activity parentActivity = getActivity(); scrollView.setTouchInterceptionViewGroup((ViewGroup) parentActivity.findViewById(R.id.container)); if (parentActivity instanceof ObservableScrollViewCallbacks) { scrollView.setScrollViewCallbacks((ObservableScrollViewCallbacks) parentActivity); } return view; } }
@Override protected void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(true); activity = getActivity(); scrollable = (ObservableListView) activity.findViewById(R.id.scrollable); callbackCounter = new int[2]; }
@Override protected void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(true); activity = getActivity(); scrollable = (ObservableRecyclerView) activity.findViewById(R.id.scrollable); }
@Override protected void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(true); activity = getActivity(); scrollable = (ObservableWebView) activity.findViewById(R.id.scrollable); callbackCounter = new int[2]; }
@Override protected void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(true); activity = getActivity(); scrollable = (ObservableScrollView) activity.findViewById(R.id.scrollable); callbackCounter = new int[2]; }
@Override protected void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(true); activity = getActivity(); scrollable = (ObservableGridView) activity.findViewById(R.id.scrollable); }
@Override protected void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(true); activity = getActivity(); scrollable = (ObservableListView) activity.findViewById(R.id.scrollable); }
@Override protected void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(true); activity = getActivity(); scrollable = (ObservableScrollView) activity.findViewById(R.id.scrollable); }
@Override protected void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(true); activity = getActivity(); scrollable = (ObservableWebView) activity.findViewById(R.id.scrollable); }
@Test public void setContentView_shouldReplaceOldContentView() throws Exception { View view1 = new View(application); view1.setId(R.id.burritos); View view2 = new View(application); view2.setId(R.id.button); Activity activity = buildActivity(Activity.class).create().get(); activity.setContentView(view1); assertSame(view1, activity.findViewById(R.id.burritos)); activity.setContentView(view2); assertNull(activity.findViewById(R.id.burritos)); assertSame(view2, activity.findViewById(R.id.button)); }
@Override protected void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(true); activity = getActivity(); scrollable = (ObservableGridView) activity.findViewById(R.id.scrollable); callbackCounter = new int[2]; }
@Override protected void setUp() throws Exception { super.setUp(); setActivityInitialTouchMode(true); activity = getActivity(); scrollable = (ObservableRecyclerView) activity.findViewById(R.id.scrollable); callbackCounter = new int[2]; getInstrumentation().waitForIdleSync(); }