-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: clean up default app template (#13595)
* chore: apply more spacing to default icon * chore: add more readable readme * chore: clean up default app.js code * fix: remove duplicate semicolon * chore: use long-assignment
- Loading branch information
1 parent
0155e42
commit 7cbabb4
Showing
5 changed files
with
43 additions
and
39 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Welcome to your TiDev Titanium Mobile Project | ||
|
||
This is a blank project. Start by editing your application's app.js to | ||
make your first mobile project using Titanium. | ||
|
||
## Contributing | ||
|
||
Titanium is an open source project. Titanium wouldn't be where it is now without contributions by the community. Please consider forking Titanium to improve, enhance or fix issues. If you feel like the community will benefit from your fork, please open a pull request. | ||
|
||
To protect the interests of the Titanium contributors, Appcelerator, customers and end users we require contributors to sign a Contributors License Agreement (CLA) before we pull the changes into the main repository. Our CLA is simple and straightforward - it requires that the contributions you make to any Appcelerator open source project are properly licensed and that you have the legal authority to make those changes. This helps us significantly reduce future legal risk for everyone involved. It is easy, helps everyone, takes only a few minutes, and only needs to be completed once. | ||
|
||
[You can digitally sign the CLA](https://github.com/tidev/organization-docs/blob/main/AUTHORIZED_CONTRIBUTORS.md) online. Please indicate your email address in your first pull request so that we can make sure that will locate your CLA. Once you've submitted it, you no longer need to send one for subsequent submissions. | ||
|
||
## Stay Connected | ||
|
||
For the latest information, please find us on Twitter: [Titanium SDK](https://twitter.com/titaniumsdk) and [TiDev](https://twitter.com/tidevio). | ||
|
||
Join our growing Slack community by visiting https://slack.tidev.io | ||
|
||
## Legal | ||
|
||
Titanium is a registered trademark of TiDev Inc. All Titanium trademark and patent rights were transferred and assigned to TiDev Inc. on 4/7/2022. Please see the LEGAL information about using our trademarks, privacy policy, terms of usage and other legal information at https://tidev.io/legal. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,43 @@ | ||
/** | ||
* Create a new `Ti.UI.TabGroup`. | ||
* Create a new tab group. | ||
* @see https://titaniumsdk.com/api/titanium/ui/tabgroup.html | ||
*/ | ||
var tabGroup = Ti.UI.createTabGroup(); | ||
const tabGroup = Ti.UI.createTabGroup(); | ||
|
||
/** | ||
* Add the two created tabs to the tabGroup object. | ||
*/ | ||
tabGroup.addTab(createTab("Tab 1", "I am Window 1", "assets/images/tab1.png")); | ||
tabGroup.addTab(createTab("Tab 2", "I am Window 2", "assets/images/tab2.png")); | ||
tabGroup.addTab(createTab('Tab 1', 'I am Window 1', 'assets/images/tab1.png')); | ||
tabGroup.addTab(createTab('Tab 2', 'I am Window 2', 'assets/images/tab2.png')); | ||
|
||
/** | ||
* Open the tabGroup | ||
* Open the tab group | ||
*/ | ||
tabGroup.open(); | ||
|
||
/** | ||
* Creates a new Tab and configures it. | ||
* Creates a new tab and configures it | ||
* | ||
* @param {String} title The title used in the `Ti.UI.Tab` and it's included `Ti.UI.Window` | ||
* @param {String} message The title displayed in the `Ti.UI.Label` | ||
* @return {String} icon The icon used in the `Ti.UI.Tab` | ||
*/ | ||
function createTab(title, message, icon) { | ||
var win = Ti.UI.createWindow({ | ||
title: title, | ||
backgroundColor: '#fff' | ||
const window = Ti.UI.createWindow({ | ||
backgroundColor: 'backgroundColor', // This is a semantic color defined in the "semantic.colors.json" | ||
title: title | ||
}); | ||
|
||
var label = Ti.UI.createLabel({ | ||
const label = Ti.UI.createLabel({ | ||
text: message, | ||
color: "#333", | ||
font: { | ||
fontSize: 20 | ||
} | ||
color: 'textColor' // This is a semantic color defined in the "semantic.colors.json" | ||
}); | ||
|
||
win.add(label); | ||
window.add(label); | ||
|
||
var tab = Ti.UI.createTab({ | ||
return Ti.UI.createTab({ | ||
title: title, | ||
icon: icon, | ||
window: win | ||
window: window | ||
}); | ||
|
||
return tab; | ||
} |
8 changes: 6 additions & 2 deletions
8
templates/app/default/template/Resources/semantic.colors.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
{ | ||
"backgroundColor": { | ||
"light": "#ffffff", | ||
"dark": "#000000" | ||
}, | ||
"textColor": { | ||
"dark": "#ffffff", | ||
"light": "#000000" | ||
"light": "#000000", | ||
"dark": "#ffffff" | ||
} | ||
} |