Commit bc9eddbf authored by Qiwei Ni's avatar Qiwei Ni
Browse files

Millores petites

parent 78a5dce6
......@@ -43,7 +43,7 @@ public class BeaconActivity extends AppCompatActivity {
beaconAddr = (TextView) findViewById(R.id.addr_info);
beaconName.setText(beacon.beaconInfo.name);
beaconDistance.setText(String.valueOf(beacon.beaconDevice.distance));
beaconDistance.setText(String.format("%.01fm", beacon.beaconDevice.distance));
beaconAddr.setText(beacon.beaconInfo.addr);
recyclerView = (RecyclerView) findViewById(R.id.notification_list);
......
......@@ -74,7 +74,7 @@ public class BeaconAdapter extends RecyclerView.Adapter<BeaconAdapter.ViewHolder
Log.e("info", beacon.beaconDevice.uuid);
holder.textViewName.setText(beacon.beaconInfo.name);
holder.textViewInfo.setText(beacon.beaconInfo.addr);
holder.textViewDistance.setText(String.valueOf(beacon.beaconDevice.distance));
holder.textViewDistance.setText(String.format("%.01fm", beacon.beaconDevice.distance));
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(activity);
holder.list.setLayoutManager(linearLayoutManager);
......
......@@ -30,7 +30,6 @@ public class NotificationAdapter extends RecyclerView.Adapter<NotificationAdapte
NetworkImageView networkImageView;
TextView textViewName;
TextView textViewInfo;
TextView textViewDistance;
public ViewHolder(View itemView) {
super(itemView);
......
......@@ -74,7 +74,7 @@ public class NotificationCardviewAdapter extends RecyclerView.Adapter<Notificati
holder.networkImageView.setVisibility(View.GONE);
}
holder.textViewDistance.setText(String.valueOf(notification.beacon.beaconDevice.distance));
holder.textViewDistance.setText(String.format("%.01fm", notification.beacon.beaconDevice.distance));
holder.textViewBeaconName.setText(notification.beacon.beaconInfo.name);
holder.textViewBeaconAdr.setText(notification.beacon.beaconInfo.addr);
}
......
......@@ -61,28 +61,6 @@
android:maxLines="1"
android:paddingRight="20dp"
android:text="holaaaaaaa"/>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true">
<ImageView
android:id="@+id/image_place"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_place_black_18dp"
android:tint="@color/colorDivider"
android:paddingRight="3dp"
android:layout_alignBottom="@+id/beacon_distance"/>
<TextView
android:id="@+id/beacon_distance"
android:layout_toRightOf="@+id/image_place"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="3m"/>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
......
......@@ -8,7 +8,7 @@
android:title="Notificacions" />
<item
android:id="@+id/nav_beacon"
android:icon="@mipmap/ic_favorite_white_24dp"
android:icon="@mipmap/ic_place_white_24dp"
android:title="Locals" />
</menu>
</item>
......
<resources>
<string name="app_name">Client</string>
<string name="app_name">Notificacions</string>
<string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment