- Forum posts: 1
Jan 7, 2015, 4:37:11 AM via Website
Jan 7, 2015 4:37:11 AM via Website
Hi,
I am trying to show google calendar widget in my home screen . The widget is not getting displayed properly in the homescreen(only plain blue bar i am able to see). Can any one please help. please find the below code.i am not sure what i am missing,
if(info.provider.getPackageName().equals("com.google.android.calendar")){
if(info.label.equals("Calendar")){
if(IsCalendarVisible == false) {
int appWidgetId = mAppWidgetHost.allocateAppWidgetId();
LinearLayout calendarlayout = (LinearLayout) findViewById(R.id.layoutClockWeather);
AppWidgetHostView AppHostView = mAppWidgetHost.createView(this, appWidgetId, info);
AppHostView.setAppWidget(appWidgetId, info);
calendarlayout.addView(AppHostView);
IsCalendarVisible = true;
mAppWidgetHost.startListening();
}
}
}
thanks!
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.