package safeluck.drive.evaluation.fragment; import android.os.Bundle; import android.util.Log; import android.util.TypedValue; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProviders; import me.yokeyword.fragmentation.SupportFragment; import safeluck.drive.evaluation.DB.rtktb.RTKConfig; import safeluck.drive.evaluation.DB.rtktb.RTKConfigViewModel; import safeluck.drive.evaluation.R; import safeluck.drive.evaluation.util.Utils; /**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 GpsInfoFragment extends SupportFragment{ private static final String TAG = "RTKConfigFragment"; private EditText et_ip,et_port,et_city_id,et_city_province,et_phone; private RTKConfigViewModel rtkConfigViewModel; private RTKConfig mRtkConfig; public static SupportFragment newInstance(){ return new GpsInfoFragment(); } @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return initView(); } private View initView() { TextView textView = new TextView(_mActivity); ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); textView.setText("收到命令[3],Json内容为{\"connected\":0,\"ip\":\"47.93.80.84\",\"port\":12125}"); textView.setTextSize(Utils.dp2Px(20)); textView.setLayoutParams(layoutParams); textView.setGravity(Gravity.CENTER_VERTICAL); return textView; } }