我被卡住了,我无法在任何地方找到解决方案.:(
我的ListView(GridView)的每个项目的布局中都有一个ImageView,由BaseAdapter提供.加载图像后,我使用加载的BitmapDrawable分配给ImageView
imageView.setImageDrawable( newImage );
Run Code Online (Sandbox Code Playgroud)
弹出的项目没有任何问题.
但是如果我通过使用TransitionDrawable OR指定一个简单的动画来分配新的BitmapDrawable:
//this is inoperative - animation will not start for currently displayed items! No solution found :(
Animation a = LibResource.getResourceAnimation( activity, R.anim.fade_in );
imageView.setImageDrawable( newImage );
imageView.startAnimation( a );
Run Code Online (Sandbox Code Playgroud)
动画不会启动我的GridView的当前显示的项目.如果我向下滚动GridView并将其滚动回所提到的项目,则会显示图像并执行动画!
我已经尝试过以下修复:
imageView.invalidateDrawable( newImage );
imageView.invalidate();
Run Code Online (Sandbox Code Playgroud)
在分配动画后我也尝试了以下语句 - 当然,我在UI-Thread上调用它们,在分配和启动UI-THREAD上的动画之后:
myGridView.invalidate();
myGridView.invalidateViews();
myGridView.getAdapter().notifyDataSetChanged();
Run Code Online (Sandbox Code Playgroud)
如上所述,此问题仅发生在ListView中的可见项目中.
为什么即使在所有涉及的视图上调用invalidate()等之后,Animation或TransitionDrawable也无法启动?
问题出现在我的XPeria-Arc-S(API级别10)和Android-Emulators API级别8,9,10中.这是Android系统中的错误吗?
任何帮助将不胜感激!
提前致谢
克里斯托弗
好的 - 谢谢你的快速回复.
我得到了问题,经过大量的时间重新组织我的代码结构才能工作,我发现这并没有解决我的问题:(.
除此之外,在创建视图时更改内容对我来说不适用或非常实用.也许您对此问题有任何其他解决方案?
诚挚
克里斯托弗
是否有可能以编程方式接收由a [int]保存的资源-id而不引用资源类R?
<declare-styleable name="com_facebook_login_view">
<attr name="confirm_logout" format="boolean"/>
<attr name="fetch_user_info" format="boolean"/>
<attr name="login_text" format="string"/>
<attr name="logout_text" format="string"/>
</declare-styleable>
Run Code Online (Sandbox Code Playgroud)
问题是我无法解析定义的'declare-styleable'属性的ID - 始终返回0x00:
int id = context.getResources().getIdentifier( "com_facebook_login_view", "declare-styleable", context.getPackageName() );
int[] resourceIDs = context.getResources().getIntArray( id );
Run Code Online (Sandbox Code Playgroud) 当前的Facebook API v3.0.2.b将返回一个保存响应的com.facebook.Response对象.你知道如何解析这个吗?以下代码将引发异常:(
//execute the request
Request request = new Request
(
session,
"/fql",
params,
HttpMethod.GET,
new Request.Callback()
{
@Override
public void onCompleted( Response response )
{
try
{
JSONArray json = new JSONArray( response.toString() );
}
catch ( Throwable t )
{
System.err.println( t );
}
}
}
);
Request.executeBatchAsync( request );
Run Code Online (Sandbox Code Playgroud)
错误消息说:
org.json.JSONException: Unterminated object at character 25 of {Response: responseCode: 200, graphObject: GraphObject{graphObjectClass=GraphObject, state={"data":[{"pic_square":.....
Run Code Online (Sandbox Code Playgroud)
有人知道什么是正确的解决方案吗?我要用
GraphObject go = response.getGraphObject();
Run Code Online (Sandbox Code Playgroud)
..我怎么能用这个获得GraphUser-Objects?
对不起,这似乎是一个微不足道的问题,但处理Response-object在facebook文档中记录很少,我无法在网上收到任何关于此的内容:(
非常感谢你提前!
问候克里斯托弗
我已经在Adobe Illustrator中迈出了第一步,而且我非常喜欢..我是Photoshop的专家,所以很多东西对我来说都很熟悉.有一件事,我无法在网上找到答案..
也许有人知道吗?
图层和子图层在图层窗口中显示为灰色背景.组在图层窗口中显示为白色背景. 但他们似乎都有相同的行为.
'layer/sublayer'和'group'之间有什么区别吗? 为什么Illustrator会区分它们?
我正在使用Illustrator CS2.
谢谢你的帮助!对此,我真的非常感激.
问候
克里斯托弗