简体   繁体   中英

Android Studio without layout manager

I need to be able to make an app that looks like this , but all of the layout managers get in the way. I either can't be precise enough with placing the numbers, or relative layout moves the other numbers out of place when I move one. What I want to know is if it's possible to not use any of the layout managers, and if so, how to do that

You could create a custom View:

public class CustomView extends View { ... }

You can then draw anything you want on its canvas in the onDraw method. Then View can can be used like any other View from an Activity or a Fragment.

onCreateView(...) {
    return CustomView();
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM