Skip to content

Commit f363f2f

Browse files
HXQWillxingquan.he
authored and
xingquan.he
committedMay 27, 2017
项目实战:自定义View实现右上角更多,让页面更简洁
1 parent 27b6da4 commit f363f2f

25 files changed

+486
-74
lines changed
 

‎app/src/main/AndroidManifest.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@
3636
android:theme="@style/BaseActivityTheme"
3737
></activity>
3838
<activity
39-
android:name=".ucar.trip.TripListActivity"
39+
android:name=".ucar.trip.TripFeeDetailActivity"
4040
android:screenOrientation="portrait"
4141
android:theme="@style/BaseActivityTheme"
4242
></activity>
4343
<activity
4444
android:name=".ucar.trip.TripDoubtActivity"
45+
android:launchMode="singleTop"
4546
android:screenOrientation="portrait"
4647
android:theme="@style/PopActivityTheme"
4748
></activity>

‎app/src/main/java/com/example/quan/quanstudy/base/BaseActivity.java

+48
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,25 @@
44
import android.content.Intent;
55
import android.os.Bundle;
66
import android.view.View;
7+
import android.widget.ImageView;
8+
import android.widget.TextView;
79

10+
import com.example.quan.quanstudy.R;
811
import com.example.quan.quanstudy.util.ActivityController;
912
import com.example.quan.quanstudy.util.CrashHandler;
1013
import com.example.quan.quanstudy.util.LogUtil;
1114
import com.example.quan.quanstudy.util.Utils;
1215

16+
import view.MoreWidget;
17+
1318
/**
1419
* Created by xq.he on 2017/3/13.
1520
*/
1621

1722
public abstract class BaseActivity extends Activity implements View.OnClickListener{
1823

24+
private MoreWidget more_widget;
25+
1926
@Override
2027
protected void onCreate(Bundle savedInstanceState) {
2128
super.onCreate(savedInstanceState);
@@ -47,4 +54,45 @@ public void onClick(View v) {
4754
return;
4855
}
4956
}
57+
58+
public void initTitle(int titleReId) {
59+
TextView titleTx = (TextView) findViewById(R.id.base_title);
60+
titleTx.setText(getString(titleReId));
61+
}
62+
63+
public void initTitleMore() {
64+
ImageView more = (ImageView) findViewById(R.id.more);
65+
if (more != null) {
66+
more.setVisibility(View.VISIBLE);
67+
more_widget = (MoreWidget) findViewById(R.id.more_layout);
68+
more.setOnClickListener(new View.OnClickListener() {
69+
@Override
70+
public void onClick(View v) {
71+
if (more_widget != null) {
72+
more_widget.show();
73+
}
74+
}
75+
});
76+
}
77+
}
78+
79+
public void removeAllMoreItem(){
80+
if (more_widget != null) {
81+
more_widget.removeAllItems();
82+
}
83+
}
84+
85+
public void addTitleMoreItem(String iconUrl, String content, MoreWidget.ClickCallback clickCallback) {
86+
if (more_widget != null) {
87+
more_widget.addItem(iconUrl, content, clickCallback);
88+
}
89+
}
90+
91+
public void addTitleMoreItem(int iconId, String content, MoreWidget.ClickCallback clickCallback) {
92+
if (more_widget != null) {
93+
more_widget.addItem(iconId, content, clickCallback);
94+
}
95+
}
96+
97+
5098
}

‎app/src/main/java/com/example/quan/quanstudy/ucar/MainUcarActivity.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import com.example.quan.quanstudy.R;
88
import com.example.quan.quanstudy.base.BaseActivity;
9-
import com.example.quan.quanstudy.ucar.trip.TripListActivity;
9+
import com.example.quan.quanstudy.ucar.trip.TripFeeDetailActivity;
1010

