Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 625b2ff7 authored by PauloftheWest's avatar PauloftheWest Committed by Android Git Automerger
Browse files

am 1a568bd1: am c96fc1c5: Merge "Applied Material theme to Bluetooth file...

am 1a568bd1: am c96fc1c5: Merge "Applied Material theme to Bluetooth file acceptance dialog." into lmp-dev

* commit '1a568bd1':
  Applied Material theme to Bluetooth file acceptance dialog.
parents 1b040fa9 1a568bd1
Loading
Loading
Loading
Loading
+52 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 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.
-->

<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="match_parent"
    android:layout_width="match_parent">

    <LinearLayout
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:orientation="vertical">

        <TextView
            android:text="@string/incoming_line1"
            style="@style/file_transfer_item_label" />

        <TextView android:id="@+id/from_content"
            style="@style/file_transfer_item_content" />

        <TextView
            android:text="@string/incoming_line2"
            style="@style/file_transfer_item_label" />

        <TextView android:id="@+id/filename_content"
            style="@style/file_transfer_item_content" />

        <TextView
            android:text="@string/incoming_line3"
            style="@style/file_transfer_item_label" />

        <TextView android:id="@+id/size_content"
            style="@style/file_transfer_item_content" />

    </LinearLayout>

</ScrollView>

+7 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@
    <!--Title -->
    <string name="incoming_file_confirm_title">File transfer</string>
    <!--content -->
    <string name="incoming_file_confirm_content">\u0022<xliff:g id="sender">%1$s</xliff:g>\u0022 wants to send you <xliff:g id="file">%2$s</xliff:g> (<xliff:g id="size">%3$s</xliff:g>). \n\n Accept the file? </string>
    <string name="incoming_file_confirm_content">Accept incoming file? </string>
    <!-- Label for a cancel button. -->
    <string name="incoming_file_confirm_cancel">Decline</string>
    <!-- Label for a confirm button.-->
@@ -118,6 +118,12 @@
    <string name="download_cancel">Stop</string>
    <!-- Label for a hide button.-->
    <string name="download_ok">Hide</string>
    <!--Line 1 -->
    <string name="incoming_line1">From</string>
    <!--Line 2 -->
    <string name="incoming_line2">Filename</string>
    <!--Line 3 -->
    <string name="incoming_line3">Size</string>

    <!-- Bluetooth failed Download  Dialog -->
    <!--Line 1  -->
+48 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 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.
-->

<resources>

    <style name="Theme.Material.Settings.Floating" parent="@android:style/Theme.Material.Settings">
        <item name="android:windowIsFloating">true</item>
        <item name="android:windowCloseOnTouchOutside">false</item>
        <item name="android:colorBackgroundCacheHint">@null</item>
        <item name="android:backgroundDimEnabled">true</item>
    </style>

    <style name="file_transfer_item_label">
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_marginStart">20dip</item>
        <item name="android:layout_marginEnd">20dip</item>
        <item name="android:paddingTop">10dip</item>
        <item name="android:textAlignment">viewStart</item>
        <item name="android:textAppearance">@android:style/TextAppearance.Material.Body1</item>
        <item name="android:textColor">@*android:color/secondary_text_default_material_light</item>
    </style>

    <style name="file_transfer_item_content">
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_marginStart">20dip</item>
        <item name="android:layout_marginEnd">20dip</item>
        <item name="android:paddingBottom">10dip</item>
        <item name="android:textAlignment">viewStart</item>
        <item name="android:textAppearance">@android:style/TextAppearance.Material.Subhead</item>
        <item name="android:textColor">@*android:color/primary_text_default_material_light</item>
    </style>

</resources>
+7 −8
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ public class BluetoothOppIncomingFileConfirmActivity extends AlertActivity imple

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setTheme(R.style.Theme_Material_Settings_Floating);
        if (V) Log.d(TAG, "onCreate(): action = " + getIntent().getAction());
        super.onCreate(savedInstanceState);

@@ -106,7 +107,7 @@ public class BluetoothOppIncomingFileConfirmActivity extends AlertActivity imple

        // Set up the "dialog"
        final AlertController.AlertParams p = mAlertParams;
        p.mTitle = getString(R.string.incoming_file_confirm_title);
        p.mTitle = getString(R.string.incoming_file_confirm_content);
        p.mView = createView();
        p.mPositiveButtonText = getString(R.string.incoming_file_confirm_ok);
        p.mPositiveButtonListener = this;
@@ -125,14 +126,12 @@ public class BluetoothOppIncomingFileConfirmActivity extends AlertActivity imple
    }

    private View createView() {
        View view = getLayoutInflater().inflate(R.layout.confirm_dialog, null);
        View view = getLayoutInflater().inflate(R.layout.incoming_dialog, null);

        mContentView = (TextView)view.findViewById(R.id.content);

        String text = getString(R.string.incoming_file_confirm_content, mTransInfo.mDeviceName,
                mTransInfo.mFileName, Formatter.formatFileSize(this, mTransInfo.mTotalBytes));

        mContentView.setText(text);
        ((TextView)view.findViewById(R.id.from_content)).setText(mTransInfo.mDeviceName);
        ((TextView)view.findViewById(R.id.filename_content)).setText(mTransInfo.mFileName);
        ((TextView)view.findViewById(R.id.size_content)).setText(
                Formatter.formatFileSize(this, mTransInfo.mTotalBytes));

        return view;
    }