endian11
2019-03-21 8781baec4139154d35bd424de27667715188b6cb
完成系统配置
7个文件已修改
6个文件已添加
453 ■■■■■ 已修改文件
app/src/main/java/safeluck/drive/evaluation/adapter/SimpleFragmentAdapter.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/fragment/BaseDatasFragment.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/fragment/BaseSettingFragment.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/fragment/FtpConfigFragment.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/fragment/HomeFragment.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/fragment/JiaXiaoFragment.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/fragment/SingleJudgeFragment.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/fragment/TrainFragment.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/btn_bg_baseset.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/layout_base_datas.xml 160 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/layout_base_set.xml 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/layout_ftp_setting.xml 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values/arrays.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/adapter/SimpleFragmentAdapter.java
@@ -5,6 +5,10 @@
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import me.yokeyword.fragmentation.SupportFragment;
import safeluck.drive.evaluation.fragment.BaseDatasFragment;
import safeluck.drive.evaluation.fragment.FtpConfigFragment;
import safeluck.drive.evaluation.fragment.JiaXiaoFragment;
import safeluck.drive.evaluation.fragment.VPFragment;
/**
@@ -21,7 +25,23 @@
    @Override
    public Fragment getItem(int i) {
        return VPFragment.newInstance(mTitles[i]);
        SupportFragment supportFragment = null;
        switch (i){
            case 0:
                //基本数据
                supportFragment = BaseDatasFragment.newInstance();
                break;
            case 1:
                supportFragment = FtpConfigFragment.newInstance();
                //ftp
                break;
            case 2:
                supportFragment = JiaXiaoFragment.newInstance();
                //驾校信息
                break;
                default:break;
        }
        return supportFragment;
    }
    @Override
app/src/main/java/safeluck/drive/evaluation/fragment/BaseDatasFragment.java
New file
@@ -0,0 +1,32 @@
package safeluck.drive.evaluation.fragment;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import me.yokeyword.fragmentation.SupportFragment;
import safeluck.drive.evaluation.R;
/**信号评判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 BaseDatasFragment extends SupportFragment {
    public static SupportFragment newInstance(){
        return new BaseDatasFragment();
    }
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.layout_base_datas,container,false);
        return view;
    }
}
app/src/main/java/safeluck/drive/evaluation/fragment/BaseSettingFragment.java
@@ -9,6 +9,7 @@
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.widget.Toolbar;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
@@ -31,6 +32,7 @@
    private ViewPager viewPager;
    private TabLayout tabLayout;
    private SimpleFragmentAdapter myFragmetAdapter;
    private Toolbar tb;
    public static SupportFragment newInstance(){
        return new BaseSettingFragment();
@@ -51,6 +53,17 @@
        tabLayout.setTabMode(TabLayout.MODE_FIXED);
        tabLayout.addTab(tabLayout.newTab());
        tabLayout.addTab(tabLayout.newTab());
        tabLayout.addTab(tabLayout.newTab());
        tb = view.findViewById(R.id.toolbar);
        tb.setNavigationIcon(R.drawable.ic_arrow_back_white_24dp);
        tb.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                _mActivity.onBackPressed();
            }
        });
        tb.setTitle(R.string.sys_setting);
        tb.setSubtitle(R.string.sys_setting_sub);
    }
    @Override
app/src/main/java/safeluck/drive/evaluation/fragment/FtpConfigFragment.java
New file
@@ -0,0 +1,32 @@
package safeluck.drive.evaluation.fragment;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import me.yokeyword.fragmentation.SupportFragment;
import safeluck.drive.evaluation.R;
/**信号评判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 FtpConfigFragment extends SupportFragment {
    public static SupportFragment newInstance(){
        return new FtpConfigFragment();
    }
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.layout_ftp_setting,container,false);
        return view;
    }
}
app/src/main/java/safeluck/drive/evaluation/fragment/HomeFragment.java
@@ -83,9 +83,9 @@
                break;
            case R.id.system_setting:
                SysSettingFragment sysSetingFragment = findFragment(SysSettingFragment.class);
                BaseSettingFragment sysSetingFragment = findFragment(BaseSettingFragment.class);
                if (sysSetingFragment == null){
                    sysSetingFragment = (SysSettingFragment) SysSettingFragment.newInstance();
                    sysSetingFragment = (BaseSettingFragment) BaseSettingFragment.newInstance();
                }
                start(sysSetingFragment);
                break;
app/src/main/java/safeluck/drive/evaluation/fragment/JiaXiaoFragment.java
New file
@@ -0,0 +1,32 @@
package safeluck.drive.evaluation.fragment;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import me.yokeyword.fragmentation.SupportFragment;
import safeluck.drive.evaluation.R;
/**信号评判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 JiaXiaoFragment extends SupportFragment {
    public static SupportFragment newInstance(){
        return new JiaXiaoFragment();
    }
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.layout_jiaxiao_info,container,false);
        return view;
    }
}
app/src/main/java/safeluck/drive/evaluation/fragment/SingleJudgeFragment.java
@@ -34,7 +34,7 @@
//            textView.setText("信号评判");
//        return textView;
        View view = inflater.inflate(R.layout.layout_jiaxiao_info,container,false);
        View view = inflater.inflate(R.layout.layout_base_datas,container,false);
        return view;
    }
}
app/src/main/java/safeluck/drive/evaluation/fragment/TrainFragment.java
@@ -6,9 +6,15 @@
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
import java.util.ArrayList;
import java.util.List;
import me.yokeyword.fragmentation.SupportFragment;
import safeluck.drive.evaluation.R;
import safeluck.drive.evaluation.adapter.ScoreAdapter;
import safeluck.drive.evaluation.bean.ScoreBean;
/**
 * MyApplication2
@@ -17,6 +23,12 @@
 * All Rights Saved! Chongqing AnYun Tech co. LTD
 */
