Verified Commit 25f822e3 authored by cyberta's avatar cyberta

change theme color, terms of services, custom donation string for riseup.vpn

parent 727bbdbd
Pipeline #18809 passed with stages
in 21 minutes and 46 seconds
......@@ -2,11 +2,11 @@
<resources>
<!--Colors-->
<!--Color of the action bar-->
<color name="colorPrimary">#b39ddb</color>
<color name="colorPrimary">#5e9ee3</color>
<!--Color of the status bar-->
<color name="colorPrimaryDark">#ac97d2</color>
<color name="colorPrimaryDark">#5c7ce1</color>
<!--Font color of the action bar title-->
<color name="colorActionBarTitleFont">#ffffff</color>
<!--Font color of the action bar subtitle-->
<color name="colorActionBarSubtitleFont">#000000</color>
<color name="colorActionBarSubtitleFont">#cccccc</color>
</resources>
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="donate_message">Please donate today if you value secure communication that is easy for both the end-user and the service provider.</string>
<string name="donate_message">RiseupVPN is an easy, fast and secure VPN service from riseup.net. RiseupVPN does not require an user account, keep logs or track you in any way. This service paid for entirely by donations from users like you. Please donate at https://riseup.net/vpn/donate. </string>
<string name="terms_of_service">By using this application you agree to the Terms of Service available at https://riseup.net/tos. This service is provide as-is, without any warranty and is intended for people who work to make the world a better place.</string>
</resources>
......@@ -11,8 +11,11 @@ import android.widget.TextView;
import butterknife.ButterKnife;
import butterknife.InjectView;
import se.leap.bitmaskclient.BuildConfig;
import se.leap.bitmaskclient.R;
import static android.view.View.VISIBLE;
public class AboutFragment extends Fragment {
final public static String TAG = "aboutFragment";
......@@ -21,6 +24,9 @@ public class AboutFragment extends Fragment {
@InjectView(R.id.version)
TextView versionTextView;
@InjectView(R.id.terms_of_service)
TextView termsOfService;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.f_about, container, false);
......@@ -43,6 +49,19 @@ public class AboutFragment extends Fragment {
}
versionTextView.setText(getString(R.string.version_info, name, version));
if (BuildConfig.FLAVOR_branding.equals("custom") && hasTermsOfServiceResource()) {
termsOfService.setText(getString(getTermsOfServiceResource()));
termsOfService.setVisibility(VISIBLE);
}
}
private boolean hasTermsOfServiceResource() {
return getTermsOfServiceResource() != 0;
}
private int getTermsOfServiceResource() {
return this.getContext().getResources().getIdentifier("terms_of_service", "string", this.getContext().getPackageName());
}
}
......@@ -22,6 +22,15 @@
android:layout_width="match_parent"
android:layout_height="12sp" />
<TextView
android:id="@+id/terms_of_service"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autoLink="all"
android:visibility="gone"
android:paddingBottom="12dp"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
......@@ -22,6 +22,15 @@
android:layout_width="match_parent"
android:layout_height="10sp" />
<TextView
android:id="@+id/terms_of_service"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autoLink="all"
android:visibility="gone"
android:paddingBottom="12dp"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment