Nextrek
Diff Revisions
801
vs
802
for /Android/SmartCharging/SmartCharging/app/src/main/java/it/fedeloper/smartcharging/Controller/RegisterActivity.java
|
@@ -5,6 +5,7 @@ |
5 |
5 |
|
import android.content.res.Resources; |
6 |
6 |
|
import android.graphics.Bitmap; |
7 |
7 |
|
import android.graphics.BitmapFactory; |
|
8 |
+ |
import android.graphics.Paint; |
8 |
9 |
|
import android.graphics.drawable.BitmapDrawable; |
9 |
10 |
|
import android.net.Uri; |
10 |
11 |
|
import android.os.Bundle; |
|
@@ -37,6 +38,7 @@ |
37 |
38 |
|
import java.io.UnsupportedEncodingException; |
38 |
39 |
|
import java.util.ArrayList; |
39 |
40 |
|
import java.util.HashMap; |
|
41 |
+ |
import java.util.Locale; |
40 |
42 |
|
import java.util.Map; |
41 |
43 |
|
|
42 |
44 |
|
|
|
@@ -76,6 +78,16 @@ |
76 |
78 |
|
setSupportActionBar(toolbar); |
77 |
79 |
|
getSupportActionBar().setTitle(R.string.register_title); |
78 |
80 |
|
|
|
81 |
+ |
|
|
82 |
+ |
TextView registerPolicy = (TextView) findViewById(R.id.privacy_policy_text); |
|
83 |
+ |
registerPolicy.setPaintFlags(registerPolicy.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); |
|
84 |
+ |
registerPolicy.setOnClickListener(new View.OnClickListener() { |
|
85 |
+ |
@Override |
|
86 |
+ |
public void onClick(View v) { |
|
87 |
+ |
openLink("http://www.smartcharging.it/condizioni-e-termini-d-uso-e-informativa-policy.html"); |
|
88 |
+ |
} |
|
89 |
+ |
}); |
|
90 |
+ |
|
79 |
91 |
|
localeAdditionalLayout = (LinearLayout) findViewById(R.id.locale); |
80 |
92 |
|
localeAdditionalLayout.setVisibility(View.GONE); |
81 |
93 |
|
|
|
@@ -98,6 +110,12 @@ |
98 |
110 |
|
avatarContainer.setVisibility(View.GONE); |
99 |
111 |
|
} |
100 |
112 |
|
|
|
113 |
+ |
public void openLink(String url) { |
|
114 |
+ |
Intent i = new Intent(Intent.ACTION_VIEW); |
|
115 |
+ |
i.setData(Uri.parse(url)); |
|
116 |
+ |
startActivity(i); |
|
117 |
+ |
} |
|
118 |
+ |
|
101 |
119 |
|
|
102 |
120 |
|
|
103 |
121 |
|
public void nextclick(View v) { |