public class TrainFragment extends SupportFragment {
    private ListView mListView ;
    private ScoreAdapter mScoreAdapter;
    private List<ScoreBean> mArrayList = new ArrayList<>();
    public static SupportFragment newInstance(){
        return new TrainFragment();
    }
@@ -25,6 +37,18 @@
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.layout_train_fragment,container,false);
        initView(view);
        return view;
    }
    private void initView(View view) {
        mListView = view.findViewById(R.id.lv);
        mScoreAdapter = new ScoreAdapter(_mActivity);
        mListView.setAdapter(mScoreAdapter);
        mListView.addHeaderView(LayoutInflater.from(_mActivity).inflate(R.layout.layout_score_item,null));
        mArrayList.add(new ScoreBean(12,"直角转弯","后轮胎压线"));
        mArrayList.add(new ScoreBean(100,"倒车入库","未系安全带"));
        mArrayList.add(new ScoreBean(10,"坡道起步","一次熄火"));
        mScoreAdapter.addDatas(mArrayList);
    }
}
app/src/main/res/drawable/btn_bg_baseset.png
app/src/main/res/layout/layout_base_datas.xml
New file
@@ -0,0 +1,160 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView  android:layout_height="match_parent" android:layout_width="match_parent" xmlns:android="http://schemas.android.com/apk/res/android">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:padding="10dp"
        android:gravity="center_horizontal"
        >
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="@android:color/black"
                android:text="BDS数据输入:"/>
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:text="IP:"/>
            <EditText
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="192.168.23.12"
                android:background="@android:drawable/editbox_background_normal"/>
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:text="Port:"/>
            <EditText
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="8080"
                android:background="@android:drawable/editbox_background_normal"/>
        </LinearLayout>
        <View
            android:layout_width="match_parent"
            android:layout_height="1px"
            android:layout_marginTop="10dp"
            android:layout_marginBottom="10dp"
            android:background="@color/colorAccent"
            />
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="@android:color/black"
                android:text="车载信号输入:"/>
            <TableLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center">
                <TableRow android:gravity="center_horizontal"
                    android:layout_marginBottom="10dp">
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="15dp"
                        android:text="主板:"/>
                    <android.support.v7.widget.AppCompatSpinner
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:entries="@array/spinnerarr"
                        android:gravity="center"
                        />
                </TableRow>
                <TableRow android:gravity="center_horizontal"
                    android:layout_marginBottom="10dp">
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="15dp"
                        android:text="串口号:"/>
                    <EditText
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="GpsExam"
                        android:background="@android:drawable/editbox_background_normal"/>  <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="15dp"
                    android:text="波特率:"/>
                    <EditText
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="GpsExam"
                        android:background="@android:drawable/editbox_background_normal"/>
                </TableRow>
                <TableRow android:gravity="center_horizontal"
                    android:layout_marginBottom="10dp">
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="15dp"
                        android:text="副板:"/>
                    <android.support.v7.widget.AppCompatSpinner
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:entries="@array/spinnerarr"/>
                </TableRow>
                <TableRow android:gravity="center_horizontal"
                    android:layout_marginBottom="10dp">
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="15dp"
                        android:text="串口号:"/>
                    <EditText
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="GpsExam"
                        android:background="@android:drawable/editbox_background_normal"/>
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="15dp"
                        android:text="波特率:"/>
                    <EditText
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="GpsExam"
                        android:background="@android:drawable/editbox_background_normal"/>
                </TableRow>
                <TableRow android:gravity="center_horizontal"
                    >
                    <Button  android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="查看信号"
                        android:padding="5dp"
                        android:background="@drawable/btn_bg_baseset"/>
                    <Button  android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="信号配置"
                        android:padding="5dp"
                        android:layout_marginLeft="15dp"
                        android:background="@drawable/btn_bg_baseset"/>
                </TableRow>
            </TableLayout>
        </LinearLayout>
        <View
            android:layout_width="match_parent"
            android:layout_height="1px"
            android:layout_marginTop="10dp"
            android:layout_marginBottom="10dp"
            android:background="@color/colorAccent"
            />
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="保存"/>
    </LinearLayout>
