I want use book animation for my application but PageTurnLayout not working.
layout = new PageTurnLayout ( this.getBaseContext() );
PageTurnLayout.LayoutParams layoutparams = new PageTurnLayout . LayoutParams ( ViewGroup . LayoutParams.MATCH_PARENT , ViewGroup . LayoutParams.MATCH_PARENT);
layout . setLayoutParams ( layoutparams );
layout.setBackgroundColor(getResources().getColor(R.color.fond));
menus = Restaurants.menus;
for (int i = 0; i < menus.size(); i++) {
LinearLayout menu = new LinearLayout(layout.getContext());
LinearLayout.LayoutParams params = new LinearLayout . LayoutParams ( ViewGroup . LayoutParams . MATCH_PARENT , ViewGroup . LayoutParams . MATCH_PARENT , Gravity . CENTER_HORIZONTAL | Gravity . CENTER_VERTICAL );
menu.setLayoutParams(params);
menu.setBackgroundColor(getResources().getColor(R.color.fond));
menu.setOrientation ( LinearLayout . VERTICAL );
TextView nom = new TextView(menu.getContext());
nom. setLayoutParams ( new LinearLayout . LayoutParams ( ViewGroup . LayoutParams . MATCH_PARENT , ViewGroup . LayoutParams . MATCH_PARENT, 1f ));
nom.setGravity(Gravity . CENTER_HORIZONTAL | Gravity . CENTER_VERTICAL);
nom.setTypeface(TBLActivity.CLB);
nom.setTextColor(getResources().getColor(R.color.text));
nom.setTextSize(12);
nom.setText(menus.get(i).nom);
TextView descriptif = new TextView(menu.getContext());
descriptif. setLayoutParams ( new LinearLayout . LayoutParams ( ViewGroup . LayoutParams . MATCH_PARENT , ViewGroup . LayoutParams . MATCH_PARENT, 0.4f ));
descriptif.setGravity(Gravity . CENTER_HORIZONTAL | Gravity . CENTER_VERTICAL);
descriptif.setTypeface(TBLActivity.CLB);
descriptif.setTextColor(getResources().getColor(R.color.text));
descriptif.setTextSize(6);
descriptif.setText(menus.get(i).descriptif);
TextView prix = new TextView(menu.getContext());
prix. setLayoutParams ( new LinearLayout . LayoutParams ( ViewGroup . LayoutParams . MATCH_PARENT , ViewGroup . LayoutParams . MATCH_PARENT, 1f ));
prix.setGravity(Gravity . CENTER_HORIZONTAL | Gravity . CENTER_VERTICAL);
prix.setTypeface(TBLActivity.CLB);
prix.setTextColor(getResources().getColor(R.color.text));
prix.setTextSize(5);
prix.setText(menus.get(i).prix);
menu.addView(nom);
menu.addView(descriptif);
menu.addView(prix);
layout.addView(menu);
}
setContentView(layout);
}