仿拉手團購App10-- 我的收藏界面

来源:http://www.cnblogs.com/ganchuanpu/archive/2017/05/17/6869624.html
-Advertisement-
Play Games

activity_collect.xml ...


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>

  

 

  

 


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 一、安裝express前面都講了 1.express。 cnpm || npm install express --save 2.中間件 a.cnpm || npm install body-parser --save 當post請求的時候,需要用這個中間件來處理參數 b.cnpm || npm i ...
  • 1.什麼是全形和半形? 全形:是一種電腦字元,是指一個全形字元占用兩個標準字元(或兩個半形字元)的位置。全形占兩個位元組。 漢字字元和規定了全形的英文字元及國標GB2312-80中的圖形符號和特殊字元都是全形字元。在全形中,字母和數字等與漢字一樣占據著等寬的位置。 半形:是指一個字元占用一個標準的字元 ...
  • HTML: CSS: HTML: css: ...
  • 1,先搞個java jdk。我先用的1.7版本的,用cordova打包的時候各種報錯,應該是向下不相容吧。又換了個1.8版本。裝jdk一定要註意jdk跟jre不能都裝在目標文件夾的根目錄下,jdk跟jre在同一文件夾下會報錯。 2,裝完之後,要配置下環境變數,電腦→屬性→高級系統設置→高級→環境變 ...
  • 一,效果圖。 二,工程圖。 三,代碼。 AppDelegate.h AppDelegate.m ...
  • 一、我們先解釋一下他的含義: 1、Token的引入:Token是在客戶端頻繁向服務端請求數據,服務端頻繁的去資料庫查詢用戶名和密碼併進行對比,判斷用戶名和密碼正確與否,並作出相應提示,在這樣的背景下,Token便應運而生。 2、Token的定義:Token是服務端生成的一串字元串,以作客戶端進行請求 ...
  • 首先,需要一個電話號碼,目前很多賬戶都是將賬戶名設置成手機號,然後點擊按鈕獲取手機驗證碼。 其次,你需要後臺給你手機簡訊的驗證介面,各個公司用的不一樣,這個身為前端,不需要你來考慮,你只要讓你後臺給你寫好介面,你直接調用就好了。 activity_login.xml LoginActivity.ja ...
  • 1.阿裡巴巴的熱修複框架(AndFix) 1 . 添加依賴2. 儘可能早的載入補丁3. 修複bug,生成沒有bug的apk文件4. 對比新舊apk生成.apatch補丁文件5. 載入新補丁,修複bug http://blog.csdn.net/qq_17250009/article/details/ ...
一周排行
    -Advertisement-
    Play Games
  • 前言 本文介紹一款使用 C# 與 WPF 開發的音頻播放器,其界面簡潔大方,操作體驗流暢。該播放器支持多種音頻格式(如 MP4、WMA、OGG、FLAC 等),並具備標記、實時歌詞顯示等功能。 另外,還支持換膚及多語言(中英文)切換。核心音頻處理採用 FFmpeg 組件,獲得了廣泛認可,目前 Git ...
  • OAuth2.0授權驗證-gitee授權碼模式 本文主要介紹如何筆者自己是如何使用gitee提供的OAuth2.0協議完成授權驗證並登錄到自己的系統,完整模式如圖 1、創建應用 打開gitee個人中心->第三方應用->創建應用 創建應用後在我的應用界面,查看已創建應用的Client ID和Clien ...
  • 解決了這個問題:《winForm下,fastReport.net 從.net framework 升級到.net5遇到的錯誤“Operation is not supported on this platform.”》 本文內容轉載自:https://www.fcnsoft.com/Home/Sho ...
  • 國內文章 WPF 從裸 Win 32 的 WM_Pointer 消息獲取觸摸點繪製筆跡 https://www.cnblogs.com/lindexi/p/18390983 本文將告訴大家如何在 WPF 裡面,接收裸 Win 32 的 WM_Pointer 消息,從消息裡面獲取觸摸點信息,使用觸摸點 ...
  • 前言 給大家推薦一個專為新零售快消行業打造了一套高效的進銷存管理系統。 系統不僅具備強大的庫存管理功能,還集成了高性能的輕量級 POS 解決方案,確保頁面載入速度極快,提供良好的用戶體驗。 項目介紹 Dorisoy.POS 是一款基於 .NET 7 和 Angular 4 開發的新零售快消進銷存管理 ...
  • ABP CLI常用的代碼分享 一、確保環境配置正確 安裝.NET CLI: ABP CLI是基於.NET Core或.NET 5/6/7等更高版本構建的,因此首先需要在你的開發環境中安裝.NET CLI。這可以通過訪問Microsoft官網下載並安裝相應版本的.NET SDK來實現。 安裝ABP ...
  • 問題 問題是這樣的:第三方的webapi,需要先調用登陸介面獲取Cookie,訪問其它介面時攜帶Cookie信息。 但使用HttpClient類調用登陸介面,返回的Headers中沒有找到Cookie信息。 分析 首先,使用Postman測試該登陸介面,正常返回Cookie信息,說明是HttpCli ...
  • 國內文章 關於.NET在中國為什麼工資低的分析 https://www.cnblogs.com/thinkingmore/p/18406244 .NET在中國開發者的薪資偏低,主要因市場需求、技術棧選擇和企業文化等因素所致。歷史上,.NET曾因微軟的閉源策略發展受限,儘管後來推出了跨平臺的.NET ...
  • 在WPF開發應用中,動畫不僅可以引起用戶的註意與興趣,而且還使軟體更加便於使用。前面幾篇文章講解了畫筆(Brush),形狀(Shape),幾何圖形(Geometry),變換(Transform)等相關內容,今天繼續講解動畫相關內容和知識點,僅供學習分享使用,如有不足之處,還請指正。 ...
  • 什麼是委托? 委托可以說是把一個方法代入另一個方法執行,相當於指向函數的指針;事件就相當於保存委托的數組; 1.實例化委托的方式: 方式1:通過new創建實例: public delegate void ShowDelegate(); 或者 public delegate string ShowDe ...