Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- checkBox_kahesh_Beton.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton compoundButton, boolean bol) {
- z_1 = layout_1_text.getText().toString();
- z_2 = layout_1_text.getText().toString();
- if (bol) {
- index = 1;
- TranslateAnimation animate = new TranslateAnimation(0, v.getWidth(), 0, 0);
- animate.setDuration(500);
- animate.setFillAfter(true);
- animate.setFillBefore(false);
- layout_1.startAnimation(animate);
- layout_1.setVisibility(View.INVISIBLE);
- layout_2.startAnimation(animate);
- layout_2.setVisibility(View.INVISIBLE);
- dalBetoni_layout.postDelayed(new Runnable() {
- public void run() {
- layout_1.setVisibility(View.GONE);
- }
- }, 600);
- layout_2.postDelayed(new Runnable() {
- public void run() {
- layout_2.setVisibility(View.GONE);
- }
- }, 500);
- if (initialValue != 0) {
- conclusion.setText(decimal.format(initialValue - (Double.parseDouble(z_1) / 100 * ro_1 + Double.parseDouble(z_2) * 0.1 / 100 * 2500 * nof * 2)));
- }
- } else {
- index = 0;
- TranslateAnimation animate = new TranslateAnimation(v.getWidth(), 0, 0, 0);
- animate.setDuration(500);
- animate.setFillAfter(true);
- animate.setFillBefore(true);
- layout_1.startAnimation(animate);
- layout_1.setVisibility(View.VISIBLE);
- layout_2.startAnimation(animate);
- layout_2.setVisibility(View.VISIBLE);
- conclusion.setText(decimal.format(initialValue));
- }
- }
- });
Add Comment
Please, Sign In to add comment