Toggle between primary and managed profile in apps settings

This adds a spinner to the apps screen which can be used to toggle
between the Settings app in the primary and managed profile so that the user
can edit settings belonging to both profiles.

Bug: 16369104
Change-Id: I09a94c07597e6509de025dfbbe0e454ae3d9b0aa
This commit is contained in:
Alexandra Gherghina
2014-07-24 18:54:31 +01:00
parent 5c14856ba2
commit c8a1db1912
4 changed files with 148 additions and 66 deletions

View File

@@ -14,50 +14,69 @@
limitations under the License.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout android:id="@+id/list_container"
<FrameLayout android:id="@+id/pinned_header"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="gone">
<FrameLayout android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1">
<ListView android:id="@android:id/list"
android:drawSelectorOnTop="false"
android:layout_height="wrap_content"
android:visibility="gone" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<LinearLayout android:id="@+id/list_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:scrollbarStyle="@integer/preference_scrollbar_style" />
<TextView android:id="@android:id/empty"
android:orientation="vertical"
android:visibility="gone">
<FrameLayout android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1">
<ListView android:id="@android:id/list"
android:drawSelectorOnTop="false"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/no_applications"
android:textAppearance="?android:attr/textAppearanceLarge" />
</FrameLayout>
</LinearLayout>
android:clipToPadding="false"
android:scrollbarStyle="@integer/preference_scrollbar_style" />
<LinearLayout android:id="@+id/loading_container"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:gravity="center">
<TextView android:id="@android:id/empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/no_applications"
android:textAppearance="?android:attr/textAppearanceLarge" />
<ProgressBar style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="@string/settings_safetylegal_activity_loading"
android:paddingTop="4dip"
android:singleLine="true" />
</FrameLayout>
</LinearLayout>
</LinearLayout>
</FrameLayout>
<LinearLayout android:id="@+id/loading_container"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:gravity="center">
<ProgressBar style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="@string/settings_safetylegal_activity_loading"
android:paddingTop="4dip"
android:singleLine="true" />
</LinearLayout>
</FrameLayout>
</LinearLayout>

View File

@@ -14,32 +14,46 @@
limitations under the License.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<view class="com.android.settings.applications.RunningProcessesView"
android:id="@+id/running_processes"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
android:orientation="vertical">
<LinearLayout android:id="@+id/loading_container"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:gravity="center">
<FrameLayout android:id="@+id/pinned_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
<ProgressBar style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="@string/settings_safetylegal_activity_loading"
android:paddingTop="4dip"
android:singleLine="true" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
</LinearLayout>
<view class="com.android.settings.applications.RunningProcessesView"
android:id="@+id/running_processes"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
</FrameLayout>
<LinearLayout android:id="@+id/loading_container"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:gravity="center">
<ProgressBar style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="@string/settings_safetylegal_activity_loading"
android:paddingTop="4dip"
android:singleLine="true" />
</LinearLayout>
</FrameLayout>
</LinearLayout>

View File

@@ -4607,7 +4607,7 @@
<string name="really_remove_account_message" product="tablet">Removing this account will delete all of its messages, contacts, and other data from the tablet!</string>
<!-- Remove account message in dialog [CHAR LIMIT=NONE] -->
<string name="really_remove_account_message" product="default">Removing this account will delete all of its messages, contacts, and other data from the phone!</string>
<!-- This is shown if the autheticator for a given account fails to remove it. -->
<!-- This is shown if the autheticator for a given account fails to remove it. [CHAR LIMIT=NONE] -->
<string name="remove_account_failed">This change isn\'t allowed by your administrator</string>
<!-- What to show in messaging that refers to this provider, e.g. AccountSyncSettings -->
<string name="provider_label">Push subscriptions</string>