Fixed display issue for the assistant welcome buttons some have a shadow below, some don't
This commit is contained in:
parent
335c677c7f
commit
df4ede7d97
4 changed files with 41 additions and 24 deletions
|
@ -24,11 +24,11 @@ import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.TextView;
|
||||||
import org.linphone.R;
|
import org.linphone.R;
|
||||||
|
|
||||||
public class WelcomeFragment extends Fragment implements OnClickListener {
|
public class WelcomeFragment extends Fragment implements OnClickListener {
|
||||||
private Button mCreateAccount, mLogLinphoneAccount, mLogGenericAccount, mRemoteProvisioning;
|
private TextView mCreateAccount, mLogLinphoneAccount, mLogGenericAccount, mRemoteProvisioning;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(
|
public View onCreateView(
|
||||||
|
|
|
@ -78,8 +78,6 @@ public class NetworkSettingsFragment extends Fragment {
|
||||||
mIpv6 = mRootView.findViewById(R.id.pref_ipv6);
|
mIpv6 = mRootView.findViewById(R.id.pref_ipv6);
|
||||||
|
|
||||||
mPush = mRootView.findViewById(R.id.pref_push_notification);
|
mPush = mRootView.findViewById(R.id.pref_push_notification);
|
||||||
mPush.setVisibility(
|
|
||||||
PushNotificationUtils.isAvailable(getActivity()) ? View.VISIBLE : View.GONE);
|
|
||||||
|
|
||||||
mRandomPorts = mRootView.findViewById(R.id.pref_transport_use_random_ports);
|
mRandomPorts = mRootView.findViewById(R.id.pref_transport_use_random_ports);
|
||||||
|
|
||||||
|
@ -101,10 +99,6 @@ public class NetworkSettingsFragment extends Fragment {
|
||||||
|
|
||||||
mAndroidBatterySaverSettings =
|
mAndroidBatterySaverSettings =
|
||||||
mRootView.findViewById(R.id.pref_android_battery_protected_settings);
|
mRootView.findViewById(R.id.pref_android_battery_protected_settings);
|
||||||
mAndroidBatterySaverSettings.setVisibility(
|
|
||||||
DeviceUtils.hasDevicePowerManager(LinphoneActivity.instance())
|
|
||||||
? View.VISIBLE
|
|
||||||
: View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setListeners() {
|
protected void setListeners() {
|
||||||
|
@ -227,6 +221,8 @@ public class NetworkSettingsFragment extends Fragment {
|
||||||
mIpv6.setChecked(mPrefs.isUsingIpv6());
|
mIpv6.setChecked(mPrefs.isUsingIpv6());
|
||||||
|
|
||||||
mPush.setChecked(mPrefs.isPushNotificationEnabled());
|
mPush.setChecked(mPrefs.isPushNotificationEnabled());
|
||||||
|
mPush.setVisibility(
|
||||||
|
PushNotificationUtils.isAvailable(getActivity()) ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
mRandomPorts.setChecked(mPrefs.isUsingRandomPort());
|
mRandomPorts.setChecked(mPrefs.isUsingRandomPort());
|
||||||
|
|
||||||
|
@ -245,6 +241,11 @@ public class NetworkSettingsFragment extends Fragment {
|
||||||
mTurnUsername.setEnabled(mPrefs.isTurnEnabled());
|
mTurnUsername.setEnabled(mPrefs.isTurnEnabled());
|
||||||
mTurnPassword.setEnabled(mPrefs.isTurnEnabled());
|
mTurnPassword.setEnabled(mPrefs.isTurnEnabled());
|
||||||
|
|
||||||
|
mAndroidBatterySaverSettings.setVisibility(
|
||||||
|
DeviceUtils.hasDevicePowerManager(LinphoneActivity.instance())
|
||||||
|
? View.VISIBLE
|
||||||
|
: View.GONE);
|
||||||
|
|
||||||
setListeners();
|
setListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,26 +37,30 @@
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/create_account"
|
android:id="@+id/create_account"
|
||||||
style="@style/button_font"
|
style="@style/button_font"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/assistant_button"
|
android:background="@drawable/assistant_button"
|
||||||
android:textColor="@drawable/assistant_button_text_color"
|
android:textColor="@drawable/assistant_button_text_color"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="10dp"
|
||||||
android:contentDescription="@string/assistant_create_account"
|
android:contentDescription="@string/assistant_create_account"
|
||||||
android:text="@string/assistant_create_account" />
|
android:text="@string/assistant_create_account" />
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/login_linphone"
|
android:id="@+id/login_linphone"
|
||||||
style="@style/button_font"
|
style="@style/button_font"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="30dp"
|
android:layout_marginLeft="30dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/assistant_button"
|
android:background="@drawable/assistant_button"
|
||||||
android:textColor="@drawable/assistant_button_text_color"
|
android:textColor="@drawable/assistant_button_text_color"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="10dp"
|
||||||
android:contentDescription="@string/assistant_login_linphone"
|
android:contentDescription="@string/assistant_login_linphone"
|
||||||
android:text="@string/assistant_login_linphone" />
|
android:text="@string/assistant_login_linphone" />
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
@ -66,26 +70,30 @@
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/login_generic"
|
android:id="@+id/login_generic"
|
||||||
style="@style/button_font"
|
style="@style/button_font"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/assistant_button"
|
android:background="@drawable/assistant_button"
|
||||||
android:textColor="@drawable/assistant_button_text_color"
|
android:textColor="@drawable/assistant_button_text_color"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="10dp"
|
||||||
android:contentDescription="@string/assistant_login_generic"
|
android:contentDescription="@string/assistant_login_generic"
|
||||||
android:text="@string/assistant_login_generic" />
|
android:text="@string/assistant_login_generic" />
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/remote_provisioning"
|
android:id="@+id/remote_provisioning"
|
||||||
style="@style/button_font"
|
style="@style/button_font"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="30dp"
|
android:layout_marginLeft="30dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/assistant_button"
|
android:background="@drawable/assistant_button"
|
||||||
android:textColor="@drawable/assistant_button_text_color"
|
android:textColor="@drawable/assistant_button_text_color"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="10dp"
|
||||||
android:contentDescription="@string/assistant_remote_provisioning"
|
android:contentDescription="@string/assistant_remote_provisioning"
|
||||||
android:text="@string/assistant_remote_provisioning" />
|
android:text="@string/assistant_remote_provisioning" />
|
||||||
|
|
||||||
|
|
|
@ -35,47 +35,55 @@
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/create_account"
|
android:id="@+id/create_account"
|
||||||
style="@style/button_font"
|
style="@style/button_font"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="30dp"
|
android:layout_marginTop="30dp"
|
||||||
android:background="@drawable/assistant_button"
|
android:background="@drawable/assistant_button"
|
||||||
android:textColor="@drawable/assistant_button_text_color"
|
android:textColor="@drawable/assistant_button_text_color"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="10dp"
|
||||||
android:contentDescription="@string/assistant_create_account"
|
android:contentDescription="@string/assistant_create_account"
|
||||||
android:text="@string/assistant_create_account" />
|
android:text="@string/assistant_create_account" />
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/login_linphone"
|
android:id="@+id/login_linphone"
|
||||||
style="@style/button_font"
|
style="@style/button_font"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="30dp"
|
android:layout_marginTop="30dp"
|
||||||
android:background="@drawable/assistant_button"
|
android:background="@drawable/assistant_button"
|
||||||
android:textColor="@drawable/assistant_button_text_color"
|
android:textColor="@drawable/assistant_button_text_color"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="10dp"
|
||||||
android:contentDescription="@string/assistant_login_linphone"
|
android:contentDescription="@string/assistant_login_linphone"
|
||||||
android:text="@string/assistant_login_linphone" />
|
android:text="@string/assistant_login_linphone" />
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/login_generic"
|
android:id="@+id/login_generic"
|
||||||
style="@style/button_font"
|
style="@style/button_font"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="30dp"
|
android:layout_marginTop="30dp"
|
||||||
android:background="@drawable/assistant_button"
|
android:background="@drawable/assistant_button"
|
||||||
android:textColor="@drawable/assistant_button_text_color"
|
android:textColor="@drawable/assistant_button_text_color"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="10dp"
|
||||||
android:contentDescription="@string/assistant_login_generic"
|
android:contentDescription="@string/assistant_login_generic"
|
||||||
android:text="@string/assistant_login_generic" />
|
android:text="@string/assistant_login_generic" />
|
||||||
|
|
||||||
<Button
|
<TextView
|
||||||
android:id="@+id/remote_provisioning"
|
android:id="@+id/remote_provisioning"
|
||||||
style="@style/button_font"
|
style="@style/button_font"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="30dp"
|
android:layout_marginTop="30dp"
|
||||||
android:background="@drawable/assistant_button"
|
android:background="@drawable/assistant_button"
|
||||||
android:textColor="@drawable/assistant_button_text_color"
|
android:textColor="@drawable/assistant_button_text_color"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="10dp"
|
||||||
android:contentDescription="@string/assistant_remote_provisioning"
|
android:contentDescription="@string/assistant_remote_provisioning"
|
||||||
android:text="@string/assistant_remote_provisioning" />
|
android:text="@string/assistant_remote_provisioning" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue