mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-15 01:57:22 +01:00
write the days at the top
This commit is contained in:
parent
fef766dd0b
commit
f86ac50bfa
@ -50,12 +50,18 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void createDays() {
|
private void createDays() {
|
||||||
|
final String[] days = {"M", "T", "W", "T", "F", "S", "S"};
|
||||||
final LayoutInflater inflater = getLayoutInflater();
|
final LayoutInflater inflater = getLayoutInflater();
|
||||||
for (int i = 0; i < 6; i++) {
|
for (int i = 0; i < 7; i++) {
|
||||||
final TableRow row = (TableRow) inflater.inflate(R.layout.table_row, tableHolder, false);
|
final TableRow row = (TableRow) inflater.inflate(R.layout.table_row, tableHolder, false);
|
||||||
tableHolder.addView(row);
|
tableHolder.addView(row);
|
||||||
for (int j = 0; j < 7; j++) {
|
for (int j = 0; j < 7; j++) {
|
||||||
inflater.inflate(R.layout.table_day, row);
|
final TextView day = (TextView) inflater.inflate(R.layout.table_day, row, false);
|
||||||
|
if (i == 0) {
|
||||||
|
day.setText(days[j]);
|
||||||
|
day.setTextSize(dayTextSize);
|
||||||
|
}
|
||||||
|
row.addView(day);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -71,7 +77,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
int thisMonthDays = 1;
|
int thisMonthDays = 1;
|
||||||
int nextMonthsDay = 1;
|
int nextMonthsDay = 1;
|
||||||
|
|
||||||
for (int i = 0; i < 6; i++) {
|
for (int i = 1; i < 7; i++) {
|
||||||
final TableRow row = (TableRow) tableHolder.getChildAt(i);
|
final TableRow row = (TableRow) tableHolder.getChildAt(i);
|
||||||
for (int j = 0; j < 7; j++) {
|
for (int j = 0; j < 7; j++) {
|
||||||
final TextView day = (TextView) row.getChildAt(j);
|
final TextView day = (TextView) row.getChildAt(j);
|
||||||
|
Loading…
Reference in New Issue
Block a user