Skip to content

Commit 6449e30

Browse files
fixissues
1 parent 9138bfd commit 6449e30

File tree

4 files changed

+269
-58
lines changed

4 files changed

+269
-58
lines changed

HsDropboxTest/.actionScriptProperties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<sourceAttachmentPath/>
1818
</compiler>
1919
<applications>
20-
<application path="HsDropboxAPIApp.mxml">
20+
<application path="HsApp2.mxml">
2121
<airExcludes/>
2222
</application>
2323
</applications>

HsDropboxTest/src/HsApp2-app.xml

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<application xmlns="http://ns.adobe.com/air/application/2.6">
3+
4+
<!-- Adobe AIR Application Descriptor File Template.
5+
6+
Specifies parameters for identifying, installing, and launching AIR applications.
7+
8+
xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.6
9+
The last segment of the namespace specifies the version
10+
of the AIR runtime required for this application to run.
11+
12+
minimumPatchLevel - The minimum patch level of the AIR runtime required to run
13+
the application. Optional.
14+
-->
15+
16+
<!-- A universally unique application identifier. Must be unique across all AIR applications.
17+
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
18+
<id>HsApp2</id>
19+
20+
<!-- Used as the filename for the application. Required. -->
21+
<filename>HsApp2</filename>
22+
23+
<!-- The name that is displayed in the AIR application installer.
24+
May have multiple values for each language. See samples or xsd schema file. Optional. -->
25+
<name>HsApp2</name>
26+
27+
<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
28+
Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
29+
An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5 . -->
30+
<versionNumber>0.0.0</versionNumber>
31+
32+
<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
33+
<!-- <versionLabel></versionLabel> -->
34+
35+
<!-- Description, displayed in the AIR application installer.
36+
May have multiple values for each language. See samples or xsd schema file. Optional. -->
37+
<!-- <description></description> -->
38+
39+
<!-- Copyright information. Optional -->
40+
<!-- <copyright></copyright> -->
41+
42+
<!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
43+
<!-- <publisherID></publisherID> -->
44+
45+
<!-- Settings for the application's initial window. Required. -->
46+
<initialWindow>
47+
<!-- The main SWF or HTML file of the application. Required. -->
48+
<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
49+
<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
50+
51+
<!-- The title of the main window. Optional. -->
52+
<!-- <title></title> -->
53+
54+
<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
55+
<!-- <systemChrome></systemChrome> -->
56+
57+
<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
58+
<!-- <transparent></transparent> -->
59+
60+
<!-- Whether the window is initially visible. Optional. Default false. -->
61+
<!-- <visible></visible> -->
62+
63+
<!-- Whether the user can minimize the window. Optional. Default true. -->
64+
<!-- <minimizable></minimizable> -->
65+
66+
<!-- Whether the user can maximize the window. Optional. Default true. -->
67+
<!-- <maximizable></maximizable> -->
68+
69+
<!-- Whether the user can resize the window. Optional. Default true. -->
70+
<!-- <resizable></resizable> -->
71+
72+
<!-- The window's initial width in pixels. Optional. -->
73+
<!-- <width></width> -->
74+
75+
<!-- The window's initial height in pixels. Optional. -->
76+
<!-- <height></height> -->
77+
78+
<!-- The window's initial x position. Optional. -->
79+
<!-- <x></x> -->
80+
81+
<!-- The window's initial y position. Optional. -->
82+
<!-- <y></y> -->
83+
84+
<!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
85+
<!-- <minSize></minSize> -->
86+
87+
<!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
88+
<!-- <maxSize></maxSize> -->
89+
90+
<!-- The initial aspect ratio of the app when launched (either "portrait" or "landscape"). Optional. Mobile only. Default is the natural orientation of the device -->
91+
92+
<!-- <aspectRatio></aspectRatio> -->
93+
94+
<!-- Whether the app will begin auto-orienting on launch. Optional. Mobile only. Default false -->
95+
96+
<!-- <autoOrients></autoOrients> -->
97+
98+
<!-- Whether the app launches in full screen. Optional. Mobile only. Default false -->
99+
100+
<!-- <fullScreen></fullScreen> -->
101+
102+
<!-- The render mode for the app (either auto, cpu, or gpu). Optional. Mobile only. Default auto -->
103+
104+
<!-- <renderMode></renderMode> -->
105+
106+
<!-- Whether or not to pan when a soft keyboard is raised or lowered (either "pan" or "none"). Optional. Defaults "pan." -->
107+
<!-- <softKeyboardBehavior></softKeyboardBehavior> -->
108+
<autoOrients>true</autoOrients>
109+
<fullScreen>false</fullScreen>
110+
<visible>false</visible>
111+
<softKeyboardBehavior>none</softKeyboardBehavior>
112+
</initialWindow>
113+
114+
<!-- We recommend omitting the supportedProfiles element, -->
115+
<!-- which in turn permits your application to be deployed to all -->
116+
<!-- devices supported by AIR. If you wish to restrict deployment -->
117+
<!-- (i.e., to only mobile devices) then add this element and list -->
118+
<!-- only the profiles which your application does support. -->
119+
<!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
120+
121+
<!-- The subpath of the standard default installation location to use. Optional. -->
122+
<!-- <installFolder></installFolder> -->
123+
124+
<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
125+
<!-- <programMenuFolder></programMenuFolder> -->
126+
127+
<!-- The icon the system uses for the application. For at least one resolution,
128+
specify the path to a PNG file included in the AIR package. Optional. -->
129+
<!-- <icon>
130+
<image16x16></image16x16>
131+
<image32x32></image32x32>
132+
<image36x36></image36x36>
133+
<image48x48></image48x48>
134+
<image72x72></image72x72>
135+
<image114x114></image114x114>
136+
<image128x128></image128x128>
137+
</icon> -->
138+
139+
<!-- Whether the application handles the update when a user double-clicks an update version
140+
of the AIR file (true), or the default AIR application installer handles the update (false).
141+
Optional. Default false. -->
142+
<!-- <customUpdateUI></customUpdateUI> -->
143+
144+
<!-- Whether the application can be launched when the user clicks a link in a web browser.
145+
Optional. Default false. -->
146+
<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
147+
148+
<!-- Listing of file types for which the application can register. Optional. -->
149+
<!-- <fileTypes> -->
150+
151+
<!-- Defines one file type. Optional. -->
152+
<!-- <fileType> -->
153+
154+
<!-- The name that the system displays for the registered file type. Required. -->
155+
<!-- <name></name> -->
156+
157+
<!-- The extension to register. Required. -->
158+
<!-- <extension></extension> -->
159+
160+
<!-- The description of the file type. Optional. -->
161+
<!-- <description></description> -->
162+
163+
<!-- The MIME content type. -->
164+
<!-- <contentType></contentType> -->
165+
166+
<!-- The icon to display for the file type. Optional. -->
167+
<!-- <icon>
168+
<image16x16></image16x16>
169+
<image32x32></image32x32>
170+
<image48x48></image48x48>
171+
<image128x128></image128x128>
172+
</icon> -->
173+
174+
<!-- </fileType> -->
175+
<!-- </fileTypes> -->
176+
177+
<!-- iOS specific capabilities -->
178+
<!-- <iPhone> -->
179+
<!-- A list of plist key/value pairs to be added to the application Info.plist -->
180+
<!-- <InfoAdditions>
181+
<![CDATA[
182+
<key>UIDeviceFamily</key>
183+
<array>
184+
<string>1</string>
185+
<string>2</string>
186+
</array>
187+
<key>UIStatusBarStyle</key>
188+
<string>UIStatusBarStyleBlackOpaque</string>
189+
<key>UIRequiresPersistentWiFi</key>
190+
<string>YES</string>
191+
]]>
192+
</InfoAdditions> -->
193+
<!-- <requestedDisplayResolution></requestedDisplayResolution> -->
194+
<!-- </iPhone> -->
195+
196+
<!-- Specify Android specific tags that get passed to AndroidManifest.xml file. -->
197+
<!--<android>
198+
<manifestAdditions>
199+
<![CDATA[
200+
<manifest android:installLocation="auto">
201+
<uses-permission android:name="android.permission.INTERNET"/>
202+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
203+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
204+
<uses-configuration android:reqFiveWayNav="true"/>
205+
<supports-screens android:normalScreens="true"/>
206+
<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
207+
<application android:enabled="true">
208+
<activity android:excludeFromRecents="false">
209+
<intent-filter>
210+
<action android:name="android.intent.action.MAIN"/>
211+
<category android:name="android.intent.category.LAUNCHER"/>
212+
</intent-filter>
213+
</activity>
214+
</application>
215+
</manifest>
216+
]]>
217+
</manifestAdditions>
218+
</android> -->
219+
<!-- End of the schema for adding the android specific tags in AndroidManifest.xml file -->
220+
221+
</application>

