| | |
| | | import androidx.lifecycle.ViewModelProviders; |
| | | |
| | | import me.yokeyword.fragmentation.SupportActivity; |
| | | import safeluck.drive.evaluation.DB.Student; |
| | | import safeluck.drive.evaluation.DB.WokViewModel; |
| | | import safeluck.drive.evaluation.fragment.HomeFragment; |
| | | import com.anyun.exam.lib.MyLog; |
| | | |
| | | import java.util.List; |
| | | |
| | | import safeluck.drive.evaluation.util.PermissionManager; |
| | | import safeluck.drive.evaluation.viewmodels.MainViewModel; |
| | | |
| | |
| | | |
| | | setContentView(R.layout.activity_main); |
| | | |
| | | WokViewModel wokViewModel = ViewModelProviders.of(this).get(WokViewModel.class); |
| | | wokViewModel.getStudents().observe(this, new Observer<List<Student>>() { |
| | | @Override |
| | | public void onChanged(List<Student> students) { |
| | | for (Student student: |
| | | students) { |
| | | Log.i(TAG, "onChanged: "+student.toString()); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | mPermissionsManager = new PermissionManager(this) { |
| | | @Override |
| | | public void authorized(int requestCode) { |