Skip to content

Commit

Permalink
solve bug 0000025
Browse files Browse the repository at this point in the history
  • Loading branch information
domjos1994 committed Aug 21, 2018
1 parent cf1c152 commit a9f3686
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import de.domjos.schooltools.R;
import de.domjos.schooltools.adapter.ColorAdapter;
Expand All @@ -51,7 +54,8 @@
public class TimeTableSubjectActivity extends AppCompatActivity {
private BottomNavigationView navigation;
private ListView lvSubjects;
private EditText txtSubjectTitle, txtSubjectAlias, txtSubjectHoursInWeek, txtSubjectDescription;
private EditText txtSubjectTitle, txtSubjectHoursInWeek, txtSubjectDescription;
private AutoCompleteTextView txtSubjectAlias;
private TextView lblSelectedColor;
private Spinner spSubjectTeachers;
private CheckBox chkSubjectMainSubject;
Expand Down Expand Up @@ -226,6 +230,11 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
this.lvSubjects = this.findViewById(R.id.lvSubjects);
this.txtSubjectTitle = this.findViewById(R.id.txtSubjectTitle);
this.txtSubjectAlias = this.findViewById(R.id.txtSubjectAlias);
List<String> aliases = Arrays.asList("M", "Mus", "D", "Eng", "NWA", "NWT", "Bio", "Ch", "Ph", "Geo", "Gk", "Rel", "Mus", "Edv", "Itg", "Inf", "Sp", "Spa", "lat");
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, aliases);
this.txtSubjectAlias.setAdapter(adapter);


this.txtSubjectDescription = this.findViewById(R.id.txtSubjectDescription);
this.txtSubjectHoursInWeek = this.findViewById(R.id.txtSubjectHoursInWeek);
this.spSubjectTeachers = this.findViewById(R.id.spSubjectTeachers);
Expand Down
2 changes: 1 addition & 1 deletion src/main/res/layout/timetable_subject_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="20">
<EditText
<AutoCompleteTextView
android:id="@+id/txtSubjectAlias"
android:hint="@string/timetable_subject_alias"
android:layout_weight="4"
Expand Down

0 comments on commit a9f3686

Please sign in to comment.