Browse Source

派车单

developer
lh 8 years ago
parent
commit
a2971a5f72
6 changed files with 248 additions and 5 deletions
  1. +8
    -4
      app/src/main/AndroidManifest.xml
  2. +10
    -1
      app/src/main/java/com/qhclh/ytzh/index/IndexFragment.java
  3. +30
    -0
      app/src/main/java/com/qhclh/ytzh/index/planorder/OrderActivity.java
  4. +49
    -0
      app/src/main/res/drawable/bg_shadow.xml
  5. +146
    -0
      app/src/main/res/layout/act_order.xml
  6. +5
    -0
      app/src/main/res/values/strings.xml

+ 8
- 4
app/src/main/AndroidManifest.xml View File

@ -18,16 +18,20 @@
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity android:name=".splash.SplashActivity">
<activity android:name=".splash.SplashActivity"
android:screenOrientation="portrait">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".home.MainActivity"/>
<activity android:name=".login.LoginActivity"/>
<activity android:name=".home.MainActivity"
android:screenOrientation="portrait"/>
<activity android:name=".login.LoginActivity"
android:screenOrientation="portrait"/>
<activity android:name=".index.planorder.OrderActivity"
android:screenOrientation="portrait"/>
<!--友盟 --> <!--友盟 -->
<!--<meta-data android:value="5a1b5deaf43e4825b200070d" android:name="UMENG_APPKEY"/>--> <!--<meta-data android:value="5a1b5deaf43e4825b200070d" android:name="UMENG_APPKEY"/>-->


+ 10
- 1
app/src/main/java/com/qhclh/ytzh/index/IndexFragment.java View File

@ -1,10 +1,14 @@
package com.qhclh.ytzh.index; package com.qhclh.ytzh.index;
import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView; import android.widget.ListView;
import com.qhclh.ytzh.R; import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseFragment; import com.qhclh.ytzh.base.BaseFragment;
import com.qhclh.ytzh.bean.NewsBean; import com.qhclh.ytzh.bean.NewsBean;
import com.qhclh.ytzh.index.planorder.OrderActivity;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -39,6 +43,11 @@ public class IndexFragment extends BaseFragment {
@Override @Override
protected void initOper() { protected void initOper() {
lv_index.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
startActivity(new Intent(getActivity(), OrderActivity.class));
}
});
} }
} }

+ 30
- 0
app/src/main/java/com/qhclh/ytzh/index/planorder/OrderActivity.java View File

@ -0,0 +1,30 @@
package com.qhclh.ytzh.index.planorder;
import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseActivity;
/**
* Created by 青花瓷 on 2017/11/28.
*/
public class OrderActivity extends BaseActivity {
@Override
protected int setLayoutId() {
return R.layout.act_order;
}
@Override
protected void initView() {
}
@Override
protected void initData() {
}
@Override
protected void initOper() {
}
}

+ 49
- 0
app/src/main/res/drawable/bg_shadow.xml View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 阴影部分 -->
<!-- 个人觉得更形象的表达:top代表下边的阴影高度,left代表右边的阴影宽度。其实也就是相对应的offset,solid中的颜色是阴影的颜色,也可以设置角度等等 -->
<item
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
android:top="2dp">
<shape android:shape="rectangle">
<gradient
android:angle="270"
android:endColor="#0F000000"
android:startColor="#0F000000" />
<corners
android:bottomLeftRadius="6dip"
android:bottomRightRadius="6dip"
android:topLeftRadius="6dip"
android:topRightRadius="6dip" />
</shape>
</item>
<!-- 背景部分 -->
<!-- 形象的表达:bottom代表背景部分在上边缘超出阴影的高度,right代表背景部分在左边超出阴影的宽度(相对应的offset) -->
<item
android:bottom="5dp"
android:left="3dp"
android:right="3dp"
android:top="3dp">
<shape android:shape="rectangle">
<gradient
android:angle="270"
android:endColor="#FFFFFF"
android:startColor="#FFFFFF" />
<corners
android:bottomLeftRadius="6dip"
android:bottomRightRadius="6dip"
android:topLeftRadius="6dip"
android:topRightRadius="6dip" />
</shape>
</item>
</layer-list>

+ 146
- 0
app/src/main/res/layout/act_order.xml View File

@ -0,0 +1,146 @@
<?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:background="@color/white"
android:orientation="vertical">
<include layout="@layout/include_tool_bar"></include>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/dp_120"
android:layout_marginLeft="@dimen/dp_60"
android:layout_marginRight="@dimen/dp_60"
android:layout_marginTop="@dimen/dp_60"
android:background="@drawable/bg_shadow"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:background="@color/white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/date"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_22" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:text="@string/app_name"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_22" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_10"
android:background="@color/white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/supplier"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_22" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:text="@string/app_name"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_22" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_10"
android:background="@color/white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/variety"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_22" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:text="@string/app_name"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_22" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_10"
android:background="@color/white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/driver"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_22" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:text="@string/app_name"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_22" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_10"
android:background="@color/white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/number"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_22" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:text="@string/app_name"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_22" />
</LinearLayout>
<Button
android:id="@+id/order_sendcar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_20"
android:background="@drawable/paiche_3x" />
</LinearLayout>
</LinearLayout>

+ 5
- 0
app/src/main/res/values/strings.xml View File

@ -11,4 +11,9 @@
<string name="work_carsmanager">车辆管理</string> <string name="work_carsmanager">车辆管理</string>
<string name="work_scan">扫一扫</string> <string name="work_scan">扫一扫</string>
<string name="functions">功能区</string> <string name="functions">功能区</string>
<string name="date">日期:</string>
<string name="supplier">供货商:</string>
<string name="variety">品种:</string>
<string name="driver">司机:</string>
<string name="number">数量:</string>
</resources> </resources>

Loading…
Cancel
Save