Update Android Beam screen layout
Use preference footer layout to replace the old layout android_beam. Change-Id: I878333ecc001631020706cb02edde48496859dcb Fixes: 80085332 Test: Manual test
This commit is contained in:
@@ -1,53 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2010 The Android Open Source Project
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:scrollbars="vertical"
|
|
||||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
|
||||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:fillViewport="true">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/android_beam_explained"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="20dip"
|
|
||||||
android:gravity="top"
|
|
||||||
android:paddingStart="@dimen/preference_no_icon_padding_start"
|
|
||||||
android:text="@string/android_beam_explained"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
|
||||||
<ImageView android:id="@+id/android_beam_image"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:contentDescription="@null"
|
|
||||||
/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
@@ -25,7 +25,9 @@ import android.view.Menu;
|
|||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.Switch;
|
import android.widget.Switch;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||||
import com.android.settings.enterprise.ActionDisabledByAdminDialogHelper;
|
import com.android.settings.enterprise.ActionDisabledByAdminDialogHelper;
|
||||||
@@ -75,7 +77,13 @@ public class AndroidBeam extends InstrumentedFragment
|
|||||||
mBeamDisallowedByOnlyAdmin = true;
|
mBeamDisallowedByOnlyAdmin = true;
|
||||||
return new View(getContext());
|
return new View(getContext());
|
||||||
}
|
}
|
||||||
mView = inflater.inflate(R.layout.android_beam, container, false);
|
mView = inflater.inflate(R.layout.preference_footer, container, false);
|
||||||
|
|
||||||
|
ImageView iconInfo = mView.findViewById(android.R.id.icon);
|
||||||
|
iconInfo.setImageResource(R.drawable.ic_info_outline_24dp);
|
||||||
|
TextView textInfo = mView.findViewById(android.R.id.title);
|
||||||
|
textInfo.setText(R.string.android_beam_explained);
|
||||||
|
|
||||||
return mView;
|
return mView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user