@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); WebView wv=new WebView(getContext()); wv.loadUrl("https://commonsware.com"); setContentView(wv); } }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); WebView wv=new WebView(getContext()); wv.loadUrl("https://commonsware.com"); setContentView(wv); } }
@Override protected void onCreate(Bundle savedInstanceState) { // Be sure to call the super class. super.onCreate(savedInstanceState); // Inflate the layout. setContentView(R.layout.sample_media_router_presentation); // Set up the surface view. mPresentationSurfaceView = (SurfaceView)findViewById(R.id.surface_view); SurfaceHolder holder = mPresentationSurfaceView.getHolder(); holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); holder.addCallback(SurfaceViewPlayer.this); Log.i(TAG, "Presentation created"); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.presentation_main_layout); mPdfPresenRootView = (ViewGroup) findViewById(R.id.main_presentation_layout_root); }
@Override protected void onCreate(Bundle savedInstanceState) { // Be sure to call the super class. super.onCreate(savedInstanceState); // Get the resources for the context of the presentation. // Notice that we are getting the resources from the context of the presentation. Resources r = getContext().getResources(); // Inflate the layout. setContentView(R.layout.presentation_with_media_router_content); // Set up the surface view for visual interest. mSurfaceView = (GLSurfaceView)findViewById(R.id.surface_view); mSurfaceView.setRenderer(new CubeRenderer(false)); }
@Override protected void onCreate(Bundle savedInstanceState) { // Be sure to call the super class. super.onCreate(savedInstanceState); // Get the resources for the context of the presentation. // Notice that we are getting the resources from the context of the presentation. Resources r = getContext().getResources(); // Inflate the layout. setContentView(R.layout.presentation_with_media_router_content); // Set up the surface view for visual interest. mSurfaceView = (GLSurfaceView)findViewById(R.id.surface_view); mSurfaceView.setRenderer(new CubeRenderer(false)); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle(TAG); w = getWindow(); startRefreshTask(); w.setType(WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Set the content view to the custom layout setContentView(R.layout.display); // Get the Views mLayout = (LinearLayout) findViewById(R.id.display_layout); mText = (TextView) findViewById(R.id.display_text); /* * Show the name of the display this presentation was embedded in. */ TextView smallText = (TextView) findViewById(R.id.display_smalltext); final String name = getDisplay().getName(); smallText.setText(getResources().getString(R.string.display_name, name)); }
@Override protected void onCreate(Bundle savedInstanceState) { // Be sure to call the super class. super.onCreate(savedInstanceState); // Get the resources for the context of the presentation. // Notice that we are getting the resources from the context of the presentation. Resources r = getContext().getResources(); // Inflate the layout. setContentView(R.layout.presentation_content); final Display display = getDisplay(); final int displayId = display.getDisplayId(); final int photo = mContents.photo; // Show a caption to describe what's going on. TextView text = (TextView)findViewById(R.id.text); text.setText(r.getString(R.string.presentation_photo_text, photo, displayId, display.getName())); // Show a n image for visual interest. ImageView image = (ImageView)findViewById(R.id.image); image.setImageDrawable(r.getDrawable(PHOTOS[photo])); GradientDrawable drawable = new GradientDrawable(); drawable.setShape(GradientDrawable.RECTANGLE); drawable.setGradientType(GradientDrawable.RADIAL_GRADIENT); // Set the background to a random gradient. Point p = new Point(); getDisplay().getSize(p); drawable.setGradientRadius(Math.max(p.x, p.y) / 2); drawable.setColors(mContents.colors); findViewById(android.R.id.content).setBackground(drawable); } }
@Override protected void onCreate(Bundle savedInstanceState) { // Be sure to call the super class. super.onCreate(savedInstanceState); // Get the resources for the context of the presentation. // Notice that we are getting the resources from the context of the presentation. Resources r = getContext().getResources(); // Inflate the layout. setContentView(R.layout.presentation_content); final Display display = getDisplay(); final int displayId = display.getDisplayId(); final int photo = mContents.photo; // Show a caption to describe what's going on. TextView text = (TextView)findViewById(R.id.text); text.setText(r.getString(R.string.presentation_photo_text, photo, displayId, display.getName())); // Show a n image for visual interest. ImageView image = (ImageView)findViewById(R.id.image); image.setImageDrawable(r.getDrawable(PHOTOS[photo])); GradientDrawable drawable = new GradientDrawable(); drawable.setShape(GradientDrawable.RECTANGLE); drawable.setGradientType(GradientDrawable.RADIAL_GRADIENT); // Set the background to a random gradient. Point p = new Point(); getDisplay().getSize(p); drawable.setGradientRadius(Math.max(p.x, p.y) / 2); drawable.setColors(mContents.colors); findViewById(android.R.id.content).setBackground(drawable); } }