1111
/**
1212
* Created by xingquan.he on 2017/5/23.
@@ -32,6 +32,8 @@ public int getLayoutId() {
3232
@Override
3333
public void initView() {
3434
mTripDemo = (Button) findViewById(R.id.trip_btn_ucar);
35+
initTitle(R.string.ucar);
36+
findViewById(R.id.back_title).setOnClickListener(this);
3537
}
3638

3739
private void initOnClickListener() {
@@ -43,8 +45,10 @@ public void onClick(View v) {
4345
super.onClick(v);
4446
switch (v.getId()) {
4547
case R.id.trip_btn_ucar:
46-
gotoNextActivity(TripListActivity.class);
48+
gotoNextActivity(TripFeeDetailActivity.class);
4749
break;
50+
case R.id.back_title:
51+
finish();
4852
default:
4953
break;
5054
}

‎app/src/main/java/com/example/quan/quanstudy/ucar/trip/TripDoubtActivity.java

+12
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ public int getLayoutId() {
2727

2828
@Override
2929
public void initView() {
30+
initTitle(R.string.trip_doubt);
31+
findViewById(R.id.back_title).setOnClickListener(this);
32+
}
3033

34+
@Override
35+
public void onClick(View v) {
36+
super.onClick(v);
37+
switch (v.getId()) {
38+
case R.id.back_title:
39+
finish();
40+
default:
41+
break;
42+
}
3143
}
3244
}

‎app/src/main/java/com/example/quan/quanstudy/ucar/trip/TripListActivity.java ‎app/src/main/java/com/example/quan/quanstudy/ucar/trip/TripFeeDetailActivity.java

+25-8
Original file line numberDiff line numberDiff line change
@@ -7,45 +7,62 @@
77
import com.example.quan.quanstudy.R;
88
import com.example.quan.quanstudy.base.BaseActivity;
99

10+
import view.MoreWidget;
11+
1012
/**
1113
* Created by xingquan.he on 2017/5/23.
1214
* Mr.Quan
1315
*/
1416

