DT @10.11.2015: Layout überarbeitet, bugfixes (ranking)
@@ -17,7 +17,7 @@
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme" >
|
||||
android:theme="@style/CustomActionBarTheme" >
|
||||
|
||||
<!-- Google Maps Android API V2 requires OpenGL ES version 2 -->
|
||||
<uses-feature
|
||||
|
||||
@@ -313,7 +313,7 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
String token = user.getString("token");
|
||||
|
||||
if(status.equals("0")){
|
||||
new AlertDialog.Builder(getApplicationContext())
|
||||
new AlertDialog.Builder(LoginActivity.this)
|
||||
.setTitle("Activate your account")
|
||||
.setMessage("Your account is not activated yet. Please follow the instructions in your E-Mail. Do you want to resent the E-Mail?")
|
||||
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@@ -44,6 +45,8 @@ public class SettingsActivity extends BaseActivity {
|
||||
txtEmail = (TextView) findViewById(R.id.txt_settings_email);
|
||||
txtPassword = (TextView) findViewById(R.id.txt_settings_password);
|
||||
|
||||
|
||||
|
||||
findViewById(R.id.btn_settings_req_password).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -72,7 +75,7 @@ public class SettingsActivity extends BaseActivity {
|
||||
findViewById(R.id.btn_settings_change).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(txtPassword.getText() != null && txtPassword.getText().toString().isEmpty()){
|
||||
if (txtPassword.getText() != null && txtPassword.getText().toString().isEmpty()) {
|
||||
showMessage("Enter your password to confirm profile changes");
|
||||
return;
|
||||
}
|
||||
@@ -101,6 +104,12 @@ public class SettingsActivity extends BaseActivity {
|
||||
txtName.setText(user.get("name"));
|
||||
txtSurname.setText(user.get("surname"));
|
||||
txtEmail.setText(user.get("email"));
|
||||
|
||||
if(user.get("providerType") != null && user.get("providerType").equals("local")){
|
||||
findViewById(R.id.rl_main_content_2).setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
findViewById(R.id.rl_main_content_2).setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -123,8 +132,8 @@ public class SettingsActivity extends BaseActivity {
|
||||
boolean error = jObj.getBoolean("error");
|
||||
if (!error) {
|
||||
showMessage(jObj.getString("msg"));
|
||||
JSONObject user = jObj.getJSONObject("user");
|
||||
session.addUser(jObj.getString("uid"), user.getString("username"), user.getString("name"), user.getString("surname"), user.getString("email"), user.getString("status"), null, user.getString("created_at"), user.getString("updated_at"), user.getString("token"));
|
||||
JSONObject tmpuser = jObj.getJSONObject("user");
|
||||
session.addUser(jObj.getString("uid"), tmpuser.getString("username"), tmpuser.getString("name"), tmpuser.getString("surname"), tmpuser.getString("email"), tmpuser.getString("status"), user.get("providerType"), tmpuser.getString("created_at"), tmpuser.getString("updated_at"), tmpuser.getString("token"));
|
||||
finish();
|
||||
startActivity(getIntent());
|
||||
} else {
|
||||
@@ -155,11 +164,11 @@ public class SettingsActivity extends BaseActivity {
|
||||
params.put("tag", "updateuser");
|
||||
params.put("uid", user.get("uid"));
|
||||
params.put("token", user.get("token"));
|
||||
params.put("email", user.get("email"));
|
||||
params.put("username", txtUsername.getText().toString());
|
||||
params.put("name", txtName.getText().toString());
|
||||
params.put("surname", txtSurname.getText().toString());
|
||||
params.put("newemail", txtEmail.getText().toString());
|
||||
params.put("email", txtEmail.getText().toString());
|
||||
params.put("providerType", user.get("providerType"));
|
||||
params.put("password", txtPassword.getText().toString());
|
||||
|
||||
return params;
|
||||
|
||||
@@ -56,6 +56,8 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
private ListView mDrawerList;
|
||||
private ArrayAdapter<String> mAdapter;
|
||||
private ShareActionProvider mShareActionProvider;
|
||||
private DrawerItemCustomAdapter adapter;
|
||||
private String[] mNavigationDrawerItemTitles;
|
||||
|
||||
public SessionManager session;
|
||||
public HashMap<String, String> user;
|
||||
@@ -73,7 +75,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(getLayoutResourceId());
|
||||
|
||||
overridePendingTransition(R.anim.fade_in_anim,R.anim.fade_out_anim);
|
||||
overridePendingTransition(R.anim.fade_in_anim, R.anim.fade_out_anim);
|
||||
|
||||
pDialog = new ProgressDialog(this);
|
||||
pDialog.setCancelable(false);
|
||||
@@ -81,6 +83,17 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
session = new SessionManager(getApplicationContext());
|
||||
user = session.getUserDetails();
|
||||
|
||||
ObjectDrawerItem[] drawerItem = new ObjectDrawerItem[7];
|
||||
drawerItem[0] = new ObjectDrawerItem(R.drawable.ic_action_web_site, "Start");
|
||||
drawerItem[1] = new ObjectDrawerItem(R.drawable.ic_action_flash_on, "Report");
|
||||
drawerItem[2] = new ObjectDrawerItem(R.drawable.ic_action_map, "Incident Map");
|
||||
drawerItem[3] = new ObjectDrawerItem(R.drawable.ic_action_about, "User Statistics");
|
||||
drawerItem[4] = new ObjectDrawerItem(R.drawable.ic_action_settings, "Account Settings");
|
||||
drawerItem[5] = new ObjectDrawerItem(R.drawable.ic_action_important, "Subscriptions");
|
||||
drawerItem[6] = new ObjectDrawerItem(R.drawable.ic_action_back, "Logout");
|
||||
|
||||
adapter = new DrawerItemCustomAdapter(this, R.layout.listview_item_row, drawerItem);
|
||||
|
||||
mDrawerList = (ListView)findViewById(R.id.navList);
|
||||
mDrawerLayout = (DrawerLayout)findViewById(R.id.drawer_layout);
|
||||
|
||||
@@ -152,7 +165,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
private void addDrawerItems() {
|
||||
String[] osArray = { "Start", "Report", "Incident Map", "User Statistics", "Account Settings", "Subscriptions", "Logout" };
|
||||
mAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, osArray);
|
||||
mDrawerList.setAdapter(mAdapter);
|
||||
mDrawerList.setAdapter(adapter);
|
||||
|
||||
mDrawerList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package org.deke.risk.riskahead.helper;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.deke.risk.riskahead.R;
|
||||
|
||||
/**
|
||||
* Created by Dennis on 10.11.2015.
|
||||
*/
|
||||
public class DrawerItemCustomAdapter extends ArrayAdapter<ObjectDrawerItem> {
|
||||
|
||||
Context mContext;
|
||||
int layoutResourceId;
|
||||
ObjectDrawerItem data[] = null;
|
||||
|
||||
public DrawerItemCustomAdapter(Context mContext, int layoutResourceId, ObjectDrawerItem[] data) {
|
||||
|
||||
super(mContext, layoutResourceId, data);
|
||||
this.layoutResourceId = layoutResourceId;
|
||||
this.mContext = mContext;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
|
||||
View listItem = convertView;
|
||||
|
||||
LayoutInflater inflater = ((Activity) mContext).getLayoutInflater();
|
||||
listItem = inflater.inflate(layoutResourceId, parent, false);
|
||||
|
||||
ImageView imageViewIcon = (ImageView) listItem.findViewById(R.id.imageViewIcon);
|
||||
TextView textViewName = (TextView) listItem.findViewById(R.id.textViewName);
|
||||
|
||||
ObjectDrawerItem folder = data[position];
|
||||
|
||||
|
||||
imageViewIcon.setImageResource(folder.icon);
|
||||
textViewName.setText(folder.name);
|
||||
|
||||
return listItem;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.deke.risk.riskahead.helper;
|
||||
|
||||
/**
|
||||
* Created by Dennis on 10.11.2015.
|
||||
*/
|
||||
public class ObjectDrawerItem {
|
||||
public int icon;
|
||||
public String name;
|
||||
|
||||
// Constructor.
|
||||
public ObjectDrawerItem(int icon, String name) {
|
||||
|
||||
this.icon = icon;
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!--<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<alpha
|
||||
android:fromAlpha="0.0"
|
||||
android:toAlpha="1.0"
|
||||
android:interpolator="@android:anim/accelerate_interpolator"
|
||||
android:duration="300"
|
||||
android:repeatCount="0" />
|
||||
</set>-->
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate android:fromXDelta="100%p" android:toXDelta="0" android:duration="@android:integer/config_shortAnimTime"/>
|
||||
<alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="@android:integer/config_shortAnimTime" />
|
||||
</set>
|
||||
@@ -1,9 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!--<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<alpha
|
||||
android:fromAlpha="1.0"
|
||||
android:toAlpha="0.0"
|
||||
android:interpolator="@android:anim/accelerate_interpolator"
|
||||
android:duration="300"
|
||||
android:repeatCount="0" />
|
||||
</set>-->
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate android:fromXDelta="0" android:toXDelta="-100%p" android:duration="@android:integer/config_shortAnimTime"/>
|
||||
<alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="@android:integer/config_shortAnimTime" />
|
||||
</set>
|
||||
BIN
app/src/main/res/drawable-hdpi/ic_action_about.png
Normal file
|
After Width: | Height: | Size: 683 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_back.png
Normal file
|
After Width: | Height: | Size: 351 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_flash_on.png
Normal file
|
After Width: | Height: | Size: 389 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_help.png
Normal file
|
After Width: | Height: | Size: 560 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_important.png
Normal file
|
After Width: | Height: | Size: 669 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_map.png
Normal file
|
After Width: | Height: | Size: 824 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_search.png
Normal file
|
After Width: | Height: | Size: 702 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_settings.png
Normal file
|
After Width: | Height: | Size: 456 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_stop.png
Normal file
|
After Width: | Height: | Size: 172 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_web_site.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_action_about.png
Normal file
|
After Width: | Height: | Size: 465 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_back.png
Normal file
|
After Width: | Height: | Size: 336 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_flash_on.png
Normal file
|
After Width: | Height: | Size: 297 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_help.png
Normal file
|
After Width: | Height: | Size: 417 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_important.png
Normal file
|
After Width: | Height: | Size: 485 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_map.png
Normal file
|
After Width: | Height: | Size: 613 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_search.png
Normal file
|
After Width: | Height: | Size: 492 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_settings.png
Normal file
|
After Width: | Height: | Size: 330 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_stop.png
Normal file
|
After Width: | Height: | Size: 188 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_web_site.png
Normal file
|
After Width: | Height: | Size: 793 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_about.png
Normal file
|
After Width: | Height: | Size: 860 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_back.png
Normal file
|
After Width: | Height: | Size: 468 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_flash_on.png
Normal file
|
After Width: | Height: | Size: 449 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_help.png
Normal file
|
After Width: | Height: | Size: 648 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_important.png
Normal file
|
After Width: | Height: | Size: 823 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_map.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_action_search.png
Normal file
|
After Width: | Height: | Size: 916 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_settings.png
Normal file
|
After Width: | Height: | Size: 471 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_stop.png
Normal file
|
After Width: | Height: | Size: 224 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_web_site.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_about.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_back.png
Normal file
|
After Width: | Height: | Size: 527 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_flash_on.png
Normal file
|
After Width: | Height: | Size: 701 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_help.png
Normal file
|
After Width: | Height: | Size: 925 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_important.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_map.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_search.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_settings.png
Normal file
|
After Width: | Height: | Size: 671 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_stop.png
Normal file
|
After Width: | Height: | Size: 297 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_web_site.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
@@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:background="#8ae6e6e6"
|
||||
android:background="@color/bg_common_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
@@ -57,7 +57,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_01"
|
||||
android:gravity="center"
|
||||
android:background="#c5a7a7a7"
|
||||
android:background="@color/bg_common"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#8a000000"
|
||||
android:background="@color/bg_common_2"
|
||||
tools:context=".ProfileActivity">
|
||||
|
||||
<LinearLayout
|
||||
@@ -180,7 +180,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_01"
|
||||
android:gravity="center"
|
||||
android:background="#34bbff"
|
||||
android:background="@color/bg_common"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:background="#8ae6e6e6"
|
||||
android:background="@color/bg_common_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ReportActivity">
|
||||
@@ -37,10 +37,7 @@
|
||||
|
||||
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapEditText
|
||||
bootstrap:bootstrapSize="lg"
|
||||
bootstrap:bootstrapBrand="info"
|
||||
bootstrap:roundedCorners="true"
|
||||
<EditText
|
||||
android:id="@+id/input_report_short"
|
||||
android:hint="@string/input_report_short_hint"
|
||||
android:inputType="text"
|
||||
@@ -60,10 +57,7 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_below="@+id/input_report_short" />
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapEditText
|
||||
bootstrap:bootstrapSize="lg"
|
||||
bootstrap:bootstrapBrand="info"
|
||||
bootstrap:roundedCorners="true"
|
||||
<EditText
|
||||
android:id="@+id/input_report_long"
|
||||
android:hint="@string/input_report_long_hint"
|
||||
android:inputType="textMultiLine"
|
||||
@@ -112,10 +106,7 @@
|
||||
android:layout_alignLeft="@+id/input_report_time"
|
||||
android:layout_alignStart="@+id/input_report_time"/>
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapEditText
|
||||
bootstrap:bootstrapSize="lg"
|
||||
bootstrap:bootstrapBrand="info"
|
||||
bootstrap:roundedCorners="true"
|
||||
<EditText
|
||||
android:id="@+id/input_report_date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -127,10 +118,7 @@
|
||||
android:layout_alignStart="@+id/lbl_report_date"
|
||||
android:focusable="false"/>
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapEditText
|
||||
bootstrap:bootstrapSize="lg"
|
||||
bootstrap:bootstrapBrand="info"
|
||||
bootstrap:roundedCorners="true"
|
||||
<EditText
|
||||
android:id="@+id/input_report_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -187,7 +175,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_01"
|
||||
android:gravity="center"
|
||||
android:background="#34bbff"
|
||||
android:background="@color/bg_common"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginBottom="0dp">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:background="#8a000000"
|
||||
android:background="@color/bg_common_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".SettingsActivity">
|
||||
@@ -138,7 +138,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_01"
|
||||
android:gravity="center"
|
||||
android:background="#34bbff"
|
||||
android:background="@color/bg_common"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginBottom="0dp">
|
||||
|
||||
@@ -43,10 +43,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/input_login"
|
||||
android:textColorHint="@color/input_login_hint"
|
||||
android:enabled="false"
|
||||
android:editable="false"
|
||||
android:layout_marginTop="20dp"/>
|
||||
|
||||
<TextView
|
||||
@@ -65,12 +62,9 @@
|
||||
android:gravity="top|left"
|
||||
android:padding="10dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/input_login"
|
||||
android:textColorHint="@color/input_login_hint"
|
||||
android:layout_below="@+id/lbl_viewreport_long"
|
||||
android:scrollbars="vertical"
|
||||
android:enabled="false"
|
||||
android:editable="false"
|
||||
android:minLines="1"
|
||||
android:lines="4"
|
||||
android:maxLines="4"/>
|
||||
@@ -221,7 +215,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_01"
|
||||
android:gravity="center"
|
||||
android:background="#34bbff"
|
||||
android:background="@color/bg_common"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
|
||||
28
app/src/main/res/layout/listview_item_row.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/activatedBackgroundIndicator"
|
||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||
android:padding="10dp" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageViewIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:paddingRight="10dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@+id/imageViewIcon"
|
||||
android:paddingRight="10dp"
|
||||
android:text="Folder name here."
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSmall"
|
||||
android:textColor="#000000" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -2,8 +2,13 @@
|
||||
|
||||
<color name="bg_login">#26ae90</color>
|
||||
<color name="bg_register">#2e3237</color>
|
||||
<color name="bg_main">#428bca</color>
|
||||
<color name="bg_common_2">#e1e1e1</color>
|
||||
<color name="bg_common">#0461A8</color>
|
||||
<color name="white">#ffffff</color>
|
||||
<color name="title">#ffffff</color>
|
||||
<color name="red">#ff0000</color>
|
||||
<color name="my_awesome_red">#ff4400</color>
|
||||
<color name="my_awesome_darker_red">#03518c</color>
|
||||
<color name="input_login">#222222</color>
|
||||
<color name="input_login_hint">#999999</color>
|
||||
<color name="input_register">#888888</color>
|
||||
|
||||
@@ -102,4 +102,14 @@
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="title_activity_view_report">View Report</string>
|
||||
|
||||
<string-array name="navigation_drawer_items_array">
|
||||
<item>Start</item>
|
||||
<item>Report</item>
|
||||
<item>Incident Map</item>
|
||||
<item>User Statistics</item>
|
||||
<item>Account Settings</item>
|
||||
<item>Subscriptions</item>
|
||||
<item>Logout</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<resources>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<!-- <item name="android:background" tools:ignore="NewApi">@color/red</item>-->
|
||||
<!-- <item name="background">@color/red</item>-->
|
||||
</style>
|
||||
|
||||
<style name="wrapping_button">
|
||||
@@ -8,4 +9,26 @@
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_marginRight">@dimen/micro_padding</item>
|
||||
</style>
|
||||
|
||||
<style name="CustomActionBarTheme" parent="@style/Theme.AppCompat.Light">
|
||||
<item name="android:actionBarStyle" tools:ignore="NewApi">@style/MyActionBar</item>
|
||||
<item name="actionBarStyle">@style/MyActionBar</item>
|
||||
<item name="actionBarTheme">@style/MyActionBarTheme</item>
|
||||
<item name="colorPrimaryDark">@color/my_awesome_darker_red</item>
|
||||
</style>
|
||||
|
||||
<style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
|
||||
<item name="android:background" tools:ignore="NewApi">@color/white</item>
|
||||
<item name="titleTextStyle">@style/MyActionBar.ActionBar.TitleTextStyle</item>
|
||||
<item name="background">@color/bg_common</item>
|
||||
</style>
|
||||
|
||||
<style name="MyActionBarTheme" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
|
||||
<item name="actionMenuTextColor">@color/title</item>
|
||||
<item name="colorControlNormal">@color/title</item>
|
||||
</style>
|
||||
|
||||
<style name="MyActionBar.ActionBar.TitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">
|
||||
<item name="android:textColor">@color/title</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||