Code example for AppWidgetHost

Methods: createView

0
    	} 
    } 
     
    private void addAppWidget(int id, AppWidgetProviderInfo info){
    	 
		AppWidgetHostView hv = host.createView(this, id, info);
    	int page = mPager.getCurrentItem();
		Log.i("AppWidget",Integer.toString(page));
		((RelativeLayout)mPager.getChildAt(page)).addView(hv);
    } 
 
	 
    @Override 
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present. 
        getMenuInflater().inflate(R.menu.home_screen, menu);
        return true; 
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java