Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/UI #6

Merged
merged 2 commits into from
Apr 11, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
delete menu in OnCreateOptionsMenu(connect button)
  • Loading branch information
nima-abdpoor committed Apr 11, 2021
commit 628488bd63deaa022fe90a3f0c8c8ba986f0c877
Original file line number Diff line number Diff line change
Expand Up @@ -413,22 +413,6 @@ class ChatFragment : Fragment() {
mChatService!!.connect(device, true)
}

override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
inflater.inflate(R.menu.chat_fragment_menu, menu)
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.connect_scan -> {
// val serverIntent = Intent(activity, DeviceListActivity::class.java)
// startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE_SECURE)
connectDevice()
return true
}
}
return false
}

override fun onStart() {
super.onStart()
if (!mBluetoothAdapter!!.isEnabled) {
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/fragment_bluetooth_chat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@
android:layout_gravity="center"
android:textDirection="rtl"
android:layout_weight="8"
android:layout_margin="5dp"
android:layout_margin="3dp"
android:background="@drawable/bg_meessage"
android:maxLines="6"
android:padding="10dp"
android:padding="7dp"
android:textSize="16sp" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_margin="1dp"
android:background="@drawable/ic_circular_image"
>

Expand Down