Skip to content

Commit 87c41d7

Browse files
committed
Add links to the app lessons in the concept lessons
1 parent 97f3ffc commit 87c41d7

File tree

5 files changed

+48
-2
lines changed

5 files changed

+48
-2
lines changed

concept_lessons/_android_intent.html.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ This is a simple example of an share Android Intent. This is typically used when
5252

5353
Let us now observe a couple of examples to see how Intent works, how you pass data and how you use Implicit Intents to delegate responsibilities to other apps.
5454

55+
<div class="ac">
56+
<%= link_to "Go to hands on tutorial on Intent", app_tutorial_module_with_token_path("twitter", LessonModule.find_by_lesson_number(42).lesson.token), class: "btn btn-success btn-large" %>
57+
</div>
5558

5659
##Android Intent Example
5760

concept_lessons/_android_introduction.html.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ This is usually referred to as the launcher Activity or the main Activity too.
3232

3333
* Every Android app has a Manifest.xml where all Activites are defined and one Activity is marked as Main Activity. One of the most common error developers commit when they start with Android development is forgetting to add a new Activity in Mainfest.xml file.
3434

35-
As a developer, Activity is a Java class file where you write the logic. Activity does not include the UI. Rather, one of the things you need to write in your Activity logic is - which UI to show.
35+
As a developer, Activity is a Java class file where you write the logic. Activity does not include the UI. Rather, one of the things you need to write in your Activity logic is - which UI to show. <br/>
36+
<div class="ac">
37+
<%= link_to "Go to hands on tutorial on Acitivity", app_tutorial_module_with_token_path("twitter", LessonModule.find_by_lesson_number(4).lesson.token), class: "btn btn-success btn-large" %>
38+
</div>
3639

3740
## User Interface / Views
3841

@@ -62,7 +65,9 @@ UI is defined as XML. The top XML element is a Layout element . Inside it, there
6265
</LinearLayout>
6366

6467
You may read more about Layouts & Views in our <%= link_to "Layout Concept Lesson", android_concept_lesson_path("android-layout") %> & <%= link_to "View Concept Lesson", android_concept_lesson_path("android-views") %>.
65-
68+
<div class="ac">
69+
<%= link_to "Go to hands on tutorial on Android UI", app_tutorial_module_with_token_path("twitter", LessonModule.find_by_lesson_number(4).lesson.token), class: "btn btn-success btn-large" %>
70+
</div>
6671
## Intents
6772

6873
To move from one Activity to another (or one screen to another), on user interaction like click of a button or click of a notification item, Intents are used. It is possible to pass data including whole objects with Intent. Using Intent you can also open another Android application.
@@ -73,6 +78,9 @@ With Activity, Views and Intent; you can create a basic Android app. Lots of app
7378

7479
Let’s look into some of the advanced Android concepts.
7580

81+
<div class="ac">
82+
<%= link_to "Go to hands on tutorial on Intents", app_tutorial_module_with_token_path("twitter", LessonModule.find_by_lesson_number(42).lesson.token), class: "btn btn-success btn-large" %>
83+
</div>
7684
## Services
7785

7886
Have you ever listened to Music on your phone? Have you observed that the music continues to play in the background when you go to the home screen from the Music app or close the app?

concept_lessons/_android_layout.html.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ For any view/viewgroup we need to specify its width & height. If not specified,
4646

4747
LinearLayout can be used in vertical or horizontal fashion. We can set the orientation of the layout by setting the `android:orientation` attribute.
4848

49+
4950
### Horizontal Orientation
5051

5152
`Horizontal`
@@ -99,6 +100,9 @@ Save the file & deploy your Android app. You will see the screenshot as shown be
99100
<p class="ac"><b>Linear Layout vertical alignment screenshot</b></p>
100101
<br/>
101102

103+
<div class="ac">
104+
<%= link_to "Go to hands on tutorial on Android UI", app_tutorial_module_with_token_path("twitter", LessonModule.find_by_lesson_number(4).lesson.token), class: "btn btn-success btn-large" %>
105+
</div>
102106

103107
## Android Relative Layout
104108

@@ -108,6 +112,7 @@ Relative layout is one of the basic layouts available to design UI in Android. I
108112

109113
In this layout, you can specify the child layouts w.r.t its sibling or parent. One or more of the following attributes must be set for every view. Otherwise, the views will be rendered one over another in the **top left** region of the RelativeLayout.
110114

115+
111116
### Position relative to container/parent
112117

113118
<br/>
@@ -126,6 +131,7 @@ To position an element at the horizontal center, **layout_centerHorizontal** is
126131

127132
Similarly, **layout_centerVertical** positions the element vertically at the center. **layout_centerInParent** is layout_centerVertical & layout_centerHorizontal combined.
128133

134+
129135
### Position relative to sibling
130136

131137
You can position an element relative to another element in the layout. To refer to an element, it must have a unique ID. This can be assigned using the **android:id** attribute. The attribute can be used to reference the child element against which the positioning needs to be done. More about ids are discussed in the later part of this article.
@@ -134,6 +140,8 @@ You can position an element relative to another element in the layout. To refer
134140

135141
Apart from it, there is **layout_above & layout_below**. The names are self explanatory.
136142

143+
144+
137145
### Android Relative Layout Example
138146

