Академический Документы
Профессиональный Документы
Культура Документы
1.
RemoteViews remoteView = new RemoteViews(context.getPackageName(), R.layou
t.widget);
2.
remoteView.setViewVisibility(R.id.startbutton, View.GONE);
3.
remoteView.setViewVisibility(R.id.startbutton_disabled, View.VISIBLE);
4.
remoteView.setViewVisibility(R.id.stopbutton, View.VISIBLE);
5.
remoteView.setViewVisibility(R.id.stopbutton_disabled, View.GONE);
6.
AppWidgetManager.getInstance(context).updateAppWidget(appWidgetId, remoteV
iew);
#
RemoteViews remoteView = new RemoteViews(context.getPackageName(), R.layout.widg
et);
#
remoteView.setViewVisibility(R.id.startbutton, View.VISIBLE);
#
remoteView.setViewVisibility(R.id.startbutton_disabled, View.GONE);
#
remoteView.setViewVisibility(R.id.stopbutton, View.GONE);
#
remoteView.setViewVisibility(R.id.stopbutton_disabled, View.VISIBLE);
#
AppWidgetManager.getInstance(context).updateAppWidget(appWidgetId, remoteView)
73/B Kanshari Para Road Opposite NetajiBhawan metro Station Towards harish Mukhe
rjee Road
* android:visibility
Parameters
visibility One of VISIBLE, INVISIBLE, or GONE.
Jed said..
This was very helpful and here how I used it..
I like to show and hide button onTouch
1. First when my application loads the button will be hidden..
2. I touch screen, button is displayed
nextPage.setVisibility(0);
3. Touch it again, goes away
nextPage.setVisibility(4);
return true;
}
if(event.getAction() == MotionEvent.ACTION_DOWN){
nextPage.setVisibility(4);
return true;
}
return true;
}
})
http://mobiforge.com/designing/story/understanding-user-interface-android-part-2
-views
<ImageButton
android:id="@+id/sound_button"
android:layout_x="430px"
android:layout_y="219px"
android:layout_width="48px"
android:layout_height="48px"
android:scaleType="center"
android:src="@android:drawable/volumeicon"
android:background="@drawable/clearbuttonup"
/>
http://www.stealthcopter.com/blog/2010/04/android-grouping-onclicklisteners-toge
ther-by-implementation-in-an-activity/
1. <supports-screens
2. android:largeScreens="true"
3. android:normalScreens="true"
4. android:smallScreens="true"
5. android:anyDensity="false" />