HsDropboxTest/src/HsDropboxAPIApp.mxml renamed to HsDropboxTest/src/HsApp2.mxml

Lines changed: 45 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,110 +2,100 @@
22
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
33
xmlns:s="library://ns.adobe.com/flex/spark"
44
xmlns:mx="library://ns.adobe.com/flex/mx"
5-
width="1000" height="680"
5+
width="1000" height="680"
66
applicationComplete="appCompleteHandler()">
7-
<fx:Style>
8-
@namespace s "library://ns.adobe.com/flex/spark";
9-
@namespace mx "library://ns.adobe.com/flex/mx";
10-
mx|VBox {
11-
paddingTop : 5;
12-
paddingBottom : 5;
13-
paddingLeft : 5;
14-
paddingRight : 5;
15-
}
16-
</fx:Style>
177
<fx:Declarations>
188
</fx:Declarations>
199
<fx:Script source="HsDropboxAPIAppAs.as" />
20-
<mx:VBox width="100%" height="100%">
21-
<mx:VBox width="100%" borderStyle="solid" cornerRadius="5">
10+
<s:VGroup width="100%" height="100%">
11+
<s:VGroup width="100%" >
2212
<s:Label fontSize="20" fontWeight="bold" text="Create Account" />
2313
<s:Button label="Create" click="createAccount()" />
24-
</mx:VBox>
25-
<mx:VBox width="100%" borderStyle="solid" cornerRadius="5">
14+
</s:VGroup>
15+
<s:VGroup width="100%">
2616
<s:Label fontSize="20" fontWeight="bold" text="Authentication" />
27-
<mx:HBox width="100%">
17+
<s:HGroup width="100%">
2818
<s:RadioButton id="oauthRadioBtn" groupName="loginTypeRadio" value="oauth" selected="true" label="OAuth" />
2919
<s:RadioButton id="tokenRadioBtn" groupName="loginTypeRadio" value="token" label="Token" />
30-
</mx:HBox>
31-
<mx:HBox width="100%">
20+
</s:HGroup>
21+
<s:HGroup width="100%">
3222
<s:Button label="Request Token" click="getRequestToken()" width="130" />
3323
<s:TextInput id="reqTokenKeyLabel" width="150" editable="false"/>
3424
<s:TextInput id="reqTokenSecretLabel" width="150" editable="false"/>
35-
</mx:HBox>
36-
<mx:HBox id="emailPwdForm" width="100%" enabled="{tokenRadioBtn.selected}" verticalAlign="middle">
25+
</s:HGroup>
26+
<s:HGroup id="emailPwdForm" width="100%" enabled="{tokenRadioBtn.selected}" verticalAlign="middle">
3727
<s:Label text="email :"/>
3828
<s:TextInput id="eMailLabel" width="200"/>
3929
<s:Label text="password :" />
4030
<s:TextInput id="passwordLabel" width="150" displayAsPassword="true"/>
4131
<s:Button label="EMail / Password" click="emailLogin()" width="130" />
42-
</mx:HBox>
43-
<mx:HBox width="100%">
32+
</s:HGroup>
33+
<s:HGroup width="100%">
4434
<s:Button label="Access Token" click="getAccessToken()" width="130" />
4535
<s:TextInput id="accTokenKeyLabel" width="150" editable="false" />
4636
<s:TextInput id="accTokenSecretLabel" width="150" editable="false" />
47-
</mx:HBox>
48-
</mx:VBox>
37+
</s:HGroup>
38+
</s:VGroup>
4939

