1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
   | animSub.setAnimationListener(new AnimationListener() {
 
			@Override
			public void onAnimationStart(Animation animation) {}
 
			@Override
			public void onAnimationRepeat(Animation animation) {}
 
			@Override
			public void onAnimationEnd(Animation animation) {
 
				map_critere_sub.clearAnimation();		
				map_critere_sub.layout(animParamsSub.left - map_parent_width , animParamsSub.top, animParamsSub.right - map_parent_width, animParamsSub.bottom);
 
				ViewGroup critere_sub			= (ViewGroup) parent.findViewById(R.id.critere_sub);
				critere_sub.removeAllViews();
			    RelativeLayout RL 					= new RelativeLayout(parent);
				 RL.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, 80));
 
				 // TextView
				 TextView TV 							= new TextView(parent);    
				 RelativeLayout.LayoutParams TV_params	= new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
 
				 TV_params.leftMargin			= 20;
				 TV_params.topMargin			= 22;
				 TV.setText("HOLA");
 
				 TV.setTextColor(new ColorStateList(
						 new int[][]{
								 new int [] {android.R.attr.state_pressed},
							      new int [] {android.R.attr.state_focused},
							      new int [] {}
						 },
						 new int[]{
								 Color.parseColor(Criteria.getcolorSection()),
								 Color.parseColor(Criteria.getcolorSection()),
								 Color.WHITE
						 }
				));
 
				 TV.setTypeface(null, Typeface.BOLD);
				 RL.addView(TV, TV_params);		
 
				 map_critere_sub.addView(RL);	// SI JE COMMENTE CETTE LIGNE MA VUE NE DISPARAIS PAS
 
			}
		}); | 
Partager