15-
public class TripListActivity extends BaseActivity {
17+
public class TripFeeDetailActivity extends BaseActivity {
1618

17-
private Button mDoubtDemo;
19+
// private Button mDoubtDemo;
1820

1921
@Override
2022
protected void onCreate(Bundle savedInstanceState) {
2123
super.onCreate(savedInstanceState);
2224

2325
initOnClickListener();
26+
initMore();
2427
}
2528

2629
@Override
2730
public int getLayoutId() {
28-
return R.layout.activity_ucar_triplist;
31+
return R.layout.activity_ucar_tripfeedetail;
2932
}
3033

3134
@Override
3235
public void initView() {
33-
mDoubtDemo = (Button) findViewById(R.id.trip_doubt_btn_ucar);
36+
// mDoubtDemo = (Button) findViewById(R.id.trip_doubt_btn_ucar);
37+
initTitle(R.string.trip_feedetail);
38+
findViewById(R.id.back_title).setOnClickListener(this);
3439
}
3540

3641
private void initOnClickListener() {
37-
mDoubtDemo.setOnClickListener(this);
42+
// mDoubtDemo.setOnClickListener(this);
3843
}
3944

4045
@Override
4146
public void onClick(View v) {
4247
super.onClick(v);
4348
switch (v.getId()) {
44-
case R.id.trip_doubt_btn_ucar:
45-
gotoNextActivity(TripDoubtActivity.class);
46-
break;
49+
case R.id.back_title:
50+
finish();
4751
default:
4852
break;
4953
}
5054
}
55+
56+
/**
57+
* 初始化更多,疑义,计价规则
58+
*/
59+
private void initMore() {
60+
initTitleMore();
61+
addTitleMoreItem(R.drawable.trip_detail_doubt, getString(R.string.trip_doubt), new MoreWidget.ClickCallback() {
62+
@Override
63+
public void callback() {
64+
gotoNextActivity(TripDoubtActivity.class);
65+
}
66+
});
67+
}
5168
}

‎app/src/main/res/layout/activity_ucar.xml

+15-12
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,28 @@
66
android:layout_height="match_parent"
77
tools:context="com.example.quan.quanstudy.MainActivity"
88
android:orientation="vertical"
9-
android:background="@color/white"
9+
android:background="@color/color_f5f4f2"
1010
>
1111

12-
<com.example.quan.quanstudy.viewDemo.TitleView
13-
android:id="@+id/title"
14-
android:layout_width="match_parent"
15-
android:layout_height="wrap_content">
16-
</com.example.quan.quanstudy.viewDemo.TitleView>
17-
18-
<TextView
19-
android:layout_width="wrap_content"
20-
android:layout_height="wrap_content"
21-
android:text="Hello UCAR!" />
12+
<include
13+
android:id="@+id/ucar_title"
14+
layout="@layout/base_title_layout" />
2215

2316
<Button
2417
android:id="@+id/trip_btn_ucar"
2518
android:layout_width="match_parent"
26-
android:layout_height="wrap_content"
19+
android:layout_height="@dimen/dd_dimen_76px"
2720
android:text="行程模块"
21+
android:textColor="@drawable/common_button_textcolor_selector"
22+
android:textSize="@dimen/dd_dimen_32px"
23+
android:background="@drawable/common_button_selector"
24+
android:layout_marginBottom="@dimen/dd_dimen_10px"
25+
android:layout_marginLeft="@dimen/dd_dimen_36px"
26+
android:layout_marginRight="@dimen/dd_dimen_36px"
27+
android:layout_marginTop="@dimen/dd_dimen_45px"
28+
android:layout_below="@id/ucar_title"
29+
android:gravity="center"
30+
2831
/>
2932

3033
</LinearLayout>

‎app/src/main/res/layout/activity_ucar_tripdoubt.xml

+8-7
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@
66
android:layout_height="match_parent"
77
tools:context="com.example.quan.quanstudy.MainActivity"
88
android:orientation="vertical"
9-
android:background="@color/white"
9+
android:background="@color/color_f5f4f2"
1010
>
1111

12-
<com.example.quan.quanstudy.viewDemo.TitleView
13-
android:id="@+id/title"
14-
android:layout_width="match_parent"
15-
android:layout_height="wrap_content">
16-
</com.example.quan.quanstudy.viewDemo.TitleView>
12+
<include
13+
android:id="@+id/tripdoubt_title"
14+
layout="@layout/base_title_layout" />
1715

1816
<TextView
1917
android:layout_width="wrap_content"
2018
android:layout_height="wrap_content"
21-
android:text="Hello 行程疑义!" />
19+
android:text="Hello 账单疑义!"
20+
android:layout_below="@id/tripdoubt_title"
21+
android:layout_marginTop="@dimen/dd_dimen_45px"
22+
/>
2223

2324
</LinearLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:background="@color/color_f5f4f2">
6+
7+
<include
8+
android:id="@+id/tripfeedetail_title"
9+
layout="@layout/base_title_layout" />
10+
11+
<TextView
12+
android:layout_width="wrap_content"
13+
android:layout_height="wrap_content"
14+
android:text="Hello 费用明细!"
15+
android:layout_below="@id/tripfeedetail_title"
16+
android:layout_marginTop="@dimen/dd_dimen_45px"
17+
/>
18+
19+
<include
20+
layout="@layout/base_title_more_layout" />
21+
22+
</RelativeLayout>

‎app/src/main/res/layout/activity_ucar_triplist.xml

-30
This file was deleted.

‎app/src/main/res/values/strings.xml

+3
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@
66
<string name="animator_demo">Animator_Demo</string>
77
<string name="design_demo">Design_Demo</string>
88
<string name="ucar_demo">Ucar_Demo</string>
9+
<string name="ucar">神州专车</string>
10+
<string name="trip_feedetail">费用明细</string>
11+
<string name="trip_doubt">账单疑义</string>
912
</resources>

‎app/src/main/res/values/styles.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
</style>
2424

2525
<style name="BaseAnimation">
26-
<item name="@android:activityOpenEnterAnimation">@anim/left_in</item>
27-
<item name="@android:activityOpenExitAnimation">@anim/left_out</item>
28-
<item name="@android:activityCloseEnterAnimation">@anim/left_in</item>
29-
<item name="@android:activityCloseExitAnimation">@anim/left_out</item>
26+
<item name="android:activityOpenEnterAnimation">@anim/left_in</item>
27+
<item name="android:activityOpenExitAnimation">@anim/left_out</item>
28+
<item name="android:activityCloseEnterAnimation">@anim/right_in</item>
29+
<item name="android:activityCloseExitAnimation">@anim/right_out</item>
3030
</style>
3131

3232
<style name="PopActivityTheme" parent="android:Theme">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
package view;
2+
3+
import android.content.Context;
4+
import android.text.TextUtils;
5+
import android.util.AttributeSet;
6+
import android.view.LayoutInflater;
7+
import android.view.View;
8+
import android.view.ViewGroup;
9+
import android.widget.AdapterView;
10+
import android.widget.ArrayAdapter;
11+
import android.widget.ImageView;
12+
import android.widget.ListView;
13+
import android.widget.RelativeLayout;
14+
import android.widget.TextView;
15+
16+
import com.example.quan.quanlibrary.R;
17+
import com.example.quan.quanstudy.util.Utils;
18+
19+
/**
20+
* 4.0版本 Acitivity右上角更多组件
21+
*
22+
* Created by lpy on 2017/4/10.
23+
*
24+
* 使用方法:
25+
* 1. 在布局最下面 include : base_title_more_layout
26+
* 2. 调用BaseActivity initTitleMore()方法,初始化more
27+
* 3. 调用BaseActivity addTitleMoreItem()方法,添加 Item
28+
*/
29+
30+
public class MoreWidget extends RelativeLayout implements AdapterView.OnItemClickListener {
31+
32+
private Context mContext;
33+
private View mark_layout;
34+
private ListView item_list;
35+
private MoreWidgetAdapter adapter;
36+
37+
public MoreWidget(Context context) {
38+
super(context);
39+
this.mContext = context;
40+
initView();
41+
}
42+
43+
public MoreWidget(Context context, AttributeSet attrs) {
44+
super(context, attrs);
45+
this.mContext = context;
46+
initView();
47+
}
48+
49+
private void initView() {
50+
LayoutInflater.from(mContext).inflate(R.layout.more_widget_layout, this, true);
51+
mark_layout = findViewById(R.id.mark_layout);
52+
mark_layout.setOnClickListener(new OnClickListener() {
53+
@Override
54+
public void onClick(View v) {
55+
hide();
56+
}
57+
});
58+
item_list = (ListView) findViewById(R.id.item_list);
59+
adapter = new MoreWidgetAdapter(mContext);
60+
item_list.setAdapter(adapter);
61+
item_list.setOnItemClickListener(this);
62+
setVisibility(GONE);
63+
}
64+
65+
public void removeAllItems(){
66+
adapter.clear();
67+
}
68+
69+
public void addItem(int iconId, String content, ClickCallback clickCallback) {
70+
adapter.add(new MoreWidgetItem(iconId, content, clickCallback));
71+
adapter.notifyDataSetChanged();
72+
}
73+
74+
public void addItem(String iconUrl, String content, ClickCallback clickCallback){
75+
adapter.add(new MoreWidgetItem(iconUrl, content, clickCallback));
76+
adapter.notifyDataSetChanged();
77+
}
78+
79+
@Override
80+
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
81+
if (Utils.isFastClick()) {
82+
return;
83+
}
84+
MoreWidgetItem item = adapter.getItem(position);
85+
if (item != null && item.clickCallback != null) {
86+
hide();
87+
item.clickCallback.callback();
88+
}
89+
}
90+
91+
private boolean isShow = false;
92+
93+
public void show() {
94+
isShow = true;
95+
setVisibility(VISIBLE);
96+
}
97+
98+
public void hide() {
99+
isShow = false;
100+
setVisibility(GONE);
101+
}
102+
103+
public boolean isShow() {
104+
return isShow;
105+
}
106+
107+
public interface ClickCallback {
108+
void callback();
109+
}
110+
111+
class MoreWidgetItem {
112+
public int iconId;
113+
public String iconUrl;
114+
public String content;
115+
public ClickCallback clickCallback;
116+
117+
public MoreWidgetItem(String iconUrl, String content, ClickCallback clickCallback) {
118+
this.iconId = -1;
119+
this.iconUrl = iconUrl;
120+
this.content = content;
121+
this.clickCallback = clickCallback;
122+
}
123+
124+
public MoreWidgetItem(int iconId, String content, ClickCallback clickCallback) {
125+
this.iconId = iconId;
126+
this.content = content;
127+
this.clickCallback = clickCallback;
128+
}
129+
}
130+
131+
132+
class MoreWidgetAdapter extends ArrayAdapter<MoreWidgetItem> {
133+
134+
private Context context;
135+
136+
public MoreWidgetAdapter(Context context) {
137+
super(context, 0);
138+
this.context = context;
139+
}
140+
141+
@Override
142+
public View getView(int position, View convertView, ViewGroup parent) {
143+
convertView = View.inflate(context, R.layout.more_widget_item_layout, null);
144+
ImageView image = (ImageView) convertView.findViewById(R.id.item_iv);
145+
TextView text = (TextView) convertView.findViewById(R.id.text_tv);
146+
View upline = convertView.findViewById(R.id.line_up);
147+
View downline = convertView.findViewById(R.id.line_down);
148+
upline.setVisibility(View.GONE);
149+
downline.setVisibility(View.GONE);
150+
151+
if (position < getCount()) {
152+
if (position == 0) {
153+
upline.setVisibility(View.VISIBLE);
154+
}
155+
if (position == getCount() - 1) {
156+
downline.setVisibility(View.VISIBLE);
157+
}
158+
159+
160+
MoreWidgetItem item = getItem(position);
161+
if (item.iconId > 0) {
162+
image.setBackgroundResource(item.iconId);
163+
} else if(!TextUtils.isEmpty(item.iconUrl)){
164+
// Sdk.image().displayImage(item.iconUrl, image);
165+
//Quan TODO: 2017/5/27 url载因为涉及到Sdk.image(),这个可以单写一篇博客,本次不做,后期补上。
166+
}
167+
168+
if (!TextUtils.isEmpty(item.content)) {
169+
text.setText(item.content);
170+
}
171+
}
172+
return convertView;
173+
}
174+
}
175+
176+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<set xmlns:android="http://schemas.android.com/apk/res/android">
3+
<translate android:fromXDelta="-100%p" android:toXDelta="0"
4+
android:duration="250" />
5+
</set>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<set xmlns:android="http://schemas.android.com/apk/res/android">
3+
<translate android:fromXDelta="0" android:toXDelta="100%p"
4+
android:duration="250" />
5+
</set>
Loading
417 Bytes
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="@dimen/dd_dimen_88px"
5+
android:background="@color/color_373635"
6+
android:orientation="horizontal" >
7+
8+
<ImageView
9+
android:id="@+id/back_title"
10+
android:layout_width="wrap_content"
11+
android:layout_height="match_parent"
12+
android:layout_alignParentLeft="true"
13+
android:paddingLeft="@dimen/dd_dimen_26px"
14+
android:paddingRight="@dimen/dd_dimen_20px"
15+
android:src="@drawable/icon_left" />
16+
17+
<TextView
18+
android:id="@+id/base_title"
19+
android:layout_width="@dimen/dd_dimen_350px"
20+
android:layout_height="wrap_content"
21+
android:layout_centerInParent="true"
22+
android:gravity="center"
23+
android:singleLine="true"
24+
android:textColor="@color/color_deb682"
25+
android:textSize="@dimen/dd_dimen_34px" />
26+
27+
<ImageView
28+
android:id="@+id/share_title"
29+
android:layout_width="wrap_content"
30+
android:layout_height="match_parent"
31+
android:layout_alignParentRight="true"
32+
android:paddingLeft="@dimen/dd_dimen_20px"
33+
android:paddingRight="@dimen/dd_dimen_36px"
34+
android:src="@drawable/title_share"
35+
android:visibility="gone" />
36+
37+
<ImageView
38+
android:id="@+id/more"
39+
android:layout_width="wrap_content"
40+
android:layout_height="match_parent"
41+
android:layout_alignParentRight="true"
42+
android:paddingLeft="@dimen/dd_dimen_20px"
43+
android:paddingRight="@dimen/dd_dimen_36px"
44+
android:src="@drawable/more"
45+
android:visibility="gone" />
46+
47+
<TextView
48+
android:id="@+id/text_btn"
49+
android:layout_width="wrap_content"
50+
android:layout_height="match_parent"
51+
android:layout_alignParentRight="true"
52+
android:gravity="center"
53+
android:paddingLeft="@dimen/dd_dimen_20px"
54+
android:paddingRight="@dimen/dd_dimen_36px"
55+
android:text=""
56+
android:visibility="gone"
57+
android:textColor="@color/color_deb682"
58+
android:textSize="@dimen/dd_dimen_28px" />
59+
60+
<ImageView
61+
android:id="@+id/whiteLine"
62+
android:layout_width="match_parent"
63+
android:layout_height="@dimen/dd_dimen_1px"
64+
android:layout_alignParentBottom="true"
65+
android:background="@color/login_divider"
66+
android:visibility="gone"/>
67+
68+
</RelativeLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="wrap_content"
4+
android:layout_height="wrap_content" >
5+
6+
<view.MoreWidget
7+
android:id="@+id/more_layout"
8+
android:layout_width="wrap_content"
9+
android:layout_height="wrap_content" />
10+
11+
</RelativeLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="wrap_content">
5+
6+
<RelativeLayout
7+
android:layout_width="match_parent"
8+
android:layout_height="@dimen/dd_dimen_80px"
9+
android:background="@color/color_373635">
10+
11+
<View
12+
android:id="@+id/line_up"
13+
android:layout_width="match_parent"
14+
android:layout_height="@dimen/dd_dimen_1px"
15+
android:layout_alignParentTop="true"
16+
android:background="@color/color_434241" />
17+
18+
<View
19+
android:id="@+id/line_down"
20+
android:layout_width="match_parent"
21+
android:layout_height="@dimen/dd_dimen_1px"
22+
android:layout_alignParentBottom="true"
23+
android:background="@color/color_434241" />
24+
25+
<View
26+
android:layout_width="@dimen/dd_dimen_1px"
27+
android:layout_height="match_parent"
28+
android:layout_alignParentLeft="true"
29+
android:background="@color/color_434241" />
30+
31+
<ImageView
32+
android:id="@+id/item_iv"
33+
android:layout_width="@dimen/dd_dimen_26px"
34+
android:layout_height="@dimen/dd_dimen_26px"
35+
android:layout_centerVertical="true"
36+
android:layout_marginLeft="@dimen/dd_dimen_20px" />
37+
38+
<TextView
39+
android:id="@+id/text_tv"
40+
android:layout_width="wrap_content"
41+
android:layout_height="wrap_content"
42+
android:layout_centerVertical="true"
43+
android:layout_marginLeft="@dimen/dd_dimen_16px"
44+
android:layout_toRightOf="@id/item_iv"
45+
android:textColor="@color/white"
46+
android:textSize="@dimen/dd_dimen_26px" />
47+
48+
</RelativeLayout>
49+
50+
</RelativeLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent">
5+
6+
<View
7+
android:id="@+id/mark_layout"
8+
android:layout_width="match_parent"
9+
android:layout_height="match_parent"/>
10+
11+
<ListView
12+
android:id="@+id/item_list"
13+
android:layout_width="@dimen/dd_dimen_250px"
14+
android:layout_marginTop="@dimen/dd_dimen_88px"
15+
android:layout_height="wrap_content"
16+
android:layout_alignParentRight="true"
17+
android:divider="@null"
18+
android:scrollbars="none" />
19+
20+
</RelativeLayout>

‎quanlibrary/src/main/res/values/colors.xml

+6
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,10 @@
88
<color name="color_d9d9d9">#d9d9d9</color>
99
<color name="color_fef7ed">#fef7ed</color>
1010
<color name="white">#FFFFFF</color>
11+
<color name="color_373635">#373635</color>
12+
<color name="color_deb682">#deb682</color>
13+
<color name="color_434241">#434241</color>
14+
<color name="color_f5f4f2">#f5f4f2</color>
15+
16+
<color name="login_divider">#dcdcdc</color>
1117
</resources>

‎quanlibrary/src/main/res/values/values-xhdpi.xml

-10
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.