是否有任何工具可以为Android应用程序生成xml格式的渐变?我很难在不立即显示结果的情况下创建好的渐变(比如布局xmls的"图形布局").
我正在尝试使用ListPicker控制器ListPickerMode="Full",以获得全屏选择窗口.但是,当我尝试时它只会产生错误
"System.Windows.dll中出现'System.Windows.Markup.XamlParseException'类型的第一次机会异常
附加信息:Set property Microsoft.Phone.Controls.ListPicker.ListPickerMode引发了异常.[线:49位置:57]"
这是我的代码:
<toolkit:ListPicker x:Name="OutputSelector" ListPickerMode="Full"
Margin="0,542,6,0" Header="Output Type" Width="450" VerticalAlignment="Top" />
Run Code Online (Sandbox Code Playgroud)
我在C#中填充ListPicker,使用列表设置为ItemSource,如果有任何帮助的话.另一件事是,当我尝试在xml中编写"ListPickerMode"时,它会将它作为选项提供,但是当我写完整个内容时它会建议"完全""扩展"和"正常".
如果我向ListPicker添加5个项目,它会自动使用FullMode,我尝试更改ItemCountThreshold ="0",但这只会产生更多错误.
我正在使用Windowns Phone 7.1 OS 2011年8月发布.
可能只是我这是愚蠢的,第一天使用Windows Phone编程:)
UPDATE!
好吧看起来像ItemCountThreshold和ListPickerMode被删除了7.1或者什么,至少在XAML部分,而不是C#部分,它们是只读的.
解决我的问题!
<toolkit:ListPicker x:Name="OutputSelector" ExpansionMode="FullScreenOnly"
Margin="0,542,6,0" Header="Output Type" Width="450" VerticalAlignment="Top" />
Run Code Online (Sandbox Code Playgroud)
ExpansionMode将使Listpicker以全屏显示或展开.
在我的应用程序中,我使用Rotate3dAnimation 来显示Google地图.代码工作正常,但动画不流畅,旋转视图时也可以看到一些线条.请看一下我的代码并建议我如何让这个动画更顺畅?我们高度赞赏以任何其他有效方式实现此类动画的建议.
public class EventsActivity extends MapActivity implements DialogInterface.OnDismissListener {
private EventsItemModel eventsItemModel;
private Integer eventItemId;
private Integer eventCategoryId;
private static MapOverlay mapOverlay;
Drawable marker;
Context context;
private static String MY_LOCATION = "My Location";
private ViewGroup mContainer;
private ImageView mImageView;
private MapView mMapView;
private static boolean isFlipped = false;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.event_item_detail);
mContainer = (ViewGroup) findViewById(R.id.event_container);
// Since we are caching large views, we want to keep their cache
// between each animation
mContainer.setPersistentDrawingCache(ViewGroup.PERSISTENT_ANIMATION_CACHE); …Run Code Online (Sandbox Code Playgroud) 我有一个困惑ImageButton.我可以ImageView点击并使用按钮,那么为什么我们明确需要ImageButton?在设计Android应用程序时,我发现ImageView它比使用起来更有用ImageButton,也许我错过了一些功能ImageButton.所以我想知道使用有什么好处ImageButton?谢谢.