Guest User

Untitled

a guest
Jan 21st, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.59 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout
  3. xmlns:android="http://schemas.android.com/apk/res/android"
  4. xmlns:tools="http://schemas.android.com/tools"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. xmlns:app="http://schemas.android.com/apk/res-auto"
  8. tools:context="com.vuqo.shopogram.SellerProductsActivity">
  9.  
  10. <android.support.v7.widget.Toolbar
  11. android:id="@+id/sltoolbar"
  12. android:layout_width="match_parent"
  13. android:layout_height="?attr/actionBarSize"
  14. android:background="?attr/colorPrimary"
  15. app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
  16. app:titleTextColor="@color/white"
  17. app:title="Satıcı"
  18. app:popupTheme="@style/AppTheme.PopupOverlay">
  19. </android.support.v7.widget.Toolbar>
  20.  
  21. <android.support.v4.widget.NestedScrollView
  22. android:id="@+id/slscroll"
  23. android:layout_width="match_parent"
  24. android:layout_height="match_parent"
  25. android:layout_above="@id/add_sell_detail"
  26. android:layout_below="@id/sltoolbar">
  27.  
  28. <LinearLayout
  29. android:orientation="vertical"
  30. android:layout_width="match_parent"
  31. android:layout_height="match_parent">
  32.  
  33. <RelativeLayout
  34. android:background="@color/white"
  35. android:layout_width="match_parent"
  36. android:layout_height="match_parent">
  37.  
  38. <ImageView
  39. android:id="@+id/backImage2"
  40. android:layout_width="match_parent"
  41. android:layout_height="200dp"
  42. android:layout_alignParentLeft="true"
  43. android:layout_alignParentStart="true"
  44. android:layout_alignParentTop="true"
  45. android:scaleType="centerCrop"
  46. android:src="@drawable/backimg" />
  47.  
  48. <com.vuqo.shopogram.CircleImage
  49. android:id="@+id/shop_image"
  50. android:layout_width="100dp"
  51. android:layout_height="100dp"
  52. android:layout_alignParentTop="true"
  53. android:layout_centerHorizontal="true"
  54. android:layout_marginTop="150dp"
  55. android:contentDescription="@string/todo"
  56. android:scaleType="fitCenter"
  57. android:src="@drawable/user" />
  58.  
  59. <TextView
  60. android:id="@+id/nameofshop"
  61. android:layout_width="wrap_content"
  62. android:layout_height="wrap_content"
  63. android:layout_below="@id/shop_image"
  64. android:layout_centerHorizontal="true"
  65. android:padding="5dp"
  66. android:text="@string/todo"
  67. android:textColor="@color/black"
  68. android:textSize="16sp" />
  69.  
  70.  
  71. <TextView
  72. android:id="@+id/shop_descCard"
  73. android:layout_width="match_parent"
  74. android:layout_height="wrap_content"
  75. android:layout_below="@id/nameofshop"
  76. android:background="@color/white"
  77. android:padding="10dp"
  78. android:text="@string/todo"
  79. android:textColor="@color/black"
  80. android:textSize="18sp" />
  81.  
  82. </RelativeLayout>
  83.  
  84. <LinearLayout
  85. android:id="@+id/filtersLinear"
  86. android:layout_width="match_parent"
  87. android:layout_height="wrap_content"
  88. android:layout_below="@id/shop_descCard"
  89. android:layout_marginTop="10dp"
  90. android:orientation="horizontal"
  91. android:paddingEnd="10dp"
  92. android:paddingLeft="10dp"
  93. android:paddingRight="10dp"
  94. android:paddingStart="10dp">
  95.  
  96. <android.support.v7.widget.AppCompatSpinner
  97. android:id="@+id/pricefilterspin"
  98. android:layout_width="0dp"
  99. android:layout_height="40dp"
  100. android:layout_gravity="center_vertical"
  101. android:layout_weight="3">
  102.  
  103. </android.support.v7.widget.AppCompatSpinner>
  104.  
  105. <Button
  106. android:id="@+id/viewchange"
  107. android:layout_width="40dp"
  108. android:layout_height="40dp"
  109. android:background="@drawable/list" />
  110.  
  111. <Button
  112. android:id="@+id/filterbutton"
  113. android:layout_width="40dp"
  114. android:layout_height="40dp"
  115. android:layout_marginLeft="5dp"
  116. android:layout_marginStart="5dp"
  117. android:background="@drawable/filter" />
  118. </LinearLayout>
  119.  
  120. <RelativeLayout
  121. android:layout_width="match_parent"
  122. android:layout_height="1000dp">
  123. <android.support.v7.widget.RecyclerView
  124. android:id="@+id/shop_recycler"
  125. android:layout_width="match_parent"
  126. android:layout_height="wrap_content">
  127. </android.support.v7.widget.RecyclerView>
  128. </RelativeLayout>
  129.  
  130. <ProgressBar
  131. android:id="@+id/sellerprprogress"
  132. android:layout_width="wrap_content"
  133. android:layout_gravity="center"
  134. android:layout_height="wrap_content" />
  135.  
  136. <TextView
  137. android:id="@+id/empty_seller_products"
  138. android:layout_width="wrap_content"
  139. android:layout_gravity="center"
  140. android:layout_height="wrap_content"
  141. android:text="@string/m_hsul_tap_lmad"
  142. android:textColor="@color/black"
  143. android:textSize="20sp"
  144. android:visibility="gone" />
  145.  
  146. </LinearLayout>
  147.  
  148. </android.support.v4.widget.NestedScrollView>
  149. </RelativeLayout>
  150.  
  151. list = new ArrayList<>();
  152. recyclerView = findViewById(R.id.shop_recycler);
  153. recyclerView.setHasFixedSize(true);
  154. recyclerView.setLayoutManager(grid);
  155. recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
  156. @Override
  157. public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
  158. super.onScrollStateChanged(recyclerView, newState);
  159. if(adapter.isEnd()){
  160. if(page<pages)
  161. page++;
  162. query.setPage(page);
  163. UpdateList();
  164. adapter.setEnd(false);
  165. }
  166. }
  167. });
Add Comment
Please, Sign In to add comment