diff options
author | Jeff Sharkey <jsharkey@android.com> | 2013-09-21 15:11:19 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2013-09-21 15:26:37 -0700 |
commit | 1feeddf518d31a7ff5d28000a631857442cd7161 (patch) | |
tree | aa3fe4cbf1ee0546838193479f17fe8f7ac8ea68 /packages/DocumentsUI/src/com | |
parent | 5545f56f7561810187545a1817b6001dd1f9931b (diff) | |
download | frameworks_base-1feeddf518d31a7ff5d28000a631857442cd7161.zip frameworks_base-1feeddf518d31a7ff5d28000a631857442cd7161.tar.gz frameworks_base-1feeddf518d31a7ff5d28000a631857442cd7161.tar.bz2 |
Latest UX asset drop, grid padding.
Bring in latest asset drop. Apply grid padding programmatically
instead of waiting for asset. Remove alpha from directory animation.
Update save footer background to match spec.
Bug: 10700025
Change-Id: I8eef08f36d04767b78e91b23f72bdbebfbb02f58
Diffstat (limited to 'packages/DocumentsUI/src/com')
3 files changed, 11 insertions, 3 deletions
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java index 911e9ed..8eb121a 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java +++ b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java @@ -39,6 +39,7 @@ import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.Point; import android.graphics.drawable.Drawable; +import android.graphics.drawable.InsetDrawable; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; @@ -64,6 +65,7 @@ import android.widget.AbsListView.RecyclerListener; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.BaseAdapter; +import android.widget.FrameLayout; import android.widget.GridView; import android.widget.ImageView; import android.widget.ListView; @@ -657,7 +659,7 @@ public class DirectoryFragment extends Fragment { if (extras != null) { final String info = extras.getString(DocumentsContract.EXTRA_INFO); if (info != null) { - mFooters.add(new MessageFooter(2, R.drawable.ic_dialog_alert, info)); + mFooters.add(new MessageFooter(2, R.drawable.ic_dialog_info, info)); } final String error = extras.getString(DocumentsContract.EXTRA_ERROR); if (error != null) { @@ -707,6 +709,13 @@ public class DirectoryFragment extends Fragment { convertView = inflater.inflate(R.layout.item_doc_list, parent, false); } else if (state.derivedMode == MODE_GRID) { convertView = inflater.inflate(R.layout.item_doc_grid, parent, false); + + // Apply padding to grid items + final FrameLayout grid = (FrameLayout) convertView; + final int gridPadding = getResources() + .getDimensionPixelSize(R.dimen.grid_padding); + grid.setForeground(new InsetDrawable(grid.getForeground(), gridPadding)); + grid.setBackground(new InsetDrawable(grid.getBackground(), gridPadding)); } else { throw new IllegalStateException(); } diff --git a/packages/DocumentsUI/src/com/android/documentsui/DirectoryView.java b/packages/DocumentsUI/src/com/android/documentsui/DirectoryView.java index 34cb14f..28e2bd9 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/DirectoryView.java +++ b/packages/DocumentsUI/src/com/android/documentsui/DirectoryView.java @@ -58,6 +58,5 @@ public class DirectoryView extends FrameLayout { public void setPosition(float position) { mPosition = position; setX((mWidth > 0) ? (mPosition * mWidth) : 0); - setAlpha(1f - position); } } diff --git a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java index 6d2f9b9..6d5475d 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java +++ b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java @@ -171,7 +171,7 @@ public class DocumentsActivity extends Activity { mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, - R.drawable.ic_drawer, R.string.drawer_open, R.string.drawer_close); + R.drawable.ic_drawer_glyph, R.string.drawer_open, R.string.drawer_close); mDrawerLayout.setDrawerListener(mDrawerListener); mDrawerLayout.setDrawerShadow(R.drawable.ic_drawer_shadow, GravityCompat.START); |