Move up spinner in apps screen
Bug: 18006320 Change-Id: Ic23c2c3e02a6c6a20b180065975228d42fd91899
This commit is contained in:
@@ -19,11 +19,6 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<FrameLayout android:id="@+id/pinned_header"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
@@ -25,6 +25,11 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="@drawable/default_preference_background">
|
android:background="@drawable/default_preference_background">
|
||||||
|
|
||||||
|
<FrameLayout android:id="@+id/pinned_header"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<android.support.v4.view.ViewPager
|
<android.support.v4.view.ViewPager
|
||||||
android:id="@+id/pager"
|
android:id="@+id/pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@@ -19,11 +19,6 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<FrameLayout android:id="@+id/pinned_header"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" >
|
android:layout_height="match_parent" >
|
||||||
|
@@ -197,8 +197,6 @@ public class ManageApplications extends Fragment implements
|
|||||||
|
|
||||||
private View mListContainer;
|
private View mListContainer;
|
||||||
|
|
||||||
private ViewGroup mPinnedHeader;
|
|
||||||
|
|
||||||
// ListView used to display list
|
// ListView used to display list
|
||||||
private ListView mListView;
|
private ListView mListView;
|
||||||
// Custom view used to display running processes
|
// Custom view used to display running processes
|
||||||
@@ -245,19 +243,10 @@ public class ManageApplications extends Fragment implements
|
|||||||
if (mRootView != null) {
|
if (mRootView != null) {
|
||||||
return mRootView;
|
return mRootView;
|
||||||
}
|
}
|
||||||
|
|
||||||
mInflater = inflater;
|
mInflater = inflater;
|
||||||
mRootView = inflater.inflate(mListType == LIST_TYPE_RUNNING
|
mRootView = inflater.inflate(mListType == LIST_TYPE_RUNNING
|
||||||
? R.layout.manage_applications_running
|
? R.layout.manage_applications_running
|
||||||
: R.layout.manage_applications_apps, null);
|
: R.layout.manage_applications_apps, null);
|
||||||
mPinnedHeader = (ViewGroup) mRootView.findViewById(R.id.pinned_header);
|
|
||||||
if (mOwner.mProfileSpinnerAdapter != null) {
|
|
||||||
mOwner.mSpinner = (Spinner) inflater.inflate(R.layout.spinner_view, null);
|
|
||||||
mOwner.mSpinner.setAdapter(mOwner.mProfileSpinnerAdapter);
|
|
||||||
mOwner.mSpinner.setOnItemSelectedListener(mOwner);
|
|
||||||
mPinnedHeader.addView(mOwner.mSpinner);
|
|
||||||
mPinnedHeader.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
mLoadingContainer = mRootView.findViewById(R.id.loading_container);
|
mLoadingContainer = mRootView.findViewById(R.id.loading_container);
|
||||||
mLoadingContainer.setVisibility(View.VISIBLE);
|
mLoadingContainer.setVisibility(View.VISIBLE);
|
||||||
mListContainer = mRootView.findViewById(R.id.list_container);
|
mListContainer = mRootView.findViewById(R.id.list_container);
|
||||||
@@ -482,6 +471,7 @@ public class ManageApplications extends Fragment implements
|
|||||||
private ViewGroup mContentContainer;
|
private ViewGroup mContentContainer;
|
||||||
private View mRootView;
|
private View mRootView;
|
||||||
private ViewPager mViewPager;
|
private ViewPager mViewPager;
|
||||||
|
private ViewGroup mPinnedHeader;
|
||||||
private UserSpinnerAdapter mProfileSpinnerAdapter;
|
private UserSpinnerAdapter mProfileSpinnerAdapter;
|
||||||
private Spinner mSpinner;
|
private Spinner mSpinner;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
@@ -936,7 +926,14 @@ public class ManageApplications extends Fragment implements
|
|||||||
container, false);
|
container, false);
|
||||||
mContentContainer = container;
|
mContentContainer = container;
|
||||||
mRootView = rootView;
|
mRootView = rootView;
|
||||||
|
mPinnedHeader = (ViewGroup) mRootView.findViewById(R.id.pinned_header);
|
||||||
|
if (mProfileSpinnerAdapter != null) {
|
||||||
|
mSpinner = (Spinner) inflater.inflate(R.layout.spinner_view, null);
|
||||||
|
mSpinner.setAdapter(mProfileSpinnerAdapter);
|
||||||
|
mSpinner.setOnItemSelectedListener(this);
|
||||||
|
mPinnedHeader.addView(mSpinner);
|
||||||
|
mPinnedHeader.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
mViewPager = (ViewPager) rootView.findViewById(R.id.pager);
|
mViewPager = (ViewPager) rootView.findViewById(R.id.pager);
|
||||||
MyPagerAdapter adapter = new MyPagerAdapter();
|
MyPagerAdapter adapter = new MyPagerAdapter();
|
||||||
mViewPager.setAdapter(adapter);
|
mViewPager.setAdapter(adapter);
|
||||||
|
Reference in New Issue
Block a user