flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chris_d_k ...@christiankiefer.de>
Subject Question to ConstraintLayout
Date Fri, 04 Jul 2014 21:19:13 GMT
Hi,

 I googled a lot on this but haven't found a solutions...

I want to use a ConstraintLayout in more or less all Views of my flex mobile
ViewNavigatorApplication.

How can I do this... I tried to extend ConstraintLayout with all columns
defined and setted it in the layout tag but this didn't work as well as
extending the view and defining everything in this... I always get:

Error: ConstraintColumn „COLUMN_1“ nicht gefunden.
	at
spark.layouts::ConstraintLayout/parseElementConstraints()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as:1736]
	at
spark.layouts::ConstraintLayout/parseConstraints()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as:1640]
	at
spark.layouts::ConstraintLayout/measure()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/spark/src/spark/layouts/ConstraintLayout.as:422]
	at
spark.components.supportClasses::GroupBase/measure()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as:1156]
...

What's the way I should go... can I resuse the layout somehow? Is there
somewhere a tutorial...

My code extending the view:

public class MyView extends View
	{

		public static var COLUMN_1:String = "COLUMN_1"
		public static var COLUMN_2:String = "COLUMN_2"
		public static var COLUMN_3:String = "COLUMN_3"

		public function MyView ()
		{
			super();
			var constLayout:ConstraintLayout = new ConstraintLayout();

			var consColumn1:ConstraintColumn = new ConstraintColumn();
			consColumn1.initialized(this, COLUMN_1);
			consColumn1.width = 1/3;
			constLayout.constraintColumns.push(consColumn1);

			var consColumn2:ConstraintColumn = new ConstraintColumn();
			consColumn2.initialized(this, COLUMN_2);
			consColumn2.width = 1/3;
			constLayout.constraintColumns.push(consColumn2);

			var consColumn3:ConstraintColumn = new ConstraintColumn();
			consColumn3.initialized(this, COLUMN_3);
			consColumn3.width = 1/3;
			constLayout.constraintColumns.push(consColumn3);

			layout = constLayout;

		}

	}



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Question-to-ConstraintLayout-tp7183.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Mime
View raw message