| | |
| | | android:theme="@style/Theme.AGVController" |
| | | tools:targetApi="31" > |
| | | <activity |
| | | android:name=".MainActivity" |
| | | android:exported="false" /> |
| | | <activity |
| | | android:name=".StartActivity" |
| | | android:exported="true" > |
| | | <intent-filter> |
| | |
| | | return itemList.size(); |
| | | } |
| | | } |
| | | |
| | | public void addItem (Item item) { |
| | | itemList.add(item); |
| | | notifyItemInserted(itemList.size() - 1); |
| | | } |
| | | } |
| | |
| | | |
| | | adapter = new ItemAdapter(items); |
| | | recyclerView.setAdapter(adapter); |
| | | adapter.addItem(new Item("AGV-3948", "192.168.4.188:56487", "Description of Item 1")); |
| | | } |
| | | } |
| | |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textSize="18sp" |
| | | android:text="暂无设备连接"/> |
| | | android:text="等待设备连接..." |
| | | android:layout_gravity="center"/> |
| | | </LinearLayout> |