Tabnine Logo
Activity.findViewById
Code IndexAdd Tabnine to your IDE (free)

How to use
findViewById
method
in
android.app.Activity

Best Java code snippets using android.app.Activity.findViewById (Showing top 20 results out of 3,744)

origin: CarGuo/GSYVideoPlayer

public GSYVideoHelper(Context context, StandardGSYVideoPlayer player) {
  mGsyVideoPlayer = player;
  this.mContext = context;
  this.mWindowViewContainer = (ViewGroup) (CommonUtil.scanForActivity(context)).findViewById(Window.ID_ANDROID_CONTENT);
}
origin: CarGuo/GSYVideoPlayer

public SmallVideoHelper(Context context, StandardGSYVideoPlayer player) {
  gsyVideoPlayer = player;
  this.context = context;
  this.windowViewContainer = (ViewGroup) (CommonUtil.scanForActivity(context)).findViewById(Window.ID_ANDROID_CONTENT);
}
origin: robolectric/robolectric

@Implementation
protected TabWidget getTabWidget() {
 Context context = realView.getContext();
 if (context instanceof Activity) {
  return (TabWidget) ((Activity)context).findViewById(R.id.tabs);
 } else {
  return null;
 }
}
origin: mikepenz/MaterialDrawer

/**
 * 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();
}
origin: mikepenz/MaterialDrawer

/**
 * 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));
}
origin: ksoichiro/Android-ObservableScrollView

  @Override
  public void run() {
    scrollable = (ObservableScrollView) activity.findViewById(R.id.scrollable);
    scrollable.setScrollViewCallbacks(null);
  }
});
origin: ksoichiro/Android-ObservableScrollView

  @Override
  public void run() {
    scrollable = (ObservableWebView) activity.findViewById(R.id.scrollable);
    scrollable.setScrollViewCallbacks(null);
  }
});
origin: ksoichiro/Android-ObservableScrollView

  @Override
  public void run() {
    scrollable = (ObservableListView) activity.findViewById(R.id.scrollable);
    scrollable.setScrollViewCallbacks(null);
  }
});
origin: ksoichiro/Android-ObservableScrollView

  @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;
  }
}
origin: ksoichiro/Android-ObservableScrollView

@Override
protected void setUp() throws Exception {
  super.setUp();
  setActivityInitialTouchMode(true);
  activity = getActivity();
  scrollable = (ObservableListView) activity.findViewById(R.id.scrollable);
  callbackCounter = new int[2];
}
origin: ksoichiro/Android-ObservableScrollView

@Override
protected void setUp() throws Exception {
  super.setUp();
  setActivityInitialTouchMode(true);
  activity = getActivity();
  scrollable = (ObservableRecyclerView) activity.findViewById(R.id.scrollable);
}
origin: ksoichiro/Android-ObservableScrollView

@Override
protected void setUp() throws Exception {
  super.setUp();
  setActivityInitialTouchMode(true);
  activity = getActivity();
  scrollable = (ObservableWebView) activity.findViewById(R.id.scrollable);
  callbackCounter = new int[2];
}
origin: ksoichiro/Android-ObservableScrollView

@Override
protected void setUp() throws Exception {
  super.setUp();
  setActivityInitialTouchMode(true);
  activity = getActivity();
  scrollable = (ObservableScrollView) activity.findViewById(R.id.scrollable);
  callbackCounter = new int[2];
}
origin: ksoichiro/Android-ObservableScrollView

@Override
protected void setUp() throws Exception {
  super.setUp();
  setActivityInitialTouchMode(true);
  activity = getActivity();
  scrollable = (ObservableGridView) activity.findViewById(R.id.scrollable);
}
origin: ksoichiro/Android-ObservableScrollView

@Override
protected void setUp() throws Exception {
  super.setUp();
  setActivityInitialTouchMode(true);
  activity = getActivity();
  scrollable = (ObservableListView) activity.findViewById(R.id.scrollable);
}
origin: ksoichiro/Android-ObservableScrollView

@Override
protected void setUp() throws Exception {
  super.setUp();
  setActivityInitialTouchMode(true);
  activity = getActivity();
  scrollable = (ObservableScrollView) activity.findViewById(R.id.scrollable);
}
origin: ksoichiro/Android-ObservableScrollView

@Override
protected void setUp() throws Exception {
  super.setUp();
  setActivityInitialTouchMode(true);
  activity = getActivity();
  scrollable = (ObservableWebView) activity.findViewById(R.id.scrollable);
}
origin: robolectric/robolectric

@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));
}
origin: ksoichiro/Android-ObservableScrollView

@Override
protected void setUp() throws Exception {
  super.setUp();
  setActivityInitialTouchMode(true);
  activity = getActivity();
  scrollable = (ObservableGridView) activity.findViewById(R.id.scrollable);
  callbackCounter = new int[2];
}
origin: ksoichiro/Android-ObservableScrollView

@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();
}
android.appActivityfindViewById

Popular methods of Activity

  • onCreate
  • getWindow
  • finish
  • onDestroy
  • onResume
  • startActivity
  • getResources
  • startActivityForResult
  • onPause
  • getSystemService
  • getWindowManager
  • runOnUiThread
  • getWindowManager,
  • runOnUiThread,
  • isFinishing,
  • getString,
  • onStop,
  • getApplicationContext,
  • onStart,
  • onOptionsItemSelected,
  • getPackageName

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • setRequestProperty (URLConnection)
  • compareTo (BigDecimal)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JComboBox (javax.swing)
  • JPanel (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now