Skip to content

Commit a2abc59

Browse files
committed
Removed some redundant linear layouts.
Remove MesgEditText again. Remove hard coded /data path. Use File(File, "id");
1 parent 6677b77 commit a2abc59

File tree

9 files changed

+264
-300
lines changed

9 files changed

+264
-300
lines changed

FinchVideo/AndroidManifest.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package="com.oreilly.demo.android.pa.finchvideo"
44
android:versionCode="1"
55
android:versionName="1.0">
6+
<uses-sdk android:minSdkVersion="16"/>
67
<application android:icon="@drawable/icon"
78
android:label="@string/app_name"
89
android:debuggable="true">
@@ -13,20 +14,19 @@
1314
android:authorities="com.oreilly.demo.android.pa.finchvideo.SimpleFinchVideo"
1415
/>
1516
<activity android:name=".FinchVideoActivity"
16-
android:label="@string/finch_video_app_name" >
17+
android:label="@string/finch_video_app_name">
1718
<intent-filter>
18-
<action android:name="android.intent.action.MAIN" />
19-
<category android:name="android.intent.category.LAUNCHER" />
19+
<action android:name="android.intent.action.MAIN"/>
20+
<category android:name="android.intent.category.LAUNCHER"/>
2021
</intent-filter>
2122
</activity>
2223
<activity android:name=".SimpleFinchVideoActivity"
2324
android:label="Simple Video Activity">
2425
<intent-filter>
25-
<action android:name="android.intent.action.MAIN" />
26-
<category android:name="android.intent.category.LAUNCHER" />
26+
<action android:name="android.intent.action.MAIN"/>
27+
<category android:name="android.intent.category.LAUNCHER"/>
2728
</intent-filter>
2829
</activity>
2930
</application>
30-
<uses-permission android:name="android.permission.INTERNET" />
31-
<uses-sdk android:minSdkVersion="7" />
31+
<uses-permission android:name="android.permission.INTERNET"/>
3232
</manifest>

FinchVideo/project.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
# project structure.
99

1010
# Project target.
11-
target=android-14
11+
target=android-16
1212
android.library.reference.1=../FinchFramework
13+

FinchVideo/res/layout/simple_video_activity.xml

Lines changed: 45 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -7,85 +7,53 @@
77
android:id="@+id/video_layout"
88
android:orientation="vertical"
99
>
10-
<LinearLayout
10+
11+
<TextView
12+
android:id="@+id/simple_video_title_label"
13+
android:layout_width="wrap_content"
14+
android:layout_height="wrap_content"
15+
android:text="@string/title"
16+
/>
17+
<EditText
18+
android:id="@+id/simple_video_title_edit"
1119
android:layout_width="match_parent"
1220
android:layout_height="wrap_content"
13-
android:orientation="vertical"
14-
android:background="@color/medium_gray"
15-
>
16-
<LinearLayout
17-
android:layout_width="match_parent"
18-
android:layout_height="wrap_content"
19-
android:orientation="vertical"
20-
android:background="@color/medium_gray"
21-
>
22-
<TextView
23-
android:id="@+id/simple_video_title_label"
24-
android:layout_width="wrap_content"
25-
android:layout_height="wrap_content"
26-
android:text="@string/title"
27-
/>
28-
<EditText
29-
android:id="@+id/simple_video_title_edit"
30-
android:height="@dimen/text_edit_height"
31-
android:layout_weight="1"
32-
android:layout_width="match_parent"
33-
android:layout_height="wrap_content"
34-
android:lines="1"
35-
android:singleLine="true"
36-
/>
37-
</LinearLayout>
38-
<LinearLayout
39-
android:layout_width="match_parent"
40-
android:layout_height="wrap_content"
41-
android:orientation="vertical"
42-
android:background="@color/medium_gray"
43-
>
44-
<TextView
45-
android:id="@+id/simple_video_description_label"
46-
android:layout_width="wrap_content"
47-
android:layout_height="wrap_content"
48-
android:text="@string/description"
49-
/>
50-
<EditText
51-
android:id="@+id/simple_video_description_edit"
52-
android:height="@dimen/text_edit_height"
53-
android:layout_weight="1"
54-
android:layout_width="match_parent"
55-
android:layout_height="wrap_content"
56-
android:lines="1"
57-
android:singleLine="true"
58-
/>
59-
</LinearLayout>
60-
<LinearLayout
61-
android:layout_width="match_parent"
62-
android:layout_height="wrap_content"
63-
android:orientation="vertical"
64-
android:background="@color/medium_gray"
65-
>
66-
<TextView
67-
android:id="@+id/simple_video_media_id_label"
68-
android:layout_width="wrap_content"
69-
android:layout_height="wrap_content"
70-
android:text="@string/media_id"
71-
/>
72-
<EditText
73-
android:id="@+id/simple_video_media_id_edit"
74-
android:height="@dimen/text_edit_height"
75-
android:layout_weight="1"
76-
android:layout_width="match_parent"
77-
android:layout_height="wrap_content"
78-
android:lines="1"
79-
android:singleLine="true"
80-
/>
81-
</LinearLayout>
82-
<Button
83-
android:id="@+id/simple_video_insert_button"
84-
android:layout_width="wrap_content"
85-
android:layout_height="wrap_content"
86-
android:text="@string/simple_insert_text"
87-
/>
88-
</LinearLayout>
21+
android:singleLine="true"
22+
/>
23+
24+
<TextView
25+
android:id="@+id/simple_video_description_label"
26+
android:layout_width="wrap_content"
27+
android:layout_height="wrap_content"
28+
android:text="@string/description"
29+
/>
30+
<EditText
31+
android:id="@+id/simple_video_description_edit"
32+
android:height="@dimen/text_edit_height"
33+
android:layout_width="fill_parent"
34+
android:layout_height="wrap_content"
35+
android:singleLine="true"
36+
/>
37+
38+
<TextView
39+
android:id="@+id/simple_video_media_id_label"
40+
android:layout_width="wrap_content"
41+
android:layout_height="wrap_content"
42+
android:text="@string/media_id"
43+
/>
44+
<EditText
45+
android:id="@+id/simple_video_media_id_edit"
46+
android:height="@dimen/text_edit_height"
47+
android:layout_width="match_parent"
48+
android:layout_height="wrap_content"
49+
android:singleLine="true"
50+
/>
51+
<Button
52+
android:id="@+id/simple_video_insert_button"
53+
android:layout_width="wrap_content"
54+
android:layout_height="wrap_content"
55+
android:text="@string/simple_insert_text"
56+
/>
8957

