| | |
| | | package safeluck.drive.evaluation.fragment; |
| | | |
| | | import android.os.Bundle; |
| | | import android.support.annotation.NonNull; |
| | | import android.support.annotation.Nullable; |
| | | import android.support.design.widget.TextInputEditText; |
| | | import android.support.v7.widget.AppCompatEditText; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.annotation.Nullable; |
| | | |
| | | import android.util.Log; |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | | import android.widget.Button; |
| | | |
| | | import androidx.appcompat.widget.AppCompatEditText; |
| | | import androidx.lifecycle.LifecycleOwner; |
| | | import androidx.lifecycle.Observer; |
| | | import androidx.lifecycle.ViewModelProviders; |
| | | |
| | | import com.google.android.material.textfield.TextInputEditText; |
| | | |
| | | import java.util.List; |
| | | |
| | | import me.yokeyword.fragmentation.SupportFragment; |
| | | import safeluck.drive.evaluation.DB.Student; |
| | | import safeluck.drive.evaluation.DB.WokViewModel; |
| | | import safeluck.drive.evaluation.R; |
| | | import safeluck.drive.evaluation.tcp.ConnectThread; |
| | | |
| | |
| | | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { |
| | | View view = inflater.inflate(R.layout.layout_tcpclient, container, false); |
| | | initView(view); |
| | | WokViewModel workViewModel =ViewModelProviders.of(this).get(WokViewModel.class); |
| | | |
| | | workViewModel.getStudents().observe((LifecycleOwner) this, new Observer<List<Student>>() { |
| | | @Override |
| | | public void onChanged(List<Student> students) { |
| | | for (Student student:students){ |
| | | Log.i("Students", "onChanged: "+student.toString()); |
| | | } |
| | | } |
| | | }); |
| | | return view; |
| | | } |
| | | |