diff --git a/mobile/src/main/res/drawable/background_profile.xml b/mobile/src/main/res/drawable/background_profile.xml index daa7f88e..d6fb147a 100644 --- a/mobile/src/main/res/drawable/background_profile.xml +++ b/mobile/src/main/res/drawable/background_profile.xml @@ -20,4 +20,5 @@ + diff --git a/mobile/src/main/res/layout/layout_profile.xml b/mobile/src/main/res/layout/layout_profile.xml index 821efa8c..3111d191 100644 --- a/mobile/src/main/res/layout/layout_profile.xml +++ b/mobile/src/main/res/layout/layout_profile.xml @@ -3,89 +3,82 @@ + android:layout_height="wrap_content" + android:paddingLeft="8dp" + android:paddingRight="4dp" + android:paddingTop="8dp" + android:paddingBottom="8dp" + android:focusable="true" + android:nextFocusRight="@+id/edit"> - + - - - - - + - - - + android:padding="8dp" + android:layout_gravity="top" + app:srcCompat="@drawable/ic_social_share" + android:background="?attr/selectableItemBackgroundBorderless" + android:contentDescription="@string/share" + android:focusable="true" + android:nextFocusLeft="@+id/container"/> + + + + + diff --git a/mobile/src/main/scala/com/github/shadowsocks/ProfilesFragment.scala b/mobile/src/main/scala/com/github/shadowsocks/ProfilesFragment.scala index dc82deaa..dcf59768 100644 --- a/mobile/src/main/scala/com/github/shadowsocks/ProfilesFragment.scala +++ b/mobile/src/main/scala/com/github/shadowsocks/ProfilesFragment.scala @@ -21,7 +21,6 @@ package com.github.shadowsocks import android.content._ -import android.content.res.Configuration import android.os.Bundle import android.support.design.widget.Snackbar import android.support.v7.widget.RecyclerView.ViewHolder @@ -137,13 +136,9 @@ final class ProfilesFragment extends ToolbarFragment with Toolbar.OnMenuItemClic adView = new AdView(getActivity) adView.setLayoutParams(params) adView.setAdUnitId("ca-app-pub-9097031975646651/7760346322") + adView.setAdSize(AdSize.FLUID) - if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) - adView.setAdSize(AdSize.FULL_BANNER) - else - adView.setAdSize(AdSize.SMART_BANNER) - - itemView.findViewById[LinearLayout](R.id.indicator).addView(adView) + itemView.findViewById[LinearLayout](R.id.content).addView(adView) // Load Ad val adBuilder = new AdRequest.Builder()