Merge "Fine tune UI layout files of WifiDppQrCodeScannerFragment & WifiDppQrCodeGeneratorFragment"

This commit is contained in:
Arc Wang
2018-12-18 07:26:47 +00:00
committed by Android (Google) Code Review
6 changed files with 42 additions and 18 deletions

View File

@@ -43,6 +43,7 @@ import com.android.settings.R;
* {@code WifiDppAddDeviceFragment}
*/
public abstract class WifiDppQrCodeBaseFragment extends InstrumentedFragment {
private ImageView mHeaderIcon;
private TextView mTitle;
private TextView mDescription;
@@ -73,6 +74,7 @@ public abstract class WifiDppQrCodeBaseFragment extends InstrumentedFragment {
}
private void initView(View view) {
mHeaderIcon = view.findViewById(R.id.header_icon);
mTitle = view.findViewById(R.id.title);
mDescription = view.findViewById(R.id.description);
mErrorMessage = view.findViewById(R.id.error_message);
@@ -87,6 +89,10 @@ public abstract class WifiDppQrCodeBaseFragment extends InstrumentedFragment {
mButtonRight = view.findViewById(R.id.button_right);
}
protected void setHeaderIconImageResource(int resId) {
mHeaderIcon.setImageResource(resId);
}
protected void setTitle(String title) {
mTitle.setText(title);
}