package safeluck.drive.evaluation.fragment; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import com.google.gson.Gson; import me.yokeyword.fragmentation.SupportFragment; import safeluck.drive.evaluation.R; import safeluck.drive.evaluation.bean.RTKConfig; /**FTP配置UI * MyApplication2 * Created by lzw on 2019/3/20. 11:22:39 * 邮箱:632393724@qq.com * All Rights Saved! Chongqing AnYun Tech co. LTD */ public class RTKConfigFragment extends SupportFragment implements View.OnClickListener { private static final String TAG = "RTKConfigFragment"; private EditText et_ip,et_port,et_city_id,et_city_province,et_phone; public static SupportFragment newInstance(){ return new RTKConfigFragment(); } @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.layout_rtk_setting,container,false); initView(view); return view; } private void initView(View view) { view.findViewById(R.id.btn_save_rtk).setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()){ case R.id.btn_save_rtk: Gson gson = new Gson(); String rtkConfigjson = gson.toJson(RTKConfig.class); break; } } }