Android Question Custom Control & Designer

Guenter Becker

Active Member
Licensed User
Hello,
is there a way to create a custom control with the possibilty to use it in the designer as a host and dragging views onto it like it is possible with the panel view? If yes how?
 

epiCode

Active Member
Licensed User
You can surely use a pane/panel and initialize with that specific panel in your custom control code.
 
Upvote 0

Guenter Becker

Active Member
Licensed User
Hi,
this will be a misunderstanding. It is not the question to use a panel view and place it inside the custom view I know that this is possible. But if you do that and you use the custom view in the designer you are not able to drop other views on it. To do this and how to realize this is the question.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
If I understand correctly, you need to open the original Custom View layout of original source code in Designer.
The Custom View already "packaged" cannot be edited (adding child views) in Designer in the project when you want to use it.
 
Upvote 0

Guenter Becker

Active Member
Licensed User
Hi,
that is correct and that is the problem. You may think what in hell does he want? Its easy I want to enhance the functionality of a panel-view. I think a way is to build the panel view from scratch but I do not know how to do this. In the forum I see experts who are able to create expanded views like AS_AdvancedTextField.
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
I see experts who are able to create expanded views like AS_AdvancedTextField.
But everything you see in this library I did in code, without the designer.
The disadvantage of such complex custom views is that you have to compile a few times until everything has the right size, because unfortunately you can't see in the designer how the view will look like.
 
Upvote 0

Guenter Becker

Active Member
Licensed User
OK, it was just a question if my request/Idea is possible. Looking to the answers yet I think it is not. Thank you for your time.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
As far as i know you cannot do this.
When you add a CustomView in the Designer, the dimensions are those given by the Base object, but you cannot add any other view into it, only internally
What exactly do you want to do with this kind of CustomView ?
When i develop CustomViews i add all views insides the CustomViews code, no layout, but that is just how i do it, i do not want to depend on any layout file.
 
Upvote 0

Guenter Becker

Active Member
Licensed User
I am developing a framwork to handle all the activities needed to save and retrive Data from a Database with having no or less knowlege of SQL Language. The framework will have 3 major components. A Class with about 35 functions needed for Datamanagement a special custom Toolbar to activate the functions and at least an input form that hosts views to present the Data and to accept Data input. I am close to finish the project the job that has to be done is to develop the input form.

The input form should be a custom view with internal functions to automate the process of reading proofing and writing the Data. I know that I can add a panel to the custom control and later let the user add views by loading a layout file into the panel. Going this way an extra layout file is needed. Investigating the forum and the internet I found no solution to do it without this extra layout. But this is what I want.

A wise man said take the sparrow if you can't get the pigeon on the roof. Nevertheless I hope to make myself clear. I will go on with my project using the way with the extra layout file. Thank your for comments.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
I know that I can add a panel to the custom control and later let the user add views by loading a layout file into the panel.
Do these layouts also need events ? If yes, those must be added somewhere.
What kind of database are you targeting ?
If you have several tables it could become complicated.
Maybe, for simple ones you could add the views in the code depending on the database structure and the column types.
An array of Labels for the column name and an an array of EditTexts for the data.
 
Upvote 0

Guenter Becker

Active Member
Licensed User
In the 1st realase I will not include
  • joined tables
  • primary keys are restricted to a single column
  • no triggers a.s.o.
It is planned to do this step by step with further updates.

The datamanagement class is focused on SQLITE and SQLCIPHER Database.

The framework is working with only 4 layouts.
  • One for the design of a standard page.
  • One for a custom action bar view
  • one for a custom Navigation Bar view in the footer.
This layouts are used by all datatadriven pages of the application.
At least there is on layout for the work area (Inputform) to hold the individual views of a page.

All layouts are loaded in the SUB ..Create of an Activity/Page. All View Objects are part of the SUB Global and all View Events are also part of the activity/Page.

The concept is
  • To have a clear and understandable divide of datamanagement functions and the other objects and functions of the application. With easy usage of the developer and the use without the need of deep SQL knowledge.
  • To have a standard user communication as defined rules of the art of interaction between user and app.
  • To have a standard error management to inform the developer if an error raises and to let him open free ways to react on the the error information.
  • To automate datamanagement functionality as far as possible under the rule not to loose individual developer access to add needed additional functions for individual cases that are no covered by the framework standards.
I plan the publishing of this framework not later than the end of this year in the Forum and I will do it free of charge for all licensed B4X Members. This project is now running for 10 Month under the condition of the hobby development.
 
Upvote 0
Top