Android仿拉手網(wǎng)團購App我的收藏界面實例代碼
更新時間:2017年05月19日 09:02:59 作者:ganchuanpu
這篇文章主要介紹了Android仿拉手團購網(wǎng)App我的收藏界面實例代碼,需要的朋友可以參考下
先給大家展示效果圖,如果感覺還不錯,請參考實例代碼
效果圖如下所示:
具體代碼如下:
private void initData() { BmobManager.getInstance(new BmobQueryCallback() { @Override public void onQuerySuccess(List<? extends BaseModel> dataList) { mDataList.clear(); List<FavorModel> list = (List<FavorModel>) dataList; if (list == null || list.size()==0) { mListView.setVisibility(View.GONE); mErrorLayout.setVisibility(View.VISIBLE); } else { mDataList.addAll(list); mAdapter.notifyDataSetChanged(); mListView.setVisibility(View.VISIBLE); mErrorLayout.setVisibility(View.GONE); } } @Override public void onQueryFailure(BmobException e) { mListView.setVisibility(View.GONE); mErrorLayout.setVisibility(View.VISIBLE); } }).queryFavorData(AppConstant.KEY_USER_ID, User.getCurrentUser().getObjectId()); }
activity_collect.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="@color/bg_common_gray" tools:context="com.myxh.coolshopping.ui.activity.CollectActivity"> <RelativeLayout android:layout_width="match_parent" android:layout_height="@dimen/common_titleBar_height" android:background="@color/title_bar_color"> <ImageView android:id="@+id/collect_titleBar_iv_back" style="@style/common_left_back_imageView_style"/> <TextView style="@style/base_textView_style" android:layout_centerInParent="true" android:gravity="center_vertical" android:text="@string/my_collection" android:textSize="@dimen/login_titleBar_login_size" android:textColor="@color/textColor_32"/> <TextView android:id="@+id/collect_titleBar_tv_manager" style="@style/common_right_title_textView_style" android:gravity="center" android:text="@string/collect_titleBar_manager" android:textColor="@color/orange" android:textSize="@dimen/login_titleBar_register_size"/> </RelativeLayout> <View style="@style/me_horizontal_view_style"/> <ListView android:id="@+id/collect_listView" android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="gone"/> <LinearLayout android:id="@+id/collect_error_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center"> <TextView android:id="@+id/collect_error_tv" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:drawableTop="@mipmap/net_failed" android:drawablePadding="10dp" android:text="@string/collect_have_no_collection" android:textColor="@color/gray01" android:textSize="@dimen/textSize_16" android:visibility="visible"/> </LinearLayout> </LinearLayout>
以上所述是小編給大家介紹的Android仿拉手團購App我的收藏界面實例代碼,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
您可能感興趣的文章:
相關(guān)文章
Android編程實現(xiàn)Toast自定義布局簡單示例
這篇文章主要介紹了Android編程實現(xiàn)Toast自定義布局的方法,結(jié)合簡單實例形式分析了Toast自定義布局的實現(xiàn)步驟與相關(guān)操作技巧,需要的朋友可以參考下2017-02-02Android使用相機實現(xiàn)拍照存儲及展示功能詳解
這篇文章主要介紹了Android使用相機實現(xiàn)拍照存儲及展示功能,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習或者工作具有一定的參考學(xué)習價值,需要的朋友們下面隨著小編來一起學(xué)習吧2023-01-01Android顏色處理SweepGradient掃描及梯度渲染示例
這篇文章主要為大家介紹了Android顏色處理SweepGradient掃描渲染及梯度渲染示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪2022-06-06解決android.support.v4.content.FileProvide找不到的問題
這篇文章主要介紹了解決android.support.v4.content.FileProvide找不到的問題,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2020-03-03Android破解微信獲取聊天記錄和通訊錄信息(靜態(tài)方式)
這篇文章主要介紹了Android以靜態(tài)方式破解微信獲取聊天記錄和通訊錄信息,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下2016-08-08