Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a197395 authored by Danny Baumann's avatar Danny Baumann
Browse files

Some optimizations spotted during profiling.

Change-Id: Ice5cc24d2574894798370eaaae144713414eb6cf
parent 2f9277f2
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
@@ -14,17 +14,17 @@
     limitations under the License.
 -->

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/navigation_view_details_item"
  android:layout_width="match_parent"
  android:layout_height="@dimen/default_row_height"
  android:background="@drawable/holo_list_selector_deselected" >
  android:background="@drawable/holo_list_selector_deselected"
  android:orientation="horizontal" >

  <com.cyanogenmod.filemanager.ui.widgets.TransparentNonFocusableButtonItem
    android:id="@+id/navigation_view_item_check"
    android:layout_width="@dimen/item_menu_row_button_width"
    android:layout_height="match_parent"
    android:layout_alignParentLeft="true"
    android:contentDescription="@null"
    android:src="@drawable/btn_holo_light_check_off_normal" />

@@ -32,18 +32,15 @@
    android:id="@+id/navigation_view_item_icon"
    android:layout_width="@dimen/default_row_height"
    android:layout_height="@dimen/default_row_height"
    android:layout_alignParentTop="true"
    android:layout_toRightOf="@id/navigation_view_item_check"
    android:layout_alignWithParentIfMissing="true"
    android:layout_gravity="center_vertical"
    android:scaleType="centerInside"
    android:contentDescription="@null"
    android:src="@null" />

  <RelativeLayout
    android:layout_width="match_parent"
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:layout_alignParentRight="true"
    android:layout_toRightOf="@id/navigation_view_item_icon"
    android:layout_weight="1"
    android:layout_marginRight="@dimen/extra_margin">

    <TextView
@@ -80,4 +77,4 @@
      android:textStyle="bold" />
  </RelativeLayout>

</RelativeLayout>
</LinearLayout>
+15 −25
Original line number Diff line number Diff line
@@ -14,17 +14,17 @@
     limitations under the License.
 -->

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/navigation_view_details_item"
  android:layout_width="match_parent"
  android:layout_height="@dimen/default_row_height"
  android:background="@drawable/holo_list_selector_deselected" >
  android:background="@drawable/holo_list_selector_deselected"
  android:orientation="horizontal" >

  <com.cyanogenmod.filemanager.ui.widgets.TransparentNonFocusableButtonItem
    android:id="@+id/navigation_view_item_check"
    android:layout_width="@dimen/item_menu_row_button_width"
    android:layout_height="match_parent"
    android:layout_alignParentLeft="true"
    android:contentDescription="@null"
    android:src="@drawable/btn_holo_light_check_off_normal" />

@@ -32,30 +32,20 @@
    android:id="@+id/navigation_view_item_icon"
    android:layout_width="@dimen/default_row_height"
    android:layout_height="@dimen/default_row_height"
    android:layout_alignParentTop="true"
    android:layout_toRightOf="@id/navigation_view_item_check"
    android:layout_alignWithParentIfMissing="true"
    android:layout_gravity="center_vertical"
    android:scaleType="centerInside"
    android:contentDescription="@null"
    android:src="@null" />

  <RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_alignParentRight="true"
    android:layout_toRightOf="@id/navigation_view_item_icon"
    android:layout_marginRight="@dimen/extra_margin" >

  <TextView
    android:id="@+id/navigation_view_item_name"
      android:layout_width="match_parent"
    android:layout_width="0dp"
    android:layout_height="match_parent"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
    android:layout_weight="1"
    android:layout_marginLeft="@dimen/small_margin"
    android:layout_marginRight="@dimen/extra_margin"
    android:gravity="left|center_vertical"
    android:singleLine="true"
    android:textAppearance="@style/primary_text_appearance" />
  </RelativeLayout>

</RelativeLayout>
</LinearLayout>
+0 −3
Original line number Diff line number Diff line
@@ -117,7 +117,6 @@ public class BookmarksActivity extends Activity implements OnItemClickListener,
                    }
                    responder.accept();
                    adapter.remove(bookmark);
                    adapter.notifyDataSetChanged();
                    return;
                }

@@ -304,7 +303,6 @@ public class BookmarksActivity extends Activity implements OnItemClickListener,
                waiting.setVisibility(View.GONE);
                if (result.booleanValue()) {
                    adapter.addAll(this.mBookmarks);
                    adapter.notifyDataSetChanged();
                    BookmarksActivity.this.mBookmarksListView.setSelection(0);

                } else {
@@ -393,7 +391,6 @@ public class BookmarksActivity extends Activity implements OnItemClickListener,
              return;
          }
          adapter.remove(bookmark);
          adapter.notifyDataSetChanged();
          return;
      }
    }
+0 −1
Original line number Diff line number Diff line
@@ -352,7 +352,6 @@ public class HistoryActivity extends Activity implements OnItemClickListener {
    void clearHistory() {
        if (this.mAdapter != null) {
            this.mAdapter.clear();
            this.mAdapter.notifyDataSetChanged();
            View msg = findViewById(R.id.history_empty_msg);
            msg.setVisibility(View.VISIBLE);
            this.mIsClearHistory = true;
+0 −1
Original line number Diff line number Diff line
@@ -786,7 +786,6 @@ public class SearchActivity extends Activity
    void removeAll() {
        SearchResultAdapter adapter = (SearchResultAdapter)this.mSearchListView.getAdapter();
        adapter.clear();
        adapter.notifyDataSetChanged();
        this.mSearchListView.setSelection(0);
        toggleResults(false, true);
    }
Loading