DT @12.09.2015: Refactored, report activity extended
This commit is contained in:
12
.idea/runConfigurations.xml
generated
Normal file
12
.idea/runConfigurations.xml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
10
app/app.iml
10
app/app.iml
@@ -12,10 +12,12 @@
|
||||
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
|
||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
|
||||
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
|
||||
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
|
||||
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugAndroidTestSources" />
|
||||
<afterSyncTasks>
|
||||
<task>generateDebugAndroidTestSources</task>
|
||||
<task>generateDebugSources</task>
|
||||
</afterSyncTasks>
|
||||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
|
||||
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
||||
@@ -24,7 +26,7 @@
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
|
||||
<exclude-output />
|
||||
@@ -122,8 +124,8 @@
|
||||
<orderEntry type="library" exported="" name="play-services-drive-7.5.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="play-services-gcm-7.5.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="retrofit-1.6.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="library-1.0.18" level="project" />
|
||||
<orderEntry type="library" exported="" name="play-services-appindexing-7.5.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="library-1.0.19" level="project" />
|
||||
<orderEntry type="library" exported="" name="play-services-wearable-7.5.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="play-services-safetynet-7.5.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="play-services-games-7.5.0" level="project" />
|
||||
|
||||
@@ -4,9 +4,10 @@ import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.beardedhen.androidbootstrap.BootstrapButton;
|
||||
|
||||
import org.deke.risk.riskahead.helper.BaseActivity;
|
||||
import org.deke.risk.riskahead.helper.SQLiteHandler;
|
||||
|
||||
@@ -20,7 +21,7 @@ public class ProfileActivity extends BaseActivity {
|
||||
|
||||
private TextView txtName;
|
||||
private TextView txtEmail;
|
||||
private Button btnLogout;
|
||||
private BootstrapButton btnLogout;
|
||||
|
||||
private SQLiteHandler db;
|
||||
public HashMap<String, String> user;
|
||||
@@ -31,7 +32,7 @@ public class ProfileActivity extends BaseActivity {
|
||||
|
||||
txtName = (TextView) findViewById(R.id.txt_profile_name);
|
||||
txtEmail = (TextView) findViewById(R.id.txt_profile_email);
|
||||
btnLogout = (Button) findViewById(R.id.btn_profile_logout);
|
||||
btnLogout = (BootstrapButton) findViewById(R.id.btn_profile_logout);
|
||||
|
||||
btnLogout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -55,13 +56,7 @@ public class ProfileActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
return item.getItemId() == R.id.action_settings || super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_main2"
|
||||
tools:context="org.deke.risk.riskahead.ProfileActivity">
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_main_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -17,41 +18,215 @@
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:text="@string/lbl_profile_title"
|
||||
android:id="@+id/lbl_profile_username"
|
||||
android:text="@string/lbl_profile_username"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20dp"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
android:layout_marginTop="10dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txt_profile_username"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/lbl_profile_username"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_profile_name"
|
||||
android:text="@string/lbl_profile_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_below="@+id/txt_profile_username" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_profile_surname"
|
||||
android:text="@string/lbl_profile_surname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_above="@+id/txt_profile_surname"
|
||||
android:layout_alignLeft="@+id/txt_profile_surname"
|
||||
android:layout_alignStart="@+id/txt_profile_surname"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txt_profile_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/lbl_name"
|
||||
android:textSize="24dp"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
android:ems="8"
|
||||
android:layout_below="@+id/lbl_profile_name"
|
||||
android:layout_alignLeft="@+id/lbl_profile_name"
|
||||
android:layout_alignStart="@+id/lbl_profile_name"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txt_profile_surname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="8"
|
||||
android:layout_alignBottom="@+id/txt_profile_name"
|
||||
android:layout_toRightOf="@+id/txt_profile_name"
|
||||
android:layout_toEndOf="@+id/txt_profile_name"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_profile_email"
|
||||
android:text="@string/lbl_profile_email"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_below="@+id/txt_profile_name"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txt_profile_email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13dp" />
|
||||
android:layout_below="@+id/lbl_profile_email"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_profile_logout"
|
||||
android:text="@string/btn_profile_logout"
|
||||
<TextView
|
||||
android:id="@+id/lbl_profile_password"
|
||||
android:text="@string/lbl_profile_password"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_below="@+id/txt_profile_email"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txt_profile_password"
|
||||
android:inputType="textPassword"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="7"
|
||||
android:layout_below="@+id/lbl_profile_password"/>
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||
android:id="@+id/btn_profile_change"
|
||||
android:text="@string/btn_profile_change"
|
||||
android:minWidth="155dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
bootstrap:bb_icon_left="fa-paint-brush"
|
||||
bootstrap:bb_type="primary"
|
||||
bootstrap:bb_roundedCorners="true"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_alignTop="@+id/lbl_profile_password"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_trennlinie"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dip"
|
||||
android:background="#cc273e"
|
||||
android:layout_below="@+id/btn_profile_change"
|
||||
android:layout_marginTop="20dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lbl_profile_stats"
|
||||
android:text="@string/lbl_profile_stats"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40dip"
|
||||
android:background="@color/btn_logut_bg"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15dp" />
|
||||
android:layout_marginTop="10dp"
|
||||
android:textColor="#cc273e"
|
||||
android:layout_below="@+id/lbl_trennlinie"/>
|
||||
|
||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/lbl_profile_stats"
|
||||
android:stretchColumns="1">
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:id="@+id/lbl_profile_membersince"
|
||||
android:text="@string/lbl_profile_member_since"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:padding="3dip"
|
||||
android:textColor="#FF0099CC"/>
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/txt_profile_membersince"
|
||||
android:text="0"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:padding="3dip"
|
||||
android:textColor="#FF0099CC"/>
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:id="@+id/lbl_profile_points"
|
||||
android:text="@string/lbl_profile_points"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="3dip"
|
||||
android:textColor="#FF0099CC"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_profile_points"
|
||||
android:text="0"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="3dip"
|
||||
android:textColor="#FF0099CC"/>
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:id="@+id/lbl_profile_ranking"
|
||||
android:text="@string/lbl_profile_ranking"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="3dip"
|
||||
android:textColor="#FF0099CC"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_profile_ranking"
|
||||
android:text="0"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="3dip"
|
||||
android:textColor="#FF0099CC"/>
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:id="@+id/lbl_profile_numberposts"
|
||||
android:text="@string/lbl_profile_numberposts"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="3dip"
|
||||
android:textColor="#FF0099CC"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_profile_numberposts"
|
||||
android:text="0"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="3dip"
|
||||
android:textColor="#FF0099CC"/>
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||
android:id="@+id/btn_profile_viewposts"
|
||||
android:text="@string/btn_profile_viewposts"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="155dp"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
bootstrap:bb_icon_left="fa-search"
|
||||
bootstrap:bb_type="primary"
|
||||
bootstrap:bb_roundedCorners="true"/>
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/navList"
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<string name="title_activity_entrance">Risk Ahead</string>
|
||||
|
||||
<string name="btn_profile_logout">Logout</string>
|
||||
<string name="btn_profile_change">Confirm changes</string>
|
||||
<string name="lbl_profile_title">Welcome</string>
|
||||
|
||||
<string name="drawer_open">Open navigation drawer</string>
|
||||
@@ -69,6 +70,17 @@
|
||||
<string name="lbl_report_category">Crime Category</string>
|
||||
<string name="lbl_report_time">Time (hh:mm)</string>
|
||||
<string name="lbl_report_date">Date (dd-mm-yyyy) of incident</string>
|
||||
<string name="lbl_profile_name">Name</string>
|
||||
<string name="lbl_profile_surname">Surname</string>
|
||||
<string name="lbl_profile_email">E-Mail</string>
|
||||
<string name="lbl_profile_username">Username</string>
|
||||
<string name="lbl_profile_stats">Profile stats</string>
|
||||
<string name="lbl_profile_member_since">member since</string>
|
||||
<string name="lbl_profile_points">points</string>
|
||||
<string name="lbl_profile_ranking">ranking</string>
|
||||
<string name="lbl_profile_numberposts">number of posts</string>
|
||||
<string name="btn_profile_viewposts">View posts</string>
|
||||
<string name="lbl_profile_password">Password</string>
|
||||
|
||||
<string-array name="incident_categories">
|
||||
<item>Personal</item>
|
||||
|
||||
Reference in New Issue
Block a user