Permalink
Browse files

Optimizing App performance

- Deleted unused resources
- Reduced image sizes
- Scrolling through Events list for a sufficient amount of time causes
severe lag -- currently rewriting EventsFragment to try to optimize
memory usage
  • Loading branch information...
1 parent 05a3d54 commit 2038a21d709a1c1de5c681c25fda315be149a2a5 @immranderson immranderson committed Nov 11, 2013
Showing with 935 additions and 228 deletions.
  1. +8 −4 AndroidManifest.xml
  2. BIN libs/android-support-v4.jar
  3. +1 −1 project.properties
  4. BIN res/drawable/donate.png
  5. BIN res/drawable/event_flag.png
  6. BIN res/drawable/event_flag_with_text.png
  7. BIN res/drawable/flag_with_border.png
  8. BIN res/drawable/hd_nav_graphic.jpg
  9. BIN res/drawable/hd_nav_graphic.png
  10. BIN res/drawable/money_bag.png
  11. BIN res/drawable/money_bag_with_border.png
  12. BIN res/drawable/nav_arrow.png
  13. BIN res/drawable/nav_arrow_with_border.png
  14. BIN res/drawable/person.png
  15. BIN res/drawable/person_with_border.png
  16. BIN res/drawable/radar.png
  17. BIN res/drawable/radar_with_border.png
  18. BIN res/drawable/swag.png
  19. BIN res/drawable/theme.png
  20. BIN res/drawable/theme_with_border.png
  21. BIN res/drawable/tom.jpg
  22. BIN res/drawable/wood_background.png
  23. +2 −0 res/layout/{location_menu.xml → context_menu.xml}
  24. +6 −6 res/layout/event.xml
  25. +4 −3 res/layout/{location_menu_card.xml → menu_card.xml}
  26. +0 −40 res/layout/staff.xml
  27. +9 −0 res/menu/main.xml
  28. +2 −0 res/values/colors.xml
  29. +3 −3 src/com/hackerdojo/android/event/EventArrayAdapter.java
  30. +0 −71 src/com/hackerdojo/android/event/EventDetails.java
  31. +168 −0 src/com/hackerdojo/android/event/EventDetailsActivity.java
  32. +55 −55 src/com/hackerdojo/android/event/EventsFragment.java
  33. +517 −0 src/com/hackerdojo/android/event/NewEventsFragment.java
  34. +6 −8 src/com/hackerdojo/android/infoapp/HackerDojoMainActivity.java
  35. +9 −4 src/com/hackerdojo/android/location/LocationMenuFragment.java
  36. +0 −33 src/com/hackerdojo/android/shopping/PurchaseSwagFragment.java
  37. +145 −0 src/com/hackerdojo/android/shopping/ShoppingMenuFragment.java
