mirror of
https://github.com/bspeice/itcs4180
synced 2024-12-04 21:28:10 -05:00
User interface for Discount Calculator is complete
This commit is contained in:
parent
6a42740848
commit
a3de9394f0
@ -1,16 +1,186 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/TableLayout1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="350dp"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context=".MainActivity" >
|
||||
|
||||
<TextView
|
||||
<TableRow
|
||||
android:id="@+id/tableRow1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/hello_world" />
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingBottom="8dp" >
|
||||
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/lblListedPrice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lblListedPrice"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtListedPrice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:hint="@string/hintTxtListedPrice"
|
||||
android:inputType="numberDecimal"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" >
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingBottom="8dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lblDiscountPercent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/lblDiscountPct"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rdgDiscountPercent"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rad10Pct"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/rad10Pct"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rad25Pct"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/rad25Pct"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rad50Pct"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/rad50Pct"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radCustomPct"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/radCustomPct"
|
||||
android:textSize="9sp" />
|
||||
</RadioGroup>
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingBottom="8dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lblCustomPercent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/radCustomPct"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekCustom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lblCustomPercentValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lblCustomPercentValue"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingBottom="8dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lblUserSaves"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lblUserSaves"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lblUserSavesValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/lblUserSavesValue"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingBottom="8dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lblUserPays"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lblUserPays"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lblUserPaysValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/lblUserPaysValue"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tableRow6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingBottom="8dp" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnExit"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/btnExit" />
|
||||
</TableRow>
|
||||
|
||||
</TableLayout>
|
@ -1,8 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">HW2</string>
|
||||
<string name="app_name">Discount Calculator</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="hello_world">Hello world!</string>
|
||||
<string name="lblListedPrice">Listed Price</string>
|
||||
<string name="lblDiscountPct">Discount %</string>
|
||||
<string name="hintTxtListedPrice">Enter Listed Price</string>
|
||||
<string name="rad10Pct">10%</string>
|
||||
<string name="rad25Pct">25%</string>
|
||||
<string name="rad50Pct">50%</string>
|
||||
<string name="radCustomPct">Custom</string>
|
||||
<string name="lblCustomPercentValue">0%</string>
|
||||
<string name="lblUserSaves">You Saved</string>
|
||||
<string name="lblUserSavesValue">$0.00</string>
|
||||
<string name="lblUserPays">You Pay</string>
|
||||
<string name="btnExit">Exit</string>
|
||||
<string name="lblUserPaysValue">$0.00</string>
|
||||
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user