title: Make the selected item bigger gridview android
body: <p>I make a TV application demo.I want to make the selected item bigger.
  my data from <code>movies.xml</code>
  my code.</p>
  
  <pre><code>public class MainActivity extends Activity {
      private XmlPullParser xpp;
      private InputStream input;
      private List&lt;Movie&gt; movieList = new ArrayList&lt;Movie&gt;();
  
      private MyAdapter adapter;
      private GridView gridview;
  
      private static final String MOVIE = "movie";
      private static final String ID = "id";
      private static final String TITLE = "title";
      private static final String BACKGROUND = "background";
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          gridview = (GridView) findViewById(R.id.gridview);
          movieList = createMovies();
          adapter = new MyAdapter(this, movieList);
          gridview.setAdapter(adapter);
          gridview.setOnItemSelectedListener(new OnItemSelectedListener() {
  
              @Override
              public void onItemSelected(AdapterView&lt;?&gt; parent, View view,
                      int position, long id) {
              }
  
              @Override
              public void onNothingSelected(AdapterView&lt;?&gt; parent) {
              }
          });
          String str = "123456";
      }
  
      /*
       * 从xml中获取movies的信息
       * */
      public List&lt;Movie&gt; createMovies() {
          List&lt;Movie&gt; resultList = new ArrayList&lt;Movie&gt;();
          xpp = Xml.newPullParser();
          Movie item = null;
          try {
              input = getResources().getAssets().open("movies.xml");
              xpp.setInput(input,"utf-8");
              int type = xpp.getEventType();
              while(type!=XmlPullParser.END_DOCUMENT){
                  switch(type){
                  case XmlPullParser.START_TAG:
                      String name = xpp.getName();
                      if(name.equalsIgnoreCase(MOVIE)){
                          item = new Movie();
                      }else if(item!=null){
                          if(name.equalsIgnoreCase(ID)){
                              item.setId(Integer.parseInt(xpp.nextText()));
                          }else if(name.equalsIgnoreCase(TITLE)){
                              item.setTitle(xpp.nextText());
                          }
                          else if(name.equalsIgnoreCase(BACKGROUND)){
                              item.setBackground(xpp.nextText());
                          }
                      }
                      break;
                  case XmlPullParser.END_TAG:
                      if(xpp.getName().equalsIgnoreCase(MOVIE) &amp;&amp; item!=null){
                          resultList.add(item);
                          item = null;
                      }
                  default:
                      break;
                  }
                  type = xpp.next();
              }
          } catch (Exception e) {
              e.printStackTrace();
          }
          return resultList;
      }
  
  }
  </code></pre>
  
  <p>my custom adapter. I make a test to make the second item bigger by <code>ObjectAnimator</code>. but it can't work.</p>
  
  <pre><code>public class MyAdapter extends BaseAdapter {
      private Context mContext;
      private LayoutInflater mInflater;
      private List&lt;Movie&gt; movieList;
  
      private ObjectAnimator mZoomInAnimation;
      private ObjectAnimator mZoomOutAnimation;
  
      public MyAdapter(Context context,List&lt;Movie&gt; list){
          mContext = context;
          mInflater = LayoutInflater.from(mContext);
          movieList = list;
          initAnimation();
      }
  
      @Override
      public int getCount() {
          return movieList.size();
      }
  
      @Override
      public Object getItem(int position) {
          return movieList.get(position);
      }
  
      @Override
      public long getItemId(int position) {
          return position;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          ViewHolder holder = null;
          if(null == convertView){
              convertView = mInflater.inflate(R.layout.item_grid_view, null);
              holder = new ViewHolder();
  
              holder.view = convertView.findViewById(R.id.border);
              LayoutParams params = (LayoutParams) holder.view.getLayoutParams();
              params.height = 300 + 15;
              params.width = 250 + 15;
  
              holder.background = (ImageView) convertView.findViewById(R.id.background);
              LayoutParams backLayoutParams = (LayoutParams) holder.background.getLayoutParams();
              backLayoutParams.height = 300;
              backLayoutParams.width = 250;
  
              holder.title = (TextView) convertView.findViewById(R.id.title);
              convertView.setTag(holder);
          }else{
              holder = (ViewHolder) convertView.getTag();
          }
          holder.title.setText(movieList.get(position).getTitle());
  
  //      int i = mContext.getResources().getIdentifier("drawable/photography1", null, mContext.getPackageName());
  //      holder.background.setImageResource(i);
  
          AssetManager assetManager = mContext.getAssets();
          InputStream istr;
          String url = movieList.get(position).getBackground();
          String str = url.substring(9);
          try { 
              istr = assetManager.open(str);
              Bitmap bitmap = BitmapFactory.decodeStream(istr);
              holder.background.setBackgroundDrawable(new BitmapDrawable(bitmap));
              istr.close();
          } catch (IOException e) {
              e.printStackTrace();
          } 
          //mContext.getResources().getDrawable(R.drawable.list_detail_item_border).getConstantState()
  //        Boolean is = holder.background.getDrawable().getCurrent().getConstantState().equals(null)?true:false;
          if(position == 1){   //如果view的图片是list_detail_item_border则一个动画
              if(mZoomInAnimation!=null){
                  mZoomOutAnimation.cancel();
                  mZoomInAnimation.start();
              }
          }
          else{ // 如果不是则另外一个动画
              if(mZoomOutAnimation!=null){
                  mZoomInAnimation.cancel();
                  mZoomOutAnimation.start();
              }
          }
          return convertView;
      }
  
      public class ViewHolder{
          public View view;
          public ImageView background;
          public TextView title;
      }
  
  
      public void initAnimation() {
  
          float endVal = 2.2f;
          PropertyValuesHolder inScaleX = PropertyValuesHolder.ofFloat("scaleX", 1.0f, endVal);
          PropertyValuesHolder inScaleY = PropertyValuesHolder.ofFloat("scaleY", 1.0f, endVal);
  
          mZoomInAnimation = new ObjectAnimator();
          mZoomInAnimation.setTarget(this);
          mZoomInAnimation.setValues(inScaleX, inScaleY);
          mZoomInAnimation.setDuration(200);
  
          PropertyValuesHolder outScaleX = PropertyValuesHolder.ofFloat("scaleX", endVal, 1.0f);
          PropertyValuesHolder outScaleY = PropertyValuesHolder.ofFloat("scaleY", endVal, 1.0f);
  
          mZoomOutAnimation = new ObjectAnimator();
          mZoomOutAnimation.setTarget(this);
          mZoomOutAnimation.setValues(outScaleX, outScaleY);
          mZoomOutAnimation.setDuration(200);
      }
  </code></pre>