Forráskód Böngészése

change style of import button

AndyScherzinger 8 éve
szülő
commit
4dae921763

+ 6 - 4
src/main/java/com/owncloud/android/ui/fragment/contactsbackup/ContactListFragment.java

@@ -48,6 +48,7 @@ import android.widget.ArrayAdapter;
 import android.widget.Button;
 import android.widget.CheckedTextView;
 import android.widget.ImageView;
+import android.widget.LinearLayout;
 
 import com.evernote.android.job.JobRequest;
 import com.evernote.android.job.util.support.PersistableBundleCompat;
@@ -94,6 +95,9 @@ public class ContactListFragment extends FileFragment {
     @BindView(R.id.contactlist_recyclerview)
     public RecyclerView recyclerView;
 
+    @BindView(R.id.contactlist_restore_selected_container)
+    public LinearLayout restoreContactsContainer;
+
     @BindView(R.id.contactlist_restore_selected)
     public Button restoreContacts;
 
@@ -191,11 +195,9 @@ public class ContactListFragment extends FileFragment {
     @Subscribe(threadMode = ThreadMode.MAIN)
     public void onMessageEvent(VCardToggleEvent event) {
         if (event.showRestoreButton) {
-            restoreContacts.setVisibility(View.VISIBLE);
-            restoreContacts.setBackgroundColor(getResources().getColor(R.color.primary_button_background_color));
+            restoreContactsContainer.setVisibility(View.VISIBLE);
         } else {
-            restoreContacts.setVisibility(View.GONE);
-            restoreContacts.setBackgroundColor(getResources().getColor(R.color.standard_grey));
+            restoreContactsContainer.setVisibility(View.GONE);
         }
     }
 

+ 19 - 5
src/main/res/layout/contactlist_fragment.xml

@@ -31,12 +31,26 @@
         android:layout_weight="1"
         android:choiceMode="multipleChoice"/>
 
-    <android.support.v7.widget.AppCompatButton
-        android:id="@+id/contactlist_restore_selected"
+    <LinearLayout
+        android:id="@+id/contactlist_restore_selected_container"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:text="@string/contaclist_restore_selected"
-        android:theme="@style/Button.Primary"
-        android:visibility="gone"/>
+        android:background="@color/white"
+        android:orientation="vertical"
+        android:visibility="gone">
+
+        <ImageView
+            android:layout_width="match_parent"
+            android:layout_height="1dp"
+            android:src="@drawable/uploader_list_separator"/>
+
+        <android.support.v7.widget.AppCompatButton
+            android:id="@+id/contactlist_restore_selected"
+            style="@style/Button.Borderless"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/contaclist_restore_selected"/>
+
+    </LinearLayout>
 
 </LinearLayout>