0
我有線性layout.after內我的XML 2個imageview的,我有viewfilpper.in的TouchEvent的MotionEvent.ACTION_UP我改變的imageview的 的高度爲何不應用ImageView高度?
((ImageView)findViewById(R.id.imgview1)).getLayoutParams().height=23;
((ImageView)findViewById(R.id.imgview1)).getLayoutParams().width=23;
((ImageView)findViewById(R.id.imgview2)).getLayoutParams().height=LayoutParams.WRAP_CONTENT;
((ImageView)findViewById(R.id.imgview2)).getLayoutParams().width=LayoutParams.WRAP_CONTENT;
但鑑於當我觸碰任何EDITTEXT然後字段更改申請
((ImageView)findViewById(R.id.imgview2)).invalidate();
((ImageView)findViewById(R.id.imgview2)).refreshDrawableState();
,這是不通過上述工作太
((ImageView)findViewById(R.id.imgview1)).setLayoutParams(new LayoutParams(23,23));
((ImageView)findViewById(R.id.imgview2)).setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
聲明我的問題沒有解決
我已經改變了我的代碼((ImageView)findViewById(R.id.imgview1))。setLayoutParams(new LayoutParams(23,23)); ((ImageView)findViewById(R.id.imgview2))。setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));但現在我的應用程序崩潰 –
後LogCat輸出,請。 –