Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <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="horizontal"
- android:weightSum="1"
- tools:background="@color/black"
- android:id="@+id/dotw_list">
- <ImageButton
- android:id="@+id/dotw_imageButton_1"
- android:layout_width="60dp"
- android:layout_height="60dp"
- android:layout_marginBottom="10dp"
- android:layout_marginLeft="10dp"
- android:layout_marginRight="10dp"
- android:layout_marginTop="10dp"
- android:adjustViewBounds="false"
- android:background="@drawable/layout_bg"
- android:padding="5dp"
- android:scaleType="centerInside"/>
- <ImageButton
- android:id="@+id/dotw_imageButton_2"
- android:layout_width="60dp"
- android:layout_height="60dp"
- android:layout_marginBottom="10dp"
- android:layout_marginRight="10dp"
- android:layout_marginTop="10dp"
- android:adjustViewBounds="false"
- android:background="@drawable/layout_bg"
- android:padding="10dp"
- android:scaleType="centerInside"/>
- <ImageButton
- android:id="@+id/dotw_imageButton_3"
- android:layout_width="60dp"
- android:layout_height="60dp"
- android:layout_marginBottom="10dp"
- android:layout_marginRight="10dp"
- android:layout_marginTop="10dp"
- android:adjustViewBounds="false"
- android:background="@drawable/layout_bg"
- android:padding="10dp"
- android:scaleType="centerInside"/>
- <ImageButton
- android:id="@+id/dotw_imageButton_4"
- android:layout_width="60dp"
- android:layout_height="60dp"
- android:layout_marginBottom="10dp"
- android:layout_marginRight="10dp"
- android:layout_marginTop="10dp"
- android:adjustViewBounds="false"
- android:background="@drawable/layout_bg"
- android:padding="10dp"
- android:scaleType="centerInside"/>
- <ImageButton
- android:id="@+id/dotw_imageButton_5"
- android:layout_width="60dp"
- android:layout_height="60dp"
- android:layout_marginBottom="10dp"
- android:layout_marginRight="10dp"
- android:layout_marginTop="10dp"
- android:adjustViewBounds="false"
- android:background="@drawable/layout_bg"
- android:padding="10dp"
- android:scaleType="centerInside"/>
- </LinearLayout>
- private BroadcastReceiver mMessageReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- // Get extra data included in the Intent
- String message = intent.getStringExtra("network_response");
- Log.d("receiver", "Got message: " + message);
- home = data.getHomeItem();
- try {
- for (int i = 0; i < home.dotwItemArray.size(); i++) {
- System.out.println("Size of DOTW Array for the home screen is " + home.dotwItemArray.size());
- DotwItem dotwItem = home.dotwItemArray.get(i);
- if (i == 0) {
- request.getImage(dotwItem.getThumbnailImageUrl(), button_dotw_1);
- System.out.println("dotwItem1 is set");
- }
- if (i == 1) {
- request.getImage(dotwItem.getThumbnailImageUrl(), button_dotw_2);
- System.out.println("dotwItem2 is set");
- }
- if (i == 2) {
- request.getImage(dotwItem.getThumbnailImageUrl(), button_dotw_3);
- System.out.println("dotwItem3 is set");
- }
- if (i == 3) {
- request.getImage(dotwItem.getThumbnailImageUrl(), button_dotw_4);
- System.out.println("dotwItem4 is set");
- }
- }
- } catch (Exception e) {
- System.out.println("Error is: " + e + " - Exception is it: " + e.getStackTrace()[2].getLineNumber());
- }
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement