Responsive UI design using Appcelerator Titanium framework
I am new in Appcelerator framework, I have developed one application in appcelerator, but that application looks good on IOS but for android its not look good.
I want to develop a screen which is responsive like html.
Is there any way to design appcelerator screen like responsive screen.
Thanks you.
responsive-design titanium appcelerator appcelerator-titanium
add a comment |
I am new in Appcelerator framework, I have developed one application in appcelerator, but that application looks good on IOS but for android its not look good.
I want to develop a screen which is responsive like html.
Is there any way to design appcelerator screen like responsive screen.
Thanks you.
responsive-design titanium appcelerator appcelerator-titanium
add a comment |
I am new in Appcelerator framework, I have developed one application in appcelerator, but that application looks good on IOS but for android its not look good.
I want to develop a screen which is responsive like html.
Is there any way to design appcelerator screen like responsive screen.
Thanks you.
responsive-design titanium appcelerator appcelerator-titanium
I am new in Appcelerator framework, I have developed one application in appcelerator, but that application looks good on IOS but for android its not look good.
I want to develop a screen which is responsive like html.
Is there any way to design appcelerator screen like responsive screen.
Thanks you.
responsive-design titanium appcelerator appcelerator-titanium
responsive-design titanium appcelerator appcelerator-titanium
edited Nov 15 '18 at 12:34
Rene Pot
21k45885
21k45885
asked Nov 15 '18 at 12:10
Pravin AbhalePravin Abhale
8627
8627
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Don't define width, unless calculated. iOS is fairly simple with only a handful different resolutions, on Android you never know what resolutions you might encounter.
Luckily, you can specify widths differently in Titanium than you can in HTML. For example
var view = Ti.UI.createView(
left: 20,
right: 20
);
This will make your view the width of the parent, with 20 padding right and left, the width will be calculated.
Also, always stick to native UI elements. So tabgroups, actionbar/navigationBar should all be used so you don't have to worry about cross platform support, styling and sizing of those elements.
Furthermore, most view should be put in ScrollView
's when you don't know how tall the UI is going to be. It could fit on iOS, but not on a small Android device. Putting it in a scrollview will always fix the screen as the scrollview will automatically enable scrolling when the content is taller than what fits.
So conclusion
- Width should be defined relative. Either with left/right properties, or calculated
- If height of content is not yet known or not designed to be fullscreen wrap it in a scrollview
- Stop thinking of apps as websites, start thinking of them as Apps. Layout works differently
Lastly, Appcelerator is the company, Titanium is the technology you're using :)
Thank you Pot for your reply, i have tried the approch which you provided. but i m struggling with width, because i have 4 element in a row it works fine for iPhone 7 or more but when app runs on smaller device that 4 elemtent dosent get enough space and its not clickable, what i want is if width is not enoug then it works as a flow layout, that can come in the next row instead of single row. Thank you in advance
– Pravin Abhale
Nov 16 '18 at 7:08
1
for that you can try to put all 4 views in a parentView withlayout:'horizontal
and put parentView'sheight:Ti.UI.SIZE
. can you share some code or screenshot of your problem
– Swanand
Nov 16 '18 at 11:29
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53319221%2fresponsive-ui-design-using-appcelerator-titanium-framework%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Don't define width, unless calculated. iOS is fairly simple with only a handful different resolutions, on Android you never know what resolutions you might encounter.
Luckily, you can specify widths differently in Titanium than you can in HTML. For example
var view = Ti.UI.createView(
left: 20,
right: 20
);
This will make your view the width of the parent, with 20 padding right and left, the width will be calculated.
Also, always stick to native UI elements. So tabgroups, actionbar/navigationBar should all be used so you don't have to worry about cross platform support, styling and sizing of those elements.
Furthermore, most view should be put in ScrollView
's when you don't know how tall the UI is going to be. It could fit on iOS, but not on a small Android device. Putting it in a scrollview will always fix the screen as the scrollview will automatically enable scrolling when the content is taller than what fits.
So conclusion
- Width should be defined relative. Either with left/right properties, or calculated
- If height of content is not yet known or not designed to be fullscreen wrap it in a scrollview
- Stop thinking of apps as websites, start thinking of them as Apps. Layout works differently
Lastly, Appcelerator is the company, Titanium is the technology you're using :)
Thank you Pot for your reply, i have tried the approch which you provided. but i m struggling with width, because i have 4 element in a row it works fine for iPhone 7 or more but when app runs on smaller device that 4 elemtent dosent get enough space and its not clickable, what i want is if width is not enoug then it works as a flow layout, that can come in the next row instead of single row. Thank you in advance
– Pravin Abhale
Nov 16 '18 at 7:08
1
for that you can try to put all 4 views in a parentView withlayout:'horizontal
and put parentView'sheight:Ti.UI.SIZE
. can you share some code or screenshot of your problem
– Swanand
Nov 16 '18 at 11:29
add a comment |
Don't define width, unless calculated. iOS is fairly simple with only a handful different resolutions, on Android you never know what resolutions you might encounter.
Luckily, you can specify widths differently in Titanium than you can in HTML. For example
var view = Ti.UI.createView(
left: 20,
right: 20
);
This will make your view the width of the parent, with 20 padding right and left, the width will be calculated.
Also, always stick to native UI elements. So tabgroups, actionbar/navigationBar should all be used so you don't have to worry about cross platform support, styling and sizing of those elements.
Furthermore, most view should be put in ScrollView
's when you don't know how tall the UI is going to be. It could fit on iOS, but not on a small Android device. Putting it in a scrollview will always fix the screen as the scrollview will automatically enable scrolling when the content is taller than what fits.
So conclusion
- Width should be defined relative. Either with left/right properties, or calculated
- If height of content is not yet known or not designed to be fullscreen wrap it in a scrollview
- Stop thinking of apps as websites, start thinking of them as Apps. Layout works differently
Lastly, Appcelerator is the company, Titanium is the technology you're using :)
Thank you Pot for your reply, i have tried the approch which you provided. but i m struggling with width, because i have 4 element in a row it works fine for iPhone 7 or more but when app runs on smaller device that 4 elemtent dosent get enough space and its not clickable, what i want is if width is not enoug then it works as a flow layout, that can come in the next row instead of single row. Thank you in advance
– Pravin Abhale
Nov 16 '18 at 7:08
1
for that you can try to put all 4 views in a parentView withlayout:'horizontal
and put parentView'sheight:Ti.UI.SIZE
. can you share some code or screenshot of your problem
– Swanand
Nov 16 '18 at 11:29
add a comment |
Don't define width, unless calculated. iOS is fairly simple with only a handful different resolutions, on Android you never know what resolutions you might encounter.
Luckily, you can specify widths differently in Titanium than you can in HTML. For example
var view = Ti.UI.createView(
left: 20,
right: 20
);
This will make your view the width of the parent, with 20 padding right and left, the width will be calculated.
Also, always stick to native UI elements. So tabgroups, actionbar/navigationBar should all be used so you don't have to worry about cross platform support, styling and sizing of those elements.
Furthermore, most view should be put in ScrollView
's when you don't know how tall the UI is going to be. It could fit on iOS, but not on a small Android device. Putting it in a scrollview will always fix the screen as the scrollview will automatically enable scrolling when the content is taller than what fits.
So conclusion
- Width should be defined relative. Either with left/right properties, or calculated
- If height of content is not yet known or not designed to be fullscreen wrap it in a scrollview
- Stop thinking of apps as websites, start thinking of them as Apps. Layout works differently
Lastly, Appcelerator is the company, Titanium is the technology you're using :)
Don't define width, unless calculated. iOS is fairly simple with only a handful different resolutions, on Android you never know what resolutions you might encounter.
Luckily, you can specify widths differently in Titanium than you can in HTML. For example
var view = Ti.UI.createView(
left: 20,
right: 20
);
This will make your view the width of the parent, with 20 padding right and left, the width will be calculated.
Also, always stick to native UI elements. So tabgroups, actionbar/navigationBar should all be used so you don't have to worry about cross platform support, styling and sizing of those elements.
Furthermore, most view should be put in ScrollView
's when you don't know how tall the UI is going to be. It could fit on iOS, but not on a small Android device. Putting it in a scrollview will always fix the screen as the scrollview will automatically enable scrolling when the content is taller than what fits.
So conclusion
- Width should be defined relative. Either with left/right properties, or calculated
- If height of content is not yet known or not designed to be fullscreen wrap it in a scrollview
- Stop thinking of apps as websites, start thinking of them as Apps. Layout works differently
Lastly, Appcelerator is the company, Titanium is the technology you're using :)
answered Nov 15 '18 at 12:33
Rene PotRene Pot
21k45885
21k45885
Thank you Pot for your reply, i have tried the approch which you provided. but i m struggling with width, because i have 4 element in a row it works fine for iPhone 7 or more but when app runs on smaller device that 4 elemtent dosent get enough space and its not clickable, what i want is if width is not enoug then it works as a flow layout, that can come in the next row instead of single row. Thank you in advance
– Pravin Abhale
Nov 16 '18 at 7:08
1
for that you can try to put all 4 views in a parentView withlayout:'horizontal
and put parentView'sheight:Ti.UI.SIZE
. can you share some code or screenshot of your problem
– Swanand
Nov 16 '18 at 11:29
add a comment |
Thank you Pot for your reply, i have tried the approch which you provided. but i m struggling with width, because i have 4 element in a row it works fine for iPhone 7 or more but when app runs on smaller device that 4 elemtent dosent get enough space and its not clickable, what i want is if width is not enoug then it works as a flow layout, that can come in the next row instead of single row. Thank you in advance
– Pravin Abhale
Nov 16 '18 at 7:08
1
for that you can try to put all 4 views in a parentView withlayout:'horizontal
and put parentView'sheight:Ti.UI.SIZE
. can you share some code or screenshot of your problem
– Swanand
Nov 16 '18 at 11:29
Thank you Pot for your reply, i have tried the approch which you provided. but i m struggling with width, because i have 4 element in a row it works fine for iPhone 7 or more but when app runs on smaller device that 4 elemtent dosent get enough space and its not clickable, what i want is if width is not enoug then it works as a flow layout, that can come in the next row instead of single row. Thank you in advance
– Pravin Abhale
Nov 16 '18 at 7:08
Thank you Pot for your reply, i have tried the approch which you provided. but i m struggling with width, because i have 4 element in a row it works fine for iPhone 7 or more but when app runs on smaller device that 4 elemtent dosent get enough space and its not clickable, what i want is if width is not enoug then it works as a flow layout, that can come in the next row instead of single row. Thank you in advance
– Pravin Abhale
Nov 16 '18 at 7:08
1
1
for that you can try to put all 4 views in a parentView with
layout:'horizontal
and put parentView's height:Ti.UI.SIZE
. can you share some code or screenshot of your problem– Swanand
Nov 16 '18 at 11:29
for that you can try to put all 4 views in a parentView with
layout:'horizontal
and put parentView's height:Ti.UI.SIZE
. can you share some code or screenshot of your problem– Swanand
Nov 16 '18 at 11:29
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53319221%2fresponsive-ui-design-using-appcelerator-titanium-framework%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown