the blue bar with an arrow from the left has no functionality. it should hide the grid

This commit is contained in:
CiufudeanDani 2022-04-08 20:23:36 +03:00
parent f4db909dcb
commit b6fc8851a7

View File

@ -11,9 +11,11 @@ import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
@ -52,6 +54,7 @@ public class HistoryActivity extends AppCompatActivity implements OnMapReadyCall
private final ArrayList<Vehicle> allVehicle = new ArrayList<>();
private final ArrayList<String> allVehicleNames = new ArrayList<>();
private final SimpleDateFormat sdf = new SimpleDateFormat("MMMM dd yyyy");
private boolean showVehicles = true;
@Override
@ -111,6 +114,21 @@ public class HistoryActivity extends AppCompatActivity implements OnMapReadyCall
}
});
LinearLayout slideLayout = findViewById(R.id.slidelayout);
LinearLayout linearLayoutVehicles = findViewById(R.id.layoutBig);
ImageView slideLayoutImageView = findViewById(R.id.slideLayoutImage);
slideLayout.setOnClickListener(v -> {
if (showVehicles) {
linearLayoutVehicles.setVisibility(View.GONE);
slideLayoutImageView.setImageResource(R.drawable.arrow_right);
showVehicles = false;
} else {
linearLayoutVehicles.setVisibility(View.VISIBLE);
slideLayoutImageView.setImageResource(R.drawable.arrow_left);
showVehicles = true;
}
});
setDate();
}