9058
<!--The list of video data. -->
9159
<ListView
Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
<?xml version="1.0" encoding="utf-8"?>
22

33
<LinearLayout
4-
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:android="http://schemas.android.com/apk/res/android"
55
android:layout_width="match_parent"
66
android:id="@+id/simple_video_list_item"
77
android:layout_height="match_parent"
88
android:orientation="vertical"
99
>
10-
<!--android:layout_gravity="center_horizontal"-->
11-
<LinearLayout
12-
android:id="@+id/simple_video_list_item"
10+
<TextView
11+
android:id="@+id/simple_video_title_text"
1312
android:layout_width="match_parent"
14-
android:layout_height="match_parent"
15-
android:orientation="horizontal"
16-
>
17-
<TextView
18-
android:id="@+id/simple_video_title_text"
19-
android:layout_width="match_parent"
20-
android:layout_height="?android:attr/listPreferredItemHeight"
21-
android:textAppearance="?android:attr/textAppearanceLarge"
22-
android:gravity="center_vertical"
23-
android:paddingLeft="5dip"
24-
android:singleLine="true"
25-
android:layout_gravity="center_vertical"
26-
/>
27-
</LinearLayout>
13+
android:layout_height="?android:attr/listPreferredItemHeight"
14+
android:textAppearance="?android:attr/textAppearanceLarge"
15+
android:gravity="center_vertical"
16+
android:paddingLeft="5dip"
17+
android:singleLine="true"
18+
android:layout_gravity="center_vertical"
19+
/>
2820
</LinearLayout>

FinchVideo/res/layout/video_list_item.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ xmlns:android="http://schemas.android.com/apk/res/android"
77
android:layout_height="match_parent"
88
android:orientation="vertical"
99
>
10-
<!--android:layout_gravity="center_horizontal"-->
1110
<LinearLayout
1211
android:id="@+id/video_list_item"
1312
android:layout_width="wrap_content"

FinchVideo/res/layout/video_query_activity.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,13 @@
2020
android:layout_gravity="center_horizontal"
2121
android:background="@color/medium_gray"
2222
>
23-
<com.finchframework.finch.views.MesgEditText
23+
<EditText
2424
android:id="@+id/video_search_box"
2525
android:width="0px"
2626
android:height="40px"
2727
android:layout_weight="1"
2828
android:layout_width="wrap_content"
2929
android:layout_height="wrap_content"
30-
android:text="@string/finch_video_search"
31-
android:lines="1"
3230
android:singleLine="true"
3331
/>
3432
<ImageButton

FinchVideo/res/values/strings.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
<resources>
33
<string name="finch_video_app_name">Finch Video</string>
44
<string name="finch_video_update_content">Update Content</string>
5-
<string name="finch_video_search">Search Videos</string>
6-
<string name="app_name">YouTube Video Example</string>
5+
<string name="app_name">FinchVideo</string>
76

87
<string name="simple_insert_text">Insert</string>
98
<string name="title">Title</string>

0 commit comments

Comments
 (0)