Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
350 lines (344 sloc) 14.8 KB
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:background="@color/app_background"
tools:context="com.rajdeol.aadhaarreader.HomeActivity">
<LinearLayout
android:id="@+id/ll_top_bar_wrapper"
android:layout_width="match_parent"
android:layout_height="@dimen/top_bar_height"
android:background="@color/top_bar_background"
android:orientation="horizontal">
<!-- Aadhaar Logo-->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.3">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/aadhaar_logo"/>
</LinearLayout>
<!-- Text -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.7">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/top_bar_message"
android:gravity="center"
android:textStyle="bold"
android:textColor="@color/top_bar_text_color"
android:textSize="@dimen/top_bar_text_size"/>
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/tv_welcome_message"
android:layout_below="@+id/ll_top_bar_wrapper"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/welcome_message" />
<!-- Data Table starts -->
<LinearLayout
android:id="@+id/ll_data_wrapper"
android:layout_below="@+id/tv_welcome_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Scan New Card -->
<LinearLayout
android:id="@+id/ll_scan_qr_wrapper"
android:layout_width="match_parent"
android:layout_height="@dimen/home_list_item_height"
android:background="@android:drawable/dialog_holo_light_frame"
android:layout_margin="@dimen/home_list_margin"
android:padding="@dimen/home_list_padding"
android:orientation="horizontal"
android:onClick="scanNow">
<!-- scanner -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/qr_scanner"/>
</LinearLayout>
<!-- Text -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/scan_new_card"
android:gravity="center"
android:textStyle="bold"
android:textColor="@color/top_bar_text_color"
android:textSize="@dimen/home_list_text_size"/>
</LinearLayout>
</LinearLayout>
<!-- View Saved Cards -->
<LinearLayout
android:id="@+id/ll_view_saved_wrapper"
android:onClick="showSavedCards"
android:layout_width="match_parent"
android:layout_height="@dimen/home_list_item_height"
android:background="@android:drawable/dialog_holo_light_frame"
android:layout_margin="@dimen/home_list_margin"
android:padding="@dimen/home_list_padding"
android:orientation="horizontal">
<!-- List icon -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/item_list"/>
</LinearLayout>
<!-- Text -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/view_saved_card"
android:gravity="center"
android:textStyle="bold"
android:textColor="@color/top_bar_text_color"
android:textSize="@dimen/home_list_text_size"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- Scanned Data-->
<LinearLayout
android:id="@+id/ll_scanned_data_wrapper"
android:layout_below="@+id/ll_data_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/dialog_holo_light_frame"
android:layout_margin="@dimen/scanned_data_margin"
android:padding="@dimen/scanned_data_padding"
android:theme="@style/AppTheme.scannedData"
android:orientation="vertical">
<!-- UID -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.scannedData.item"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_uid"/>
<TextView
android:id="@+id/tv_sd_uid"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
<!-- NAME -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.scannedData.item"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_name"/>
<TextView
android:id="@+id/tv_sd_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
<!-- GENDER -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.scannedData.item"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_gender"/>
<TextView
android:id="@+id/tv_sd_gender"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
<!-- YEAR OF BIRTH -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.scannedData.item"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_yob"/>
<TextView
android:id="@+id/tv_sd_yob"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
<!-- CARE OF -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.scannedData.item"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_co"/>
<TextView
android:id="@+id/tv_sd_co"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
<!-- VILLAGE TEHSIL -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.scannedData.item"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_vtc"/>
<TextView
android:id="@+id/tv_sd_vtc"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
<!-- POST OFFICE -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.scannedData.item"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_po"/>
<TextView
android:id="@+id/tv_sd_po"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
<!-- DISTRICT -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.scannedData.item"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_dist"/>
<TextView
android:id="@+id/tv_sd_dist"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
<!-- STATE -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.scannedData.item"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_state"/>
<TextView
android:id="@+id/tv_sd_state"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
<!-- POSTAL CODE -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.scannedData.item"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_pc"/>
<TextView
android:id="@+id/tv_sd_pc"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_action_button_wrapper"
android:layout_below="@id/ll_scanned_data_wrapper"
android:layout_marginTop="@dimen/action_button_margin_top"
android:padding="@dimen/action_button_padding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.48"
android:theme="@style/AppTheme.actionButton"
android:background="@color/action_save_background"
android:text="@string/label_save"
android:onClick="saveData"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.actionButton"
android:layout_weight="0.04"/>
<TextView
android:id="@+id/tv_cancel_action"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.actionButton"
android:layout_weight="0.48"
android:background="@color/action_cancel_background"
android:text="@string/label_cancel"
android:onClick="showHome"/>
</LinearLayout>
</RelativeLayout>
You can’t perform that action at this time.