Initial commit.
This commit is contained in:
parent
5114bd8600
commit
1241635088
22 changed files with 695 additions and 0 deletions
BIN
res/drawable-hdpi/icon.png
Normal file
BIN
res/drawable-hdpi/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
BIN
res/drawable-ldpi/icon.png
Normal file
BIN
res/drawable-ldpi/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
res/drawable-mdpi/icon.png
Normal file
BIN
res/drawable-mdpi/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3 KiB |
BIN
res/drawable-xhdpi/icon.png
Normal file
BIN
res/drawable-xhdpi/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9 KiB |
8
res/drawable/border.xml
Normal file
8
res/drawable/border.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<stroke android:width="1px" android:color="#D6DBD6" />
|
||||
<solid android:color="@android:color/white" />
|
||||
<padding android:left="7dp" android:top="7dp"
|
||||
android:right="7dp" android:bottom="7dp" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
11
res/drawable/green_gradient.xml
Normal file
11
res/drawable/green_gradient.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="#016701"
|
||||
android:startColor="#359D3A" />
|
||||
|
||||
<corners android:radius="0dp" />
|
||||
|
||||
</shape>
|
161
res/layout/main.xml
Normal file
161
res/layout/main.xml
Normal file
|
@ -0,0 +1,161 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleBar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="45dip"
|
||||
android:background="@drawable/green_gradient"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dip"
|
||||
android:shadowColor="#000000"
|
||||
android:shadowDx="2"
|
||||
android:shadowDy="2"
|
||||
android:shadowRadius="1.5"
|
||||
android:text="@string/app_name"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="10dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_amount"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" >
|
||||
</TextView>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/amount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/hint_amount"
|
||||
android:inputType="number"
|
||||
android:textColorHint="#FFCCCCCC" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_interest"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" >
|
||||
</TextView>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/interest"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/hint_interest"
|
||||
android:inputType="numberDecimal"
|
||||
android:textColorHint="#FFCCCCCC" >
|
||||
</EditText>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_months"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" >
|
||||
</TextView>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/months"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/hint_months"
|
||||
android:inputType="number"
|
||||
android:textColorHint="#FFCCCCCC" >
|
||||
</EditText>
|
||||
|
||||
<Button
|
||||
android:id="@+id/calculate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:drawableLeft="@drawable/icon"
|
||||
android:drawablePadding="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="15dp"
|
||||
android:text="@string/btn_calculate"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textStyle="bold" >
|
||||
</Button>
|
||||
|
||||
<TableLayout
|
||||
android:id="@+id/tableLayout1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="3dp"
|
||||
android:background="@drawable/border" >
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/label_payment"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" >
|
||||
</TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/payment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:gravity="right"
|
||||
android:text="@string/hint_calculate"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="#FFCCCCCC" >
|
||||
</TextView>
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/label_cost"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" >
|
||||
</TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cost"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:gravity="right"
|
||||
android:text="@string/hint_calculate"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="#FFCCCCCC" >
|
||||
</TextView>
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
21
res/values-fr/strings.xml
Normal file
21
res/values-fr/strings.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Emprunt</string>
|
||||
<string name="about_copyright">© 2011–12 Erik C. Thauvin.\nTous droits réservés.\n\nhttp://m.thauvin.net/android/</string>
|
||||
<string name="about_copyright_blackberry">© 2011–12 Erik C. Thauvin.\nTous droits réservés.\n\nhttp://m.thauvin.net/blackberry/</string>
|
||||
<string name="about_title">À propos d\'</string>
|
||||
<string name="btn_calculate">Calculer</string>
|
||||
<string name="hint_amount">ex. 100000</string>
|
||||
<string name="hint_calculate">à calculer…</string>
|
||||
<string name="hint_interest">ex. 5.2</string>
|
||||
<string name="hint_months">ex. 240</string>
|
||||
<string name="label_amount">Montant emprunté:</string>
|
||||
<string name="label_cost">Coût total:</string>
|
||||
<string name="label_interest">Taux d\'intérêt:</string>
|
||||
<string name="label_months">Nombre de mensualités:</string>
|
||||
<string name="label_payment">Mensualité:</string>
|
||||
<string name="label_version">Version:</string>
|
||||
<string name="menu_about">À propos</string>
|
||||
|
||||
</resources>
|
6
res/values-v11/themes.xml
Normal file
6
res/values-v11/themes.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Emprunt" parent="@android:style/Theme.Holo.Light" />
|
||||
|
||||
</resources>
|
21
res/values/strings.xml
Normal file
21
res/values/strings.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Loan</string>
|
||||
<string name="about_copyright">© 2011–12 Erik C. Thauvin.\nAll Rights Reserved.\n\nhttp://m.thauvin.net/android/</string>
|
||||
<string name="about_copyright_blackberry">© 2011–12 Erik C. Thauvin.\nAll Rights Reserved.\n\nhttp://m.thauvin.net/blackberry/</string>
|
||||
<string name="about_title">About </string>
|
||||
<string name="btn_calculate">Calculate</string>
|
||||
<string name="hint_amount">e.g. 100000</string>
|
||||
<string name="hint_calculate">to be calculated…</string>
|
||||
<string name="hint_interest">e.g. 5.2</string>
|
||||
<string name="hint_months">e.g. 240</string>
|
||||
<string name="label_amount">Loan Amount:</string>
|
||||
<string name="label_cost">Total Cost:</string>
|
||||
<string name="label_interest">Interest Rate:</string>
|
||||
<string name="label_months">Number of Months:</string>
|
||||
<string name="label_payment">Payment:</string>
|
||||
<string name="label_version">Version:</string>
|
||||
<string name="menu_about">About</string>
|
||||
|
||||
</resources>
|
4
res/values/themes.xml
Normal file
4
res/values/themes.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Emprunt" parent="@android:style/Theme.Light.NoTitleBar" />
|
||||
</resources>
|
Loading…
Add table
Add a link
Reference in a new issue