欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Android仿拉手網(wǎng)團購App我的收藏界面實例代碼

 更新時間:2017年05月19日 09:02:59   作者:ganchuanpu  
這篇文章主要介紹了Android仿拉手團購網(wǎng)App我的收藏界面實例代碼,需要的朋友可以參考下

先給大家展示效果圖,如果感覺還不錯,請參考實例代碼

效果圖如下所示:

http://img.jbzj.com/file_images/article/201705/201751990058373.png?20174199110

具體代碼如下:

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自定義布局簡單示例

    這篇文章主要介紹了Android編程實現(xiàn)Toast自定義布局的方法,結(jié)合簡單實例形式分析了Toast自定義布局的實現(xiàn)步驟與相關(guān)操作技巧,需要的朋友可以參考下
    2017-02-02
  • Android使用相機實現(xiàn)拍照存儲及展示功能詳解

    Android使用相機實現(xiàn)拍照存儲及展示功能詳解

    這篇文章主要介紹了Android使用相機實現(xiàn)拍照存儲及展示功能,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習或者工作具有一定的參考學(xué)習價值,需要的朋友們下面隨著小編來一起學(xué)習吧
    2023-01-01
  • Android自定義單選多選下拉列表的實例代碼

    Android自定義單選多選下拉列表的實例代碼

    本篇文章主要介紹了Android自定義單選多選下拉列表的實例代碼,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2017-07-07
  • Android 中的 Runtime詳解

    Android 中的 Runtime詳解

    Runtime 是 Android 系統(tǒng)中的核心組件之一,它提供了執(zhí)行應(yīng)用程序代碼的環(huán)境,并影響著應(yīng)用程序的性能和響應(yīng)性能,這篇文章主要介紹了Android 中的 Runtime,需要的朋友可以參考下
    2024-01-01
  • Android顏色處理SweepGradient掃描及梯度渲染示例

    Android顏色處理SweepGradient掃描及梯度渲染示例

    這篇文章主要為大家介紹了Android顏色處理SweepGradient掃描渲染及梯度渲染示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
    2022-06-06
  • AsyncTask類實例詳解

    AsyncTask類實例詳解

    這篇文章主要介紹了AsyncTask類實例詳解
    2017-10-10
  • 解決android.support.v4.content.FileProvide找不到的問題

    解決android.support.v4.content.FileProvide找不到的問題

    這篇文章主要介紹了解決android.support.v4.content.FileProvide找不到的問題,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2020-03-03
  • Android破解微信獲取聊天記錄和通訊錄信息(靜態(tài)方式)

    Android破解微信獲取聊天記錄和通訊錄信息(靜態(tài)方式)

    這篇文章主要介紹了Android以靜態(tài)方式破解微信獲取聊天記錄和通訊錄信息,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2016-08-08
  • Android硬件解碼組件MediaCodec使用教程

    Android硬件解碼組件MediaCodec使用教程

    在Android開發(fā)中提供了實現(xiàn)音視頻編解碼工具MediaCodec,針對對應(yīng)音視頻解碼類型通過該類創(chuàng)建對應(yīng)解碼器就能實現(xiàn)對數(shù)據(jù)進行解碼操作。本文通過示例詳細講解了MediaCodec的使用,需要的可以參考一下
    2022-11-11
  • Android自定義View繪制的方法及過程(二)

    Android自定義View繪制的方法及過程(二)

    這篇文章主要解析了Android自定義View繪制的方法及過程,介紹了onSizeChanged、onDraw、onMeasure順序,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2017-03-03

最新評論