修改活动首页、场馆首页
This commit is contained in:
parent
061e86256f
commit
dde8160e30
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/text_blue" android:state_checked="true" />
|
||||
<item android:color="@color/black" android:state_checked="false" />
|
||||
<item android:color="@color/app_title_9f_no" android:state_checked="true" />
|
||||
</selector>
|
Before Width: | Height: | Size: 569 B After Width: | Height: | Size: 569 B |
BIN
cm_utils/src/main/res/drawable-xhdpi/ic_clock_yellow_icon.png
Normal file
BIN
cm_utils/src/main/res/drawable-xhdpi/ic_clock_yellow_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 685 B |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
BIN
cm_utils/src/main/res/drawable-xhdpi/ic_eye_gray.png
Normal file
BIN
cm_utils/src/main/res/drawable-xhdpi/ic_eye_gray.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 388 B |
BIN
cm_utils/src/main/res/drawable-xhdpi/ic_phone_blue_icon.png
Normal file
BIN
cm_utils/src/main/res/drawable-xhdpi/ic_phone_blue_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 632 B |
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#99000000" />
|
||||
<corners
|
||||
android:bottomRightRadius="15dp"
|
||||
android:topLeftRadius="5dp" />
|
||||
|
||||
</shape>
|
14
cm_utils/src/main/res/drawable/shape_status_blue_round.xml
Normal file
14
cm_utils/src/main/res/drawable/shape_status_blue_round.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#99000000" />
|
||||
<corners
|
||||
android:bottomLeftRadius="15dp"
|
||||
android:topRightRadius="5dp" />
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#417FED"
|
||||
android:startColor="#0956E0"
|
||||
android:type="linear" />
|
||||
</shape>
|
@ -13,14 +13,14 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_tab_icon_left"
|
||||
android:visibility="invisible" />
|
||||
android:visibility="gone" />
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_tab_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="15sp"
|
||||
app:text_type_cus="1"
|
||||
app:text_type_cus="12"
|
||||
tools:text="新闻" />
|
||||
|
||||
<ImageView
|
||||
@ -28,5 +28,5 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_tab_icon_right"
|
||||
android:visibility="invisible" />
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
@ -36,7 +36,7 @@
|
||||
<color name="text_gray_tr">#bb8E8E8E</color>
|
||||
<color name="text_gray01">#535353</color>
|
||||
<color name="text_gray02">#7C7C7C</color>
|
||||
<color name="text_blue">#00A6FE</color>
|
||||
<color name="text_blue">#125CE1</color>
|
||||
<color name="text_blue_tr">#3300A6FE</color>
|
||||
<color name="text_80_gray">#808080</color>
|
||||
<color name="notify_text_color">#FF8B00</color>
|
||||
|
@ -35,11 +35,11 @@ public class ActivityAdapter extends BaseRecyclerAdapter<ActivityListBeans.RowsB
|
||||
public void bindHolder(ActivityHolder activityHolder, int i) {
|
||||
activityHolder.mTvTitle.setText(mData.get(i).getActivityTitle());
|
||||
activityHolder.mTvSee.setText(mData.get(i).getActivityViewNum());
|
||||
if ("1".equals(mData.get(i).getActivityFormType())) {
|
||||
activityHolder.mTvType.setText("需报名");
|
||||
} else {
|
||||
activityHolder.mTvType.setText("直接进入");
|
||||
}
|
||||
// if ("1".equals(mData.get(i).getActivityFormType())) {
|
||||
// activityHolder.mTvType.setText("需报名");
|
||||
// } else {
|
||||
// activityHolder.mTvType.setText("直接进入");
|
||||
// }
|
||||
// 1.未发布2.已发布3.报名中4.报名人数已满5.停止报名6.进行中99.已结束 ,
|
||||
String state;
|
||||
switch (mData.get(i).getActivityState()) {
|
||||
|
@ -155,8 +155,8 @@ public class ActivityMainFragment extends BaseFragment {
|
||||
public void onTabSelected(TabLayout.Tab tab) {
|
||||
setState(STATE_LOAD);
|
||||
View tabView = tab.getCustomView();
|
||||
tabView.findViewById(R.id.iv_right).setVisibility(View.VISIBLE);
|
||||
tabView.findViewById(R.id.iv_Left).setVisibility(View.VISIBLE);
|
||||
// tabView.findViewById(R.id.iv_right).setVisibility(View.VISIBLE);
|
||||
// tabView.findViewById(R.id.iv_Left).setVisibility(View.VISIBLE);
|
||||
TextView tvTab = tabView.findViewById(R.id.tv_tab_title);
|
||||
tvTab.setTextColor(Color.RED);
|
||||
BaseDictionaryBean bean = (BaseDictionaryBean) tab.getTag();
|
||||
@ -169,8 +169,8 @@ public class ActivityMainFragment extends BaseFragment {
|
||||
@Override
|
||||
public void onTabUnselected(TabLayout.Tab tab) {
|
||||
View tabView = tab.getCustomView();
|
||||
tabView.findViewById(R.id.iv_right).setVisibility(View.INVISIBLE);
|
||||
tabView.findViewById(R.id.iv_Left).setVisibility(View.INVISIBLE);
|
||||
// tabView.findViewById(R.id.iv_right).setVisibility(View.INVISIBLE);
|
||||
// tabView.findViewById(R.id.iv_Left).setVisibility(View.INVISIBLE);
|
||||
TextView tvTab = tabView.findViewById(R.id.tv_tab_title);
|
||||
tvTab.setTextColor(Color.GRAY);
|
||||
}
|
||||
@ -181,8 +181,8 @@ public class ActivityMainFragment extends BaseFragment {
|
||||
}
|
||||
});
|
||||
View customView = mTlType.getTabAt(0).getCustomView();
|
||||
customView.findViewById(R.id.iv_right).setVisibility(View.VISIBLE);
|
||||
customView.findViewById(R.id.iv_Left).setVisibility(View.VISIBLE);
|
||||
// customView.findViewById(R.id.iv_right).setVisibility(View.VISIBLE);
|
||||
// customView.findViewById(R.id.iv_Left).setVisibility(View.VISIBLE);
|
||||
TextView tvTab = customView.findViewById(R.id.tv_tab_title);
|
||||
tvTab.setTextColor(Color.RED);
|
||||
setStateView(STATE_SUCCESS);
|
||||
|
@ -22,7 +22,7 @@ public class ActivityHolder extends RecyclerView.ViewHolder {
|
||||
public ImageView mIvCover;//封面
|
||||
public TextView mTvSee;//浏览量
|
||||
public TextView mTvState;//是否结束
|
||||
public TextView mTvType;//参与方式
|
||||
// public TextView mTvType;//参与方式
|
||||
|
||||
public ActivityHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
@ -31,6 +31,5 @@ public class ActivityHolder extends RecyclerView.ViewHolder {
|
||||
mIvCover = itemView.findViewById(R.id.iv_cover);
|
||||
mTvSee = itemView.findViewById(R.id.tv_see);
|
||||
mTvState = itemView.findViewById(R.id.tv_state);
|
||||
mTvType = itemView.findViewById(R.id.tv_type);
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:background="@drawable/shape_tab_bg">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
@ -19,7 +20,7 @@
|
||||
app:tabGravity="fill"
|
||||
app:tabIndicatorColor="@color/white"
|
||||
app:tabMode="scrollable"
|
||||
app:tabSelectedTextColor="@color/app_title"
|
||||
app:tabSelectedTextColor="@color/text_blue"
|
||||
app:tabTextAppearance="@style/TabLayoutTextStyle"
|
||||
app:tabTextColor="@color/gray_text" />
|
||||
</LinearLayout>
|
||||
|
@ -35,9 +35,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/shape_status_black"
|
||||
android:background="@drawable/shape_status_blue_round"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingRight="10dp"
|
||||
@ -46,34 +44,6 @@
|
||||
android:textSize="12sp"
|
||||
tools:text="进行中" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_toLeftOf="@id/tv_state"
|
||||
android:background="@drawable/shape_status_black"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="4dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:src="@drawable/ic_eye" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_see"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
tools:text="234234" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@ -95,25 +65,41 @@
|
||||
android:textSize="16sp"
|
||||
tools:text="标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_re_red"
|
||||
android:padding="4dp"
|
||||
android:textColor="#9F1512"
|
||||
tools:text="直接进入" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:textColor="#242424"
|
||||
android:textSize="10sp"
|
||||
tools:text="2020-02-02 12:00:00至2020-02-02 12:00:00" />
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/ic_clock_icon"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="#242424"
|
||||
android:textSize="10sp"
|
||||
tools:text="2020-02-02 12:00:00至2020-02-02 12:00:00" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_see"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:drawableLeft="@drawable/ic_eye_gray"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:textColor="@color/text_black_122"
|
||||
android:textSize="10sp"
|
||||
tools:text="234234" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
@ -50,7 +50,7 @@
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_toLeftOf="@id/tv_state"
|
||||
android:background="@drawable/shape_rectangle_transparence"
|
||||
android:drawableLeft="@drawable/ic_eye"
|
||||
android:drawableLeft="@drawable/ic_eye_gray"
|
||||
android:drawablePadding="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
|
@ -49,17 +49,18 @@ public class PlaceListAdapter extends BaseRecyclerAdapter<PlaceListBean.RowsBean
|
||||
} else {
|
||||
distance = v + "米";
|
||||
}
|
||||
holder.mTvDistance.setText("距离" + distance);
|
||||
holder.mTvSee.setText(rowsBean.getViewCount());
|
||||
holder.mTvDistance.setText(distance);
|
||||
if (!TextUtils.isEmpty(rowsBean.getVenuePanorama())) {
|
||||
String[] split = rowsBean.getVenuePanorama().split(",");
|
||||
Glide.with(mContext)
|
||||
.asBitmap()
|
||||
.load(BaseUrlApi.BASE_PLACE_IMG_IP + split[0])
|
||||
.apply(options)
|
||||
.into(holder.mIvCover);
|
||||
.asBitmap()
|
||||
.load(BaseUrlApi.BASE_PLACE_IMG_IP + split[0])
|
||||
.apply(options)
|
||||
.into(holder.mIvCover);
|
||||
}
|
||||
String time = TextUtils.isEmpty(rowsBean.getBusinessHours()) ? "未知" : rowsBean.getBusinessHours();
|
||||
holder.mTvTime.setText("营业时间:" + time);
|
||||
holder.mTvPhone.setText(rowsBean.getVenueTelephone());
|
||||
holder.mTvAddress.setText(rowsBean.getVenuePosition());
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.tengshisoft.moduleplace.fragment;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Typeface;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
@ -16,14 +14,9 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.ethanhua.skeleton.RecyclerViewSkeletonScreen;
|
||||
import com.ethanhua.skeleton.Skeleton;
|
||||
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseFragment;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.ItemSplitDivider;
|
||||
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.tengshisoft.moduleplace.R;
|
||||
@ -38,7 +31,6 @@ import com.tengshisoft.moduleplace.widget.BottomAppRaiseDialog;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@ -104,14 +96,20 @@ public class PlaceMainfragment extends BaseFragment {
|
||||
mSrlView.setEnableLoadMore(false);
|
||||
mSrlView.setEnableRefresh(false);
|
||||
mFuncAdapter = new PlaceFuncAdapter(mActivity, mFuncDatas);
|
||||
mRlvPlaceType.setLayoutManager(new LinearLayoutManager(mActivity, LinearLayoutManager.HORIZONTAL, false));
|
||||
mRlvPlaceType.setLayoutManager(new GridLayoutManager(mActivity, 2, LinearLayoutManager.HORIZONTAL, false));
|
||||
mRlvPlaceType.setAdapter(mFuncAdapter);
|
||||
mAdapter = new PlaceListAdapter(mActivity, mDatas);
|
||||
mRlvPlaceContent.setLayoutManager(new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false));
|
||||
LinearLayoutManager manager = new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false) {
|
||||
@Override
|
||||
public boolean canScrollVertically() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
mRlvPlaceContent.setLayoutManager(manager);
|
||||
// mRlvPlaceContent.addItemDecoration(new ItemSplitDivider(mActivity, LinearLayoutManager.VERTICAL, 1, Color.parseColor("#F2F2F2")));
|
||||
mRlvPlaceContent.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(this::showPlaceDetail);
|
||||
mFuncAdapter.addOnItemClickListener(dataBean -> showTypePlaceActivity(dataBean));
|
||||
mFuncAdapter.addOnItemClickListener(this::showTypePlaceActivity);
|
||||
mRgTaxis.setOnCheckedChangeListener((group, checkedId) -> {
|
||||
mCurrentPage = 1;
|
||||
if (checkedId == R.id.rb_default) {
|
||||
@ -129,10 +127,6 @@ public class PlaceMainfragment extends BaseFragment {
|
||||
}
|
||||
getPlaceListByOrder(mCurrentPage, mCurrentType);
|
||||
});
|
||||
mRbDefault.setTypeface(Typeface.createFromAsset(mActivity.getAssets(), "fonts/zhangti.TTF"));
|
||||
mRbDis.setTypeface(Typeface.createFromAsset(mActivity.getAssets(), "fonts/zhangti.TTF"));
|
||||
mRbMoods.setTypeface(Typeface.createFromAsset(mActivity.getAssets(), "fonts/zhangti.TTF"));
|
||||
mRbNews.setTypeface(Typeface.createFromAsset(mActivity.getAssets(), "fonts/zhangti.TTF"));
|
||||
mCurrentPage = 1;
|
||||
mSrlPlaceContent.setOnRefreshListener(refreshLayout -> refreshData());
|
||||
getPlaceListByOrder(mCurrentPage, mCurrentType);
|
||||
@ -140,10 +134,10 @@ public class PlaceMainfragment extends BaseFragment {
|
||||
refreshStateView(STATE_LOAD);
|
||||
getFuncList();
|
||||
mRlvSkeleton = Skeleton.bind(mRlvPlaceContent)
|
||||
.count(5)
|
||||
.adapter(mAdapter)
|
||||
.load(R.layout.layout_skeleton_img)
|
||||
.show();
|
||||
.count(5)
|
||||
.adapter(mAdapter)
|
||||
.load(R.layout.layout_skeleton_img)
|
||||
.show();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -153,26 +147,26 @@ public class PlaceMainfragment extends BaseFragment {
|
||||
*/
|
||||
private void showTypePlaceActivity(PlaceFuncBean.DataBean dataBean) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_PLACE_ACTIVITY_PLACELIST)
|
||||
.withString("dId", dataBean.getDictionaryId())
|
||||
.withString("title", dataBean.getDictionaryName())
|
||||
.navigation();
|
||||
.build(PathConfig.PATH_MODULE_PLACE_ACTIVITY_PLACELIST)
|
||||
.withString("dId", dataBean.getDictionaryId())
|
||||
.withString("title", dataBean.getDictionaryName())
|
||||
.navigation();
|
||||
}
|
||||
|
||||
private void showPlaceDetail(PlaceListBean.RowsBean placeListBean) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_PLACE_ACTIVITY_PLACEDETAIL)
|
||||
.withString("id", placeListBean.getVenuesInfoId())
|
||||
.withString("title", placeListBean.getVenueName())
|
||||
.navigation();
|
||||
.build(PathConfig.PATH_MODULE_PLACE_ACTIVITY_PLACEDETAIL)
|
||||
.withString("id", placeListBean.getVenuesInfoId())
|
||||
.withString("title", placeListBean.getVenueName())
|
||||
.navigation();
|
||||
}
|
||||
|
||||
private void showAppraiseDialog() {
|
||||
BottomAppRaiseDialog dialog = new BottomAppRaiseDialog.DialogBuilder(mActivity)
|
||||
.setActivity(mActivity)
|
||||
.setIscancelable(true)
|
||||
.setIscancelable(true)
|
||||
.build();
|
||||
.setActivity(mActivity)
|
||||
.setIscancelable(true)
|
||||
.setIscancelable(true)
|
||||
.build();
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
@ -181,37 +175,37 @@ public class PlaceMainfragment extends BaseFragment {
|
||||
*/
|
||||
private void getFuncList() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(ApiPlace.class)
|
||||
.getPlaceTypeList(PathConfig.PLACE_TYPE_ID)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<PlaceFuncBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mDisposable = d;
|
||||
}
|
||||
.create(ApiPlace.class)
|
||||
.getPlaceTypeList(PathConfig.PLACE_TYPE_ID)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<PlaceFuncBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mDisposable = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(PlaceFuncBean placeFuncBean) {
|
||||
if (placeFuncBean.getData() != null && placeFuncBean.getData().size() > 0) {
|
||||
mRlvPlaceType.setVisibility(View.VISIBLE);
|
||||
mFuncDatas = placeFuncBean.getData();
|
||||
mFuncAdapter.setData(mFuncDatas);
|
||||
} else {
|
||||
mRlvPlaceType.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
@Override
|
||||
public void onNext(PlaceFuncBean placeFuncBean) {
|
||||
if (placeFuncBean.getData() != null && placeFuncBean.getData().size() > 0) {
|
||||
mRlvPlaceType.setVisibility(View.VISIBLE);
|
||||
mFuncDatas = placeFuncBean.getData();
|
||||
mFuncAdapter.setData(mFuncDatas);
|
||||
} else {
|
||||
mRlvPlaceType.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
mRlvPlaceType.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -249,67 +243,67 @@ public class PlaceMainfragment extends BaseFragment {
|
||||
*/
|
||||
private void getPlaceListByOrder(int currentPage, String currentType) {
|
||||
RetrofitManager.getInstance()
|
||||
.create(ApiPlace.class)
|
||||
.getPlaceByOrder(UserLgUtils.getLocationLat(), UserLgUtils.getLocationLng(), currentType, currentPage + "", "10")
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<PlaceListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mOrderDis = d;
|
||||
}
|
||||
.create(ApiPlace.class)
|
||||
.getPlaceByOrder(UserLgUtils.getLocationLat(), UserLgUtils.getLocationLng(), currentType, currentPage + "", "10")
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<PlaceListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mOrderDis = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(PlaceListBean placeListBean) {
|
||||
if (mRlvSkeleton != null) {
|
||||
mRlvSkeleton.hide();
|
||||
}
|
||||
if (currentPage == 1) {
|
||||
if (placeListBean != null && placeListBean.getRows().size() > 0) {
|
||||
if ("apart".equals(mCurrentType)) {
|
||||
mTotalPage = 10;
|
||||
mDatas = placeListBean.getRows();
|
||||
mAdapter.setData(mDatas);
|
||||
refreshStateView(STATE_SUCCESS);
|
||||
} else {
|
||||
mTotalPage = placeListBean.getTotal();
|
||||
mDatas = placeListBean.getRows();
|
||||
mAdapter.setData(mDatas);
|
||||
refreshStateView(STATE_SUCCESS);
|
||||
}
|
||||
} else {
|
||||
refreshStateView(STATE_EMPTY);
|
||||
}
|
||||
mSrlPlaceContent.finishRefresh();
|
||||
} else {
|
||||
if (placeListBean != null) {
|
||||
mDatas.addAll(placeListBean.getRows());
|
||||
@Override
|
||||
public void onNext(PlaceListBean placeListBean) {
|
||||
if (mRlvSkeleton != null) {
|
||||
mRlvSkeleton.hide();
|
||||
}
|
||||
if (currentPage == 1) {
|
||||
if (placeListBean != null && placeListBean.getRows().size() > 0) {
|
||||
if ("apart".equals(mCurrentType)) {
|
||||
mTotalPage = 10;
|
||||
mDatas = placeListBean.getRows();
|
||||
mAdapter.setData(mDatas);
|
||||
mSrlPlaceContent.finishLoadMore();
|
||||
refreshStateView(STATE_SUCCESS);
|
||||
} else {
|
||||
mSrlPlaceContent.setNoMoreData(true);
|
||||
mTotalPage = placeListBean.getTotal();
|
||||
mDatas = placeListBean.getRows();
|
||||
mAdapter.setData(mDatas);
|
||||
refreshStateView(STATE_SUCCESS);
|
||||
}
|
||||
} else {
|
||||
refreshStateView(STATE_EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
if (mRlvSkeleton != null) {
|
||||
mRlvSkeleton.hide();
|
||||
}
|
||||
if (currentPage == 1) {
|
||||
refreshStateView(STATE_ERROR);
|
||||
}
|
||||
ExceptionHandler.handleException(e);
|
||||
mSrlPlaceContent.finishRefresh();
|
||||
mSrlPlaceContent.finishLoadMore();
|
||||
} else {
|
||||
if (placeListBean != null) {
|
||||
mDatas.addAll(placeListBean.getRows());
|
||||
mAdapter.setData(mDatas);
|
||||
mSrlPlaceContent.finishLoadMore();
|
||||
} else {
|
||||
mSrlPlaceContent.setNoMoreData(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
if (mRlvSkeleton != null) {
|
||||
mRlvSkeleton.hide();
|
||||
}
|
||||
});
|
||||
if (currentPage == 1) {
|
||||
refreshStateView(STATE_ERROR);
|
||||
}
|
||||
ExceptionHandler.handleException(e);
|
||||
mSrlPlaceContent.finishRefresh();
|
||||
mSrlPlaceContent.finishLoadMore();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -17,15 +17,17 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
*/
|
||||
public class PlaceListHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvTitle;
|
||||
public TextView mTvSee;
|
||||
public TextView mTvDistance;
|
||||
public TextView mTvTime;
|
||||
public ImageView mIvCover;
|
||||
public TextView mTvAddress;
|
||||
public TextView mTvPhone;
|
||||
|
||||
public PlaceListHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvTitle = itemView.findViewById(R.id.tv_title);
|
||||
mTvSee = itemView.findViewById(R.id.tv_see);
|
||||
mTvAddress = itemView.findViewById(R.id.tv_address);
|
||||
mTvPhone = itemView.findViewById(R.id.tv_phone);
|
||||
mTvDistance = itemView.findViewById(R.id.tv_distance);
|
||||
mTvTime = itemView.findViewById(R.id.tv_time);
|
||||
mIvCover = itemView.findViewById(R.id.iv_cover);
|
||||
|
@ -1,137 +1,133 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/srl_place_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_place_type"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:itemCount="10"
|
||||
tools:layoutManager="GridLayoutManager"
|
||||
tools:listitem="@layout/item_place_func"
|
||||
tools:orientation="horizontal" />
|
||||
android:scrollbars="none">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/gray_line" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_taxis"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:padding="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_default"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sel_rb_check_red_white"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="默认排序"
|
||||
android:textColor="@color/col_btn_blue_white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_moods"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sel_rb_check_red_white"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="人气最高"
|
||||
android:textColor="@color/col_btn_blue_white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_dis"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sel_rb_check_red_white"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="离我最近"
|
||||
android:textColor="@color/col_btn_blue_white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_news"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sel_rb_check_red_white"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="最新发布"
|
||||
android:textColor="@color/col_btn_blue_white"
|
||||
android:textSize="16sp" />
|
||||
</RadioGroup>
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl_place_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_fragment_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_hint_place_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb_fragment_place_loading"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:indeterminateBehavior="repeat"
|
||||
android:indeterminateDrawable="@drawable/anim_loading_pic" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_fragment_place_empty_data"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/ic_empty_data" />
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_fragment_place_error_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:clickable="true"
|
||||
android:textColor="@color/black"
|
||||
tools:text="加载数据失败" />
|
||||
</LinearLayout>
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray_bg"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_place_content"
|
||||
android:id="@+id/rlv_place_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/item_place_list" />
|
||||
</FrameLayout>
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/shape_rectangle_white"
|
||||
tools:itemCount="10"
|
||||
tools:layoutManager="GridLayoutManager"
|
||||
tools:listitem="@layout/item_place_func"
|
||||
tools:orientation="horizontal" />
|
||||
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
</LinearLayout>
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_taxis"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_default"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="默认排序"
|
||||
android:textColor="@color/col_btn_blue_white" />
|
||||
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_moods"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="人气最高"
|
||||
android:textColor="@color/col_btn_blue_white" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_dis"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="离我最近"
|
||||
android:textColor="@color/col_btn_blue_white" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_news"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="最新发布"
|
||||
android:textColor="@color/col_btn_blue_white" />
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_fragment_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_hint_place_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb_fragment_place_loading"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:indeterminateBehavior="repeat"
|
||||
android:indeterminateDrawable="@drawable/anim_loading_pic" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_fragment_place_empty_data"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/ic_empty_data" />
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_fragment_place_error_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:clickable="true"
|
||||
android:textColor="@color/black"
|
||||
tools:text="加载数据失败" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_place_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/item_place_list" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
@ -27,6 +27,6 @@
|
||||
android:singleLine="true"
|
||||
android:textColor="#242424"
|
||||
android:textSize="10sp"
|
||||
app:text_type_cus="1"
|
||||
app:text_type_cus="5"
|
||||
tools:text="基层文化中心" />
|
||||
</LinearLayout>
|
@ -15,91 +15,106 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
android:scaleType="fitXY"
|
||||
tools:src="@drawable/ic_img_default" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@drawable/shape_status_black"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="4dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:src="@drawable/ic_eye" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_see"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
tools:text="234234" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp">
|
||||
android:padding="5dp">
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_title"
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:padding="3dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="#242424"
|
||||
android:textSize="16sp"
|
||||
tools:text="体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆" />
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp">
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:padding="3dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="#242424"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆体育馆" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_clock_yellow_icon"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="5dp"
|
||||
android:textColor="#242424"
|
||||
android:textSize="12sp"
|
||||
tools:text="开闭馆时间" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textSize="12sp"
|
||||
tools:text="地址地址地址地址地址地址地址地址地址地址地址地址地址地址地址地址地址地址地址地址地址地址" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_distance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:textSize="12sp"
|
||||
tools:text="距您188.21km" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cover"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitXY"
|
||||
tools:src="@drawable/ic_img_default" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_distance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/shape_btn_red_re_9f_88"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:maxLines="1"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/app_title"
|
||||
android:textSize="12sp"
|
||||
tools:text="距您188.21km" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@color/base_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:id="@+id/tv_phone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:padding="3dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:drawableLeft="@drawable/ic_phone_blue_icon"
|
||||
android:drawablePadding="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:textColor="#242424"
|
||||
android:textSize="10sp"
|
||||
tools:text="开闭馆时间" />
|
||||
tools:text="联系电话" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
Loading…
Reference in New Issue
Block a user