Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge later #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,20 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
private void initialise() {
income = addTransactionView.findViewById(R.id.income_button);
expense = addTransactionView.findViewById(R.id.expense_button);

income.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
income.setBackgroundColor(Color.BLUE);
}
});
expense.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
income.setBackgroundColor(Color.BLUE);
}
});

incomeOrExpense = addTransactionView.findViewById(R.id.income_or_expense);
value = addTransactionView.findViewById(R.id.valueDisplay);
clear = addTransactionView.findViewById(R.id.clearButton);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ private void setCustomDatesBarChart() {

BarChartExpenseData barChartExpenseData = localDatabaseHelper.getCustomDateTransactionData(UserData.userID, fromDate, toDate);

float barWidth = 0.2f;
float barSpace = 0.1f;
float groupSpace = 0.4f;
float barWidth = 0.1f;
float barSpace = 0f;
float groupSpace = 0.1f;

customDatesBarChart.setData(barChartExpenseData.getBarData());
customDatesBarChart.getData().setHighlightEnabled(false);
Expand Down Expand Up @@ -118,10 +118,11 @@ private void setCustomDatesBarChart() {
xAxis.setGranularityEnabled(true);
xAxis.setCenterAxisLabels(true);
xAxis.setDrawGridLines(true);
xAxis.setAxisMinimum(0);
xAxis.setAxisMinimum(0.2f);
xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);
xAxis.setValueFormatter(new IndexAxisValueFormatter(barChartExpenseData.getCategories()));
xAxis.setLabelCount(barChartExpenseData.getBarData().getEntryCount());
xAxis.setLabelCount(barChartExpenseData.getBarData().getEntryCount()*2);


customDatesBarChart.getAxisRight().setEnabled(false);
YAxis yAxis = customDatesBarChart.getAxisLeft();
Expand Down