50-
<mx:VBox id="loginedAPIContainer" width="100%" height="100%" enabled="false" borderStyle="solid" cornerRadius="5">
40+
<s:VGroup id="loginedAPIContainer" width="100%" height="100%" enabled="false">
5141
<s:Label fontSize="20" fontWeight="bold" text="APIs" />
52-
<mx:HBox width="100%">
42+
<s:HGroup width="100%">
5343
<s:Button label="Account Info" click="accountInfo()" width="130" />
5444
<s:TextInput id="accountInfoLabel" width="100%" />
55-
</mx:HBox>
56-
<mx:HBox width="100%">
45+
</s:HGroup>
46+
<s:HGroup width="100%">
5747
<s:Button label="Upload File" click="uploadFile()" width="130" />
5848
<s:TextInput id="uploadFileLabel" width="100%" />
59-
</mx:HBox>
60-
<mx:HBox width="100%">
49+
</s:HGroup>
50+
<s:HGroup width="100%">
6151
<s:Button label="Copy File" click="copyFile()" width="130" />
6252
<s:TextInput id="copyFileLabel" width="100%" />
63-
</mx:HBox>
64-
<mx:HBox width="100%">
53+
</s:HGroup>
54+
<s:HGroup width="100%">
6555
<s:Button label="Create Folder" click="createFolder()" width="130" />
6656
<s:TextInput id="createFolderLabel" width="100%" />
67-
</mx:HBox>
68-
<mx:HBox width="100%">
57+
</s:HGroup>
58+
<s:HGroup width="100%">
6959
<s:Button label="Move File" click="moveFile()" width="130" />
7060
<s:TextInput id="moveFileLabel" width="100%" />
71-
</mx:HBox>
72-
<mx:HBox width="100%">
61+
</s:HGroup>
62+
<s:HGroup width="100%">
7363
<s:Button label="Delete File" click="deleteFile()" width="130" />
7464
<s:TextInput id="deleteFileLabel" width="100%" />
75-
</mx:HBox>
76-
<mx:HBox width="100%">
65+
</s:HGroup>
66+
<s:HGroup width="100%">
7767
<s:Button label="Get File" click="getFile()" width="130" />
7868
<s:TextInput id="getFileLabel" width="100%" />
79-
</mx:HBox>
80-
<mx:HBox width="100%">
69+
</s:HGroup>
70+
<s:HGroup width="100%">
8171
<s:Button label="Metadata" click="metadata()" width="130" />
8272
<s:TextInput id="metadataLabel" width="100%" />
83-
</mx:HBox>
84-
<mx:HBox width="100%">
73+
</s:HGroup>
74+
<s:HGroup width="100%">
8575
<s:Button label="Thumbnails" click="thumbnails()" width="130" />
8676
<s:TextInput id="thumbnailsLabel" width="100%" />
87-
</mx:HBox>
88-
<mx:HBox width="100%">
77+
</s:HGroup>
78+
<s:HGroup width="100%">
8979
<s:Button label="Revisions" click="revisions()" width="130" />
9080
<s:TextInput id="revisionsLabel" width="100%" />
91-
</mx:HBox>
92-
<mx:HBox width="100%">
81+
</s:HGroup>
82+
<s:HGroup width="100%">
9383
<s:Button label="Restore" click="restore_f()" width="130" />
9484
<s:TextInput id="restoreLabel" width="100%" />
95-
</mx:HBox>
96-
<mx:HBox width="100%">
85+
</s:HGroup>
86+
<s:HGroup width="100%">
9787
<s:Button label="Search" click="search()" width="130" />
9888
<s:TextInput id="searchLabel" width="100%" />
99-
</mx:HBox>
100-
<mx:HBox width="100%">
89+
</s:HGroup>
90+
<s:HGroup width="100%">
10191
<s:Button label="Shares" click="shares()" width="130" />
10292
<s:TextInput id="sharesLabel" width="100%" />
103-
</mx:HBox>
104-
<mx:HBox width="100%">
93+
</s:HGroup>
94+
<s:HGroup width="100%">
10595
<s:Button label="Media" click="media()" width="130" />
10696
<s:TextInput id="mediaLabel" width="100%" />
107-
</mx:HBox>
108-
</mx:VBox>
97+
</s:HGroup>
98+
</s:VGroup>
10999

110-
</mx:VBox>
100+
</s:VGroup>
111101
</s:WindowedApplication>

0 commit comments

Comments
 (0)