1

I've created a theme using the Android Asset Studio and I've applied it - Looks great.

However, now when I long-press my EditText, I only get the "Paste" option displayed as text. Without the theme applied, long-pressing the EditText pops up the more powerful UI that shows Paste and Clipboard. It is imperative that I have the Clipboard option.

I know that I can create a custom long-press view. But I would like to be able to simply override the theme's overriding of the original long-press behavior.

Here are some screenshots...

With Theme (not good enough):
enter image description here

Without Theme (what I want):
enter image description here

Here is the code from the theme's style file:

<?xml version="1.0" encoding="utf-8"?>
<!-- File created by the Android Action Bar Style Generator

     Copyright (C) 2011 The Android Open Source Project
     Copyright (C) 2012 readyState Software Ltd

     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.Ibgib_green" parent="@android:style/Theme.Holo">
        <item name="android:actionBarItemBackground">@drawable/selectable_background_ibgib_green</item>
        <item name="android:popupMenuStyle">@style/PopupMenu.Ibgib_green</item>
        <item name="android:dropDownListViewStyle">@style/DropDownListView.Ibgib_green</item>
        <item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Ibgib_green</item>
        <item name="android:actionDropDownStyle">@style/DropDownNav.Ibgib_green</item>
        <item name="android:actionBarStyle">@style/ActionBar.Solid.Ibgib_green</item>
        <item name="android:actionModeBackground">@drawable/cab_background_top_ibgib_green</item>
        <item name="android:actionModeSplitBackground">@drawable/cab_background_bottom_ibgib_green</item>
        <item name="android:actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Ibgib_green</item>


    </style>

    <style name="ActionBar.Solid.Ibgib_green" parent="@android:style/Widget.Holo.ActionBar.Solid">
        <item name="android:background">@drawable/ab_solid_ibgib_green</item>
        <item name="android:backgroundStacked">@drawable/ab_stacked_solid_ibgib_green</item>
        <item name="android:backgroundSplit">@drawable/ab_bottom_solid_ibgib_green</item>
        <item name="android:progressBarStyle">@style/ProgressBar.Ibgib_green</item>
    </style>

    <style name="ActionBar.Transparent.Ibgib_green" parent="@android:style/Widget.Holo.ActionBar">
        <item name="android:background">@drawable/ab_transparent_ibgib_green</item>
        <item name="android:progressBarStyle">@style/ProgressBar.Ibgib_green</item>
    </style>

    <style name="PopupMenu.Ibgib_green" parent="@android:style/Widget.Holo.ListPopupWindow">
        <item name="android:popupBackground">@drawable/menu_dropdown_panel_ibgib_green</item>   
    </style>

    <style name="DropDownListView.Ibgib_green" parent="@android:style/Widget.Holo.ListView.DropDown">
        <item name="android:listSelector">@drawable/selectable_background_ibgib_green</item>
    </style>

    <style name="ActionBarTabStyle.Ibgib_green" parent="@android:style/Widget.Holo.ActionBar.TabView">
        <item name="android:background">@drawable/tab_indicator_ab_ibgib_green</item>
    </style>

    <style name="DropDownNav.Ibgib_green" parent="@android:style/Widget.Holo.Spinner">
        <item name="android:background">@drawable/spinner_background_ab_ibgib_green</item>
        <item name="android:popupBackground">@drawable/menu_dropdown_panel_ibgib_green</item>
        <item name="android:dropDownSelector">@drawable/selectable_background_ibgib_green</item>
    </style>

    <style name="ProgressBar.Ibgib_green" parent="@android:style/Widget.Holo.ProgressBar.Horizontal">
        <item name="android:progressDrawable">@drawable/progress_horizontal_ibgib_green</item>
    </style>

    <style name="ActionButton.CloseMode.Ibgib_green" parent="@android:style/Widget.Holo.ActionButton.CloseMode">
        <item name="android:background">@drawable/btn_cab_done_ibgib_green</item>
    </style>

    <!-- this style is only referenced in a Light.DarkActionBar based theme -->
    <style name="Theme.Ibgib_green.Widget" parent="@android:style/Theme.Holo">
        <item name="android:popupMenuStyle">@style/PopupMenu.Ibgib_green</item>
        <item name="android:dropDownListViewStyle">@style/DropDownListView.Ibgib_green</item>
    </style>

  • Are these screenshots from the same device? If so, then maybe you should show the theme you made so we can see what's different between it and the normal themes. – Karakuri May 15 '15 at 17:14
  • I am pasting in the code from the theme xml file. Could you elaborate on "normal themes"? This was generated with the Android Asset Studio (I didn't do some kind of custom implementation). I have included the header for the theme in the pasted code to confirm how I generated it. –  May 15 '15 at 18:32

1 Answers1

0

Well, I don't know how to get that popup working. But I did learn (possibly) why the popup was simplified to just "Paste" without the manager option.

On my standard keyboard (Samsung S3/4/6), there is a clipboard button that is accessible via long-pressing one of the buttons to the left of the space bar. This obviates the requirement for the clipboard manager in the popup itself.

  • maybe it's same problem as here: http://stackoverflow.com/questions/39396662/edittext-how-to-activate-copy-paste-popup-without-any-actionbar ? – zeus Sep 13 '16 at 16:48
  • @loki I'm sure they're related, though I'm not sure it's the same problem. I think the offered answer is probably the right path, dealing with/installing the AppCompat libraries. The actual _changing_ of the popup from old-style to new-style I think was a conscious design decision on their part. I have no proof to back this up though. –  Sep 14 '16 at 00:24
  • yes but i m not under android studio, so i can't deliver the appCompat libraries :( i even don't know where to take them :( – zeus Sep 14 '16 at 14:18
  • @loki AppCompat libraries are not limited to android studio. They are included in the android SDK. Whatever your development environment is, it should be able to add these kinds of dependencies. I developed mostly with Xamarin.Android, and they had wrapper libraries for the app compat libraries. I suggest focusing on how to add these dependencies via gradle for your environment. You may want to also edit your question to include this aspect. –  Sep 14 '16 at 16:03