View
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hackerdojo.android.infoapp"
- android:versionCode="1"
- android:versionName="1.0.0" >
+ android:versionCode="4"
+ android:versionName="4.0.0" >
<uses-sdk android:minSdkVersion="9" />
@@ -13,8 +13,12 @@
android:icon="@drawable/icon"
android:label="@string/app_name" >
<activity
- android:name="com.hackerdojo.android.event.EventDetails"
- android:theme="@style/Theme.AppCompat.Light" />
+ android:name="com.hackerdojo.android.event.EventDetailsActivity"
+ android:theme="@style/Theme.AppCompat.Light" >
+ <meta-data
+ android:name="android.support.PARENT_ACTIVITY"
+ android:value="com.hackerdojo.android.infoapp.HackerDojoMainActivity" />
+ </activity>
<activity android:name="com.hackerdojo.android.location.DojoPinpoint" />
<activity
android:name="com.hackerdojo.android.infoapp.HackerDojoMainActivity"
View
Binary file not shown.
View
@@ -8,6 +8,6 @@
# project structure.
# Project target.
-target=android-14
+target=android-19
android.library.reference.1=../../eclipse/Android/adt-bundle-windows-x86_64-20130219/sdk/extras/android/support/v7/appcompat
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Deleted file not rendered
Deleted file not rendered
View
Deleted file not rendered
Deleted file not rendered
View
Deleted file not rendered
Deleted file not rendered
View
Deleted file not rendered
Deleted file not rendered
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Deleted file not rendered
Deleted file not rendered
View
Deleted file not rendered
Deleted file not rendered
@@ -10,6 +10,8 @@
android:layout_height="match_parent"
android:padding="10dp"
android:background="@color/google_now_grey"
+ android:dividerHeight="10dp"
+ android:divider="@color/google_now_grey"
/>
View
@@ -8,29 +8,29 @@
>
<LinearLayout
- android:id="@+id/linearLayout1"
+ android:id="@+id/event_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="vertical" >
<TextView
- android:id="@+id/textView1"
+ android:id="@+id/event_start_time_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="#005500" >
+ android:textColor="@color/event_green" >
</TextView>
<TextView
- android:id="@+id/textView2"
+ android:id="@+id/event_end_time_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="#990000" >
+ android:textColor="@color/event_red" >
</TextView>
</LinearLayout>
<TextView
- android:id="@+id/textView3"
+ android:id="@+id/event_title_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
@@ -9,19 +9,20 @@
<ImageView
android:src="@drawable/hd_nav_graphic"
android:layout_width="match_parent"
- android:layout_height="100dp"
+ android:layout_height="150dp"
android:scaleType="centerCrop"
- android:id="@+id/location_menu_iv"
+ android:id="@+id/menu_card_iv"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:text="Navigate To The Dojo"
- android:id="@+id/location_menu_tv"
+ android:id="@+id/menu_card_tv"
android:textSize="20sp"
android:textColor="@android:color/black"
+ android:padding="5dp"
/>
View
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:padding="10dp" >
-
- <LinearLayout
- android:id="@+id/linearLayout1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center_vertical"
- android:orientation="horizontal" >
-
- <TextView
- android:id="@+id/textView1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="#005500"
- android:visibility="gone" >
- </TextView>
-
- <TextView
- android:id="@+id/textView2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="#005500" >
- </TextView>
- </LinearLayout>
-
- <TextView
- android:id="@+id/textView3"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical|right"
- android:layout_marginLeft="10dp"
- android:textColor="@android:color/black" >
- </TextView>
-
-</LinearLayout>
View
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+ <item
+ android:id="@+id/main_menu"
+ android:orderInCategory="100"
+ android:showAsAction="never"
+ android:title="@string/action_settings"/>
+
+</menu>
View
@@ -4,4 +4,6 @@
<color name="hacker_red">#ffbd1b2b</color>
<color name="google_now_grey">#ffe5e5e5</color>
<color name="google_now_shadow">#ffd4d4d4</color>
+ <color name="event_green">#005500</color>
+ <color name="event_red">#990000</color>
</resources>
@@ -30,9 +30,9 @@ public EventArrayAdapter(Activity context, List<String> startTimes, List<String>
public View getView(int position, View view, ViewGroup viewGroup) {
LayoutInflater inflator = context.getLayoutInflater();
View newView = inflator.inflate(R.layout.event, null, true);
- TextView textView1 = (TextView) newView.findViewById(R.id.textView1);
- TextView textView2 = (TextView) newView.findViewById(R.id.textView2);
- TextView textView3 = (TextView) newView.findViewById(R.id.textView3);
+ TextView textView1 = (TextView) newView.findViewById(R.id.event_start_time_tv);
+ TextView textView2 = (TextView) newView.findViewById(R.id.event_end_time_tv);
+ TextView textView3 = (TextView) newView.findViewById(R.id.event_title_tv);
textView1.setText(startTimes.get(position));
textView2.setText(endTimes.get(position));
textView3.setText(titles.get(position));
@@ -1,71 +0,0 @@
-package com.hackerdojo.android.event;
-
-import android.content.Intent;
-import android.os.Bundle;
-import android.support.v7.app.ActionBarActivity;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-import android.widget.TextView;
-
-import com.hackerdojo.android.infoapp.R;
-
-public class EventDetails extends ActionBarActivity implements OnClickListener{
-
-
- protected void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.subevent);
-
- Intent pIntent = getIntent();
-
- String message = pIntent.getStringExtra("message");
-
- TextView messagetext = (TextView) findViewById(R.id.message);
- messagetext.setText(message);
- }
-
- @Override
- public void onResume()
- {
- super.onResume();
-
- Button calendarButton = (Button) findViewById(R.id.calendarButton);
- calendarButton.setOnClickListener(this);
-
-
- }
-
- @Override
- public void onClick(View v)
- {
-
- switch(v.getId())
- {
- case R.id.calendarButton:
- openCalendar();
- }
- }
-
- public void openCalendar()
- {
-
-
- // clicking back for some reason still creates event in calendar?
-
-
- Intent calIntent = new Intent(Intent.ACTION_EDIT);
- calIntent.setType("vnd.android.cursor.item/event");
- calIntent.putExtra("beginTime", EventsFragment.event.getStartDate().getTime());
- calIntent.putExtra("allDay", false);
- //calIntent.putExtra("description", EventsFragment.event.getLocation());
- calIntent.putExtra("endTime", EventsFragment.event.getEndDate().getTime());
- calIntent.putExtra("title", EventsFragment.event.getTitle());
-
- startActivity(calIntent);
- }
-
-
-
-}
Oops, something went wrong.

0 comments on commit 2038a21

Please sign in to comment.