ギャラリーで選択した画像をどのように拡大縮小できますか?これを試しましたが、うまく機能しません。 `ギャラリーで選択した画像の拡大/縮小
public void onItemSelected (AdapterView<?> parent, View v, int position, long id)
{
Animation grow = AnimationUtils.loadAnimation(DetailTvShow.this, R.anim.grow);
Button btn = (Button)findViewById(R.id.button1);
btn.setText("saison "+(position+1));
View sideView = v.findViewById(position + 1);
View sideView1 = v.findViewById(position - 1);
if ((sideView != null)||(sideView1 != null)){
((ImageView)sideView).setLayoutParams(new Gallery.LayoutParams(80, 115));
((ImageView)sideView1).setLayoutParams(new `enter code here`Gallery.LayoutParams(80, 115));
}
/* sideView = parent.findViewById(position + 1);
if (sideView != null)
((ImageView)sideView).setLayoutParams(new Gallery.LayoutParams(80, 115)); */
v.startAnimation(grow);
v.setLayoutParams(new Gallery.LayoutParams(105, 140));
}`
およびres/anim/grow.xmlの場合 – Vervatovskis
try setScaleType(ScaleType.FITXY); – Houcine