</ScrollView>
app/src/main/res/layout/layout_base_set.xml
@@ -3,25 +3,30 @@
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
<android.support.design.widget.TabLayout
    android:layout_width="match_parent"
    android:layout_height="45dp"
android:background="@color/colorAccent"
    android:id="@+id/tab_base_set">
    <android.support.design.widget.TabItem
        android:layout_width="wrap_content"
    <android.support.design.widget.AppBarLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="基础数据" />
        android:theme="@style/AppTheme.AppBarOverlay">
    <android.support.design.widget.TabItem
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="FTP配置" />
    <android.support.design.widget.TabItem
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="驾校信息" />
</android.support.design.widget.TabLayout>
        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
            app:popupTheme="@style/AppTheme.NoActionBar.PopupOverlay"
            app:titleTextAppearance="@style/Toolbar_TextAppearance_White"/>
        <android.support.design.widget.TabLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/tab_base_set"
            android:background="@color/profile_bg"
            android:layout_below="@+id/toolbar_set">
        </android.support.design.widget.TabLayout>
    </android.support.design.widget.AppBarLayout>
    <android.support.v4.view.ViewPager
        android:layout_width="match_parent"
        android:layout_height="match_parent"
app/src/main/res/layout/layout_ftp_setting.xml
@@ -1,6 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="10dp"
    android:gravity="center_horizontal"
   >
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@android:color/black"
            android:text="服务器地址:"/>
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="15dp"
            android:text="IP:"/>
        <EditText
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="192.168.23.12"
            android:background="@android:drawable/editbox_background_normal"/>
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp"
            android:text="Port:"/>
        <EditText
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="8080"
            android:background="@android:drawable/editbox_background_normal"/>
    </LinearLayout>
<View
    android:layout_width="match_parent"
    android:layout_height="1px"
    android:layout_marginTop="10dp"
    android:layout_marginBottom="10dp"
    android:background="@color/colorAccent"
    />
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@android:color/black"
            android:text="登录信息:"/>
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="15dp"
            android:text="用户名:"/>
        <EditText
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="GpsExam"
            android:background="@android:drawable/editbox_background_normal"/>
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp"
            android:text="密码:"/>
        <EditText
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="192.168.23.12"
            android:inputType="textPassword"
            android:background="@android:drawable/editbox_background_normal"/>
    </LinearLayout>
    <View
        android:layout_width="match_parent"
        android:layout_height="1px"
        android:layout_marginTop="10dp"
        android:layout_marginBottom="10dp"
        android:background="@color/colorAccent"
        />
    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="保存"/>
</LinearLayout>
app/src/main/res/values/arrays.xml
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string-array name="spinnerarr">
        <item>张三</item>
        <item>李四</item>
    </string-array>
</resources>