I need some help to make an activity.
I have stored coordinates from shapes and name of shapes in a database. These are grouped into rooms. In the activity I need the top of the screen 8 TextViews (with colors and textst) in two rows. If I click on a textView, accordingly the shapes for the room need to be drawn on the screen under the textViews.
If I click on a shape, I need to get back the information, on which shape I made a click.
I guess you could create a custom view:
public class CustomView extends View { ... }
and then you simply override appropriate methods like:
@Override
public boolean onTouchEvent(MotionEvent ev) { /* check for hitting shapes here */ }
@Override
protected void onDraw(Canvas canvas) { /* draw anything you want here */ }
Use the search engine of your choice to find out more. This looks like what you need
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With