Skip to content

Conversation

@ho-dor
Copy link

@ho-dor ho-dor commented Jun 19, 2019

Fixes #1803

Changes: Added bottomsheet guide for robotic arm.

Screenshot/s for the changes:
20190619_191608

Checklist: [Please tick following check boxes with [x] if the respective task is completed]

  • I have used resources from strings.xml, dimens.xml and colors.xml without hard-coding them
  • No modifications done at the end of resource files strings.xml, dimens.xml or colors.xml
  • I have reformatted code in every file included in this PR [CTRL+ALT+L]
  • My code does not contain any extra lines or extra spaces
  • I have requested reviews from other members

APK for testing:
guide.zip

@ho-dor
Copy link
Author

ho-dor commented Jun 19, 2019

@CloudyPadmal @neel1998 i have a doubt , the bottomsheet requires Co-cordinatorLayout as parent and hence , returning null when I try to add it to robotic arm as it has linear layout and changing it to co-ordinator layout is messing it up completely . So , what should I do ? Use something else and not bottomsheet or build the UI of robotic arm with co-ordinator layout again ?

@neel1998
Copy link
Member

Have you tried passing liners layout to bottom sheet?

@ho-dor
Copy link
Author

ho-dor commented Jun 19, 2019

Can you please explain ?

@CloudyPadmal
Copy link
Collaborator

Adding a coordinator layout might fix this issue 🤔

@ho-dor
Copy link
Author

ho-dor commented Jun 19, 2019

Adding a coordinator layout might fix this issue 🤔

It does , but the UI of robotic arm gets all messed up. I will just try to re-arrange the layout with co-ordinator layout.

@ho-dor
Copy link
Author

ho-dor commented Jun 19, 2019

Tried it but still the same issue
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()' on a null object reference at android.support.design.widget.BottomSheetBehavior.from(BottomSheetBehavior.java:981) at io.pslab.activity.RoboticArmActivity.setUpBottomSheet(RoboticArmActivity.java:531) at io.pslab.activity.RoboticArmActivity.onCreate(RoboticArmActivity.java:93) at android.app.Activity.performCreate(Activity.java:7327) at android.app.Activity.performCreate(Activity.java:7318) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1275) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3095) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3258)  at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)  at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)  at android.os.Handler.dispatchMessage(Handler.java:106)  at android.os.Looper.loop(Looper.java:214)  at android.app.ActivityThread.main(ActivityThread.java:7073)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:974) 
I have used the same implementation as in LA and oscilloscope . @CloudyPadmal @neel1998

@neel1998
Copy link
Member

Are you using binder anywhere ? Try "Clean Project" and "Rebuild project" once

@ho-dor ho-dor changed the title [WIP]Guide for robotic arm Guide for robotic arm Jun 19, 2019
@ho-dor
Copy link
Author

ho-dor commented Jun 19, 2019

@neel1998 @CloudyPadmal please check. Was probably an issue with android studio , restarted it, worked fine.

@mariobehling mariobehling requested a review from marcoag June 20, 2019 09:56
Copy link
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ho-dor Thank you. Let's work a bit on the description though. Please paste the current version in this Google doc. I see servors are not even mentioned. We need to work a bit on the text. https://docs.google.com/document/d/1A5P4v207AZ9kWx0Cux9RIaygnx18Pchc-X7fH73X9rg/edit

@mariobehling
Copy link
Member

@marcoag Could you help with the text, please?

@marcoag
Copy link
Member

marcoag commented Jun 20, 2019

I believe this feature shouldn't be specific to a robotic arm, what it's really doing is just moving 4 servos, it can be a robotic arm or any other servo powered machine. Therefore the name, title and description should be focused on how to use this feature to move 4 servos.

@CloudyPadmal CloudyPadmal added the Status: Review Required Requested reviews from peers and maintainers label Jun 20, 2019
@ho-dor
Copy link
Author

ho-dor commented Jun 20, 2019

@mariobehling please review the google doc . Shall I update the app with this info ?

@ho-dor
Copy link
Author

ho-dor commented Jun 21, 2019

@CloudyPadmal @mariobehling @neel1998 review

@CloudyPadmal
Copy link
Collaborator

We need to have instructions here in guide. Which pin gets connected to what pin and how to set values (long click and drag etc..). May be for now we can have the UI part merged and work on content in a separate PR.

@neel1998
Copy link
Member

@ho-dor why all the merged commits included in your PR? what did you do?

@ho-dor
Copy link
Author

ho-dor commented Jun 21, 2019

@neel1998 silly mistake . resolved

@mariobehling
Copy link
Member

Ok, let's add the details instructions in a follow up PR. Thanks!

@mariobehling mariobehling merged commit ec30812 into fossasia:development Jun 22, 2019
neel1998 pushed a commit to neel1998/pslab-android that referenced this pull request Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Review Required Requested reviews from peers and maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Guide for robotic arm

5 participants