跳到主要內容

【Android Development for Beginners】 Lesson 2A : Solving Math Problems

This Notes is according to the udacity free course :

Android Development for Beginners

Lesson 2A :  Solving Math Problems

So we know how to let our machine to display the number, and then we want to ask them to help us do some math work.



Just type a formula in the display function and then run you app.

Tips : If you want to use some difficult operation in you formula just google it : arithmetic operator java
Tips 2 : If you cannot run well your app just follow those steps don't be anxious~ :-)



The pathway for an app works:


Follow the pathway, when you click on the "order" button, it will call the xml to the java method. (1--->2)

The method will called to display(2) , and we have to define what is "display" and where we want to DISPLAY on the front layer(screen)

So we define the method and the method attach on the id "quantity_text_view" which is the word "2" on the screen.(3--->4--->5)


H.W.

留言

這個網誌中的熱門文章

R 語言翻轉教室-2

Lesson 2 :  Object 入門操作 R的object結構是依照針對資料結構分析所設計的。 最簡單的object 即為 一串數字  。 一般程式語言最簡單的object則為 一個數字。 若要儲存一個向量到變數“x”當中: example: 要用R 建立一個內容為10.4, 5.6, 3.1和6.4的向量, 最常用的方式就是輸入:`c(10.4, 5.6, 3.1, 6.4)` 請同學依照這樣的語法建立一個這樣的向量,並且把它存為變數x。 Ans:x <- c(10.4, 5.6, 3.1, 6.4) 欲求出變數向量的最大最小值: c(min(x), max(x)) 欲求出範圍: range(x) 欲求出向量平均: sum(x)/length(x)(總和/向量長度)

R語言翻轉教室-3【01-RBasic-03-Data-Structure-Object】

*R的物件結構 組成R語言的基本物件結構為「向量」。 向量物件有兩個很重要的屬性: `mode`和`length`。 `mode`代表這個向量的值型態,總共有:`logical`、`integer`、`numeric`、`complex`、`character`和`raw`。 `length`則代表這個向量中值的個數。 list可以裝所有R的物件 所有的R物件都有「屬性」 所有R 物件的attributes都是帶有名字的list。 本課程筆記,出處: R語言翻轉教室 回家作業: 連結

【 Android Development for Beginners】 Lesson 3A : Object Oriented Programming - 4

(I think Lesson 3A is the most important but also the most difficult part for beginner so far ) This Notes is according to the udacity free course : Android Development for Beginners Lesson 3A : Object Oriented Programming Call Method on an objects If We want to call a method on an object object variable name . method name ( input argument ); ex: titleTextView.setText("News"); You need to make sure you put a right object so you can call the method