139147
[Download this sample project](https://github.com/codelearn-org/android-relative-layout-example/archive/master.zip) , import in Eclipse & navigate to [activity_relative_layout.xml](https://github.com/codelearn-org/android-relative-layout-example/tree/master/res/layout) file as shown in the screenshot below.
@@ -191,6 +199,10 @@ The date field '26 Nov 2013' is again a TextView element aligned to the right of
191199
.
192200
/>
193201

202+
<div class="ac">
203+
<%= link_to "Go to hands on tutorial on Android UI", app_tutorial_module_with_token_path("twitter", LessonModule.find_by_lesson_number(4).lesson.token), class: "btn btn-success btn-large" %>
204+
</div>
205+
194206
## Choosing between Linear & Relative Layout
195207

196208
An important consideration when dealing with layout elements is when is it good to use which layout element. The **LinearLayout** is optimized for
@@ -314,6 +326,10 @@ This behavior is similar to how HTML table behaves.
314326
<br/>
315327

316328

329+
<div class="ac">
330+
<%= link_to "Go to hands on tutorial on Android UI", app_tutorial_module_with_token_path("twitter", LessonModule.find_by_lesson_number(4).lesson.token), class: "btn btn-success btn-large" %>
331+
</div>
332+
317333
## Invoking Layout from Activity
318334

319335
In each demo we have created a layout and now let us see how this can be used in the Activity. Images, layout files and other application assets stored in the **res** folder are referred as resources in Android. The Android framework creates a unique id for each resource and this exact id can be used to refer to these resources.
@@ -366,3 +382,4 @@ You can specify width and height with exact measurements, though you probably wo
366382
* match_parent (referred as fill_parent in API Level 8 and lower) tells your view to become as big as its parent view group will allow.
367383

368384
In general, specifying a layout width and height using absolute units such as pixels is not recommended. Instead, using relative measurements such as density-independent pixel units (dp), wrap_content, or fill_parent, is a better approach, because it helps ensure that your application will display properly across a variety of device screen sizes.
385+

concept_lessons/_android_listview.html.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ If you notice in the above example, we have used Android.R.Layout item. This is
133133
* simple_list_item_single_choice : A List Item with a radio button after textView. You can use this when you want to get a choice from the user.
134134
* simple_list_item_multiple_choice: A List Item with a Check Box after textview. You can use this when you want to get multiple choices from the user.
135135

136+
<div class="ac">
137+
<%= link_to "Go to hands on tutorial on List View", app_tutorial_module_with_token_path("twitter", LessonModule.find_by_lesson_number(43).lesson.token), class: "btn btn-success btn-large" %>
138+
</div>
136139

137140
##Custom ListView with BaseAdapter
138141

@@ -408,6 +411,9 @@ This is how the ListView will look when you run it:
408411

409412
<%= image_tag "list_view/Custom_Base_adapter.png", alt: "Android Listview Custom Adapter", title: "Custom Adapter" %>
410413

414+
<div class="ac">
415+
<%= link_to "Go to hands on tutorial on Custom List View", app_tutorial_module_with_token_path("twitter", LessonModule.find_by_lesson_number(43).lesson.token), class: "btn btn-success btn-large" %>
416+
</div>
411417

412418
##ListView Click Listener
413419

@@ -444,6 +450,9 @@ This is how our click listener looks like :
444450

445451
Now you get a fair understanding of how ListView works in Android. Let's See Some more tricks which can help you
446452

453+
<div class="ac">
454+
<%= link_to "Go to hands on tutorial on List View Click Listener", app_tutorial_module_with_token_path("twitter", LessonModule.find_by_lesson_number(43).lesson.token), class: "btn btn-success btn-large" %>
455+
</div>
447456

448457
##ListActivity
449458

@@ -493,3 +502,4 @@ You can view the ListActivity example in the sample project that you downloaded.
493502
>Watchout: ListActivity works well if you have only single ListView. In case you have more than one Android listview, you need to put extra code for the other ListView to work.
494503
495504
You can download the sample app from [here](https://github.com/pranayairan/Code-Learn-Android-Example/tree/master/CodeLearnListExample)
505+

concept_lessons/_android_views.html.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@ Add listener
292292
});
293293
In the above code, you add a click listener to the button. Whenever the button is clicked , the onclick method of button is called.
294294

295+
<div class="ac">
296+
<%= link_to "Go to hands on tutorial on Click Listener", app_tutorial_module_with_token_path("twitter", LessonModule.find_by_lesson_number(41).lesson.token), class: "btn btn-success btn-large" %>
297+
</div>
295298
###Code
296299
This is how a button will look in XML code
297300

@@ -521,6 +524,10 @@ The ListView is widely used in android applications. A simpler example of list v
521524
> Listview is a complex UI pattern, and we have a separate section about listview. You can read more about list view in ListView Section
522525
523526

527+
<div class="ac">
528+
<%= link_to "Go to hands on tutorial on ListView", app_tutorial_module_with_token_path("twitter", LessonModule.find_by_lesson_number(43).lesson.token), class: "btn btn-success btn-large" %>
529+
</div>
530+
524531
##GridView
525532

526533
###What
@@ -633,3 +640,4 @@ This is how our complete scroll view will look
633640
</ScrollView>
634641

635642
Android has a lot of UI elements which are designed for specific purposes, in this chapter we tried to cover some of the most used UI elements. If you want to read more about other UI controls, you can go to [this link](http://developer.android.com/guide/topics/ui/index.html)
643+

0 commit comments

Comments
 (0)