First of I'd recommend to learn Java basics first before trying Android development or Extension development.
Here are some tips.
I would suggest to learn a few things.
Java and basics of Annotations and Classes before starting to develop more complex extensions..
for example start learning by creating extensions that uses Integers or Strings
For compiling am extension use extension-template or Appinventor sources or Rush
Extension template is way faster than Appinventor sources as it only compiles the extension files and Appinventor sources also compiles the components present in the components folder.
And for the Editor I will suggest to install VSCode as its suited for begginers and has mostly all functions that you can think of and also its not Resource Heavy. After that you can think of IntelliJ Idea
For now you can't import gradle dependencies. However you can search the pachage name in Google or in search.maven.org for its specific JARs or AARs
Note: AARs are not fully supported by Appinventor fully.
In an extension you can't add your own XML for specific Layouts or widgets. You need to use their Java class to create a new instance of them and add it to specific View components
For example: Button btn = new Button(this.context);
For the width I believe you can use setHeight(); and setWidth(); for Height and Width respectively.
Nothing is impossible, but, Just start from basics I am myself learning extension development from November 2020 and on May 2021, I found myself efficient to make extensions,
No need for xml code, you can do same with @UsesApplicationMetadata and @UsesActivities Annotations, if you need any help, just ask, the community will give out its best to help you