Change login activity
This commit is contained in:
parent
1822cadf4b
commit
fed28e37d0
|
@ -45,9 +45,9 @@ import android.widget.ArrayAdapter;
|
||||||
import android.widget.AutoCompleteTextView;
|
import android.widget.AutoCompleteTextView;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.CompoundButton;
|
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.RadioGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
@ -94,19 +94,33 @@ public class LoginActivity extends BaseActivity {
|
||||||
boolean isLoadingInstance = false;
|
boolean isLoadingInstance = false;
|
||||||
private String oldSearch;
|
private String oldSearch;
|
||||||
private ImageView info_uid, info_instance, info_pwd, info_2FA;
|
private ImageView info_uid, info_instance, info_pwd, info_2FA;
|
||||||
private CheckBox peertube_instance;
|
private RadioGroup set_instance_type;
|
||||||
private Button connectionButton;
|
private Button connectionButton;
|
||||||
private String actionToken;
|
private String actionToken;
|
||||||
private String autofilledInstance;
|
private String autofilledInstance;
|
||||||
private String social;
|
private String social;
|
||||||
|
private UpdateAccountInfoAsyncTask.SOCIAL socialNetwork;
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
Bundle b = getIntent().getExtras();
|
Bundle b = getIntent().getExtras();
|
||||||
|
socialNetwork = UpdateAccountInfoAsyncTask.SOCIAL.MASTODON;
|
||||||
if(b != null) {
|
if(b != null) {
|
||||||
autofilledInstance = b.getString("instance", null);
|
autofilledInstance = b.getString("instance", null);
|
||||||
social = b.getString("social", null);
|
social = b.getString("social", null);
|
||||||
|
if( social != null){
|
||||||
|
switch (social){
|
||||||
|
case "MASTODON":
|
||||||
|
socialNetwork = UpdateAccountInfoAsyncTask.SOCIAL.MASTODON;
|
||||||
|
break;
|
||||||
|
case "PEERTUBE":
|
||||||
|
socialNetwork = UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE;
|
||||||
|
break;
|
||||||
|
case "GNU":
|
||||||
|
socialNetwork = UpdateAccountInfoAsyncTask.SOCIAL.GNU;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if( getIntent() != null && getIntent().getData() != null && getIntent().getData().toString().contains("mastalab://backtomastalab?code=")){
|
if( getIntent() != null && getIntent().getData() != null && getIntent().getData().toString().contains("mastalab://backtomastalab?code=")){
|
||||||
String url = getIntent().getData().toString();
|
String url = getIntent().getData().toString();
|
||||||
|
@ -137,7 +151,7 @@ public class LoginActivity extends BaseActivity {
|
||||||
editor.putString(Helper.PREF_KEY_OAUTH_TOKEN, token);
|
editor.putString(Helper.PREF_KEY_OAUTH_TOKEN, token);
|
||||||
editor.apply();
|
editor.apply();
|
||||||
//Update the account with the token;
|
//Update the account with the token;
|
||||||
new UpdateAccountInfoAsyncTask(LoginActivity.this, token, client_id, client_secret, refresh_token, instance, peertube_instance.isChecked()?UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE:UpdateAccountInfoAsyncTask.SOCIAL.MASTODON).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
new UpdateAccountInfoAsyncTask(LoginActivity.this, token, client_id, client_secret, refresh_token, instance, socialNetwork).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
} catch (JSONException ignored) {}
|
} catch (JSONException ignored) {}
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
}}).start();
|
}}).start();
|
||||||
|
@ -194,18 +208,46 @@ public class LoginActivity extends BaseActivity {
|
||||||
info_instance = findViewById(R.id.info_instance);
|
info_instance = findViewById(R.id.info_instance);
|
||||||
info_pwd = findViewById(R.id.info_pwd);
|
info_pwd = findViewById(R.id.info_pwd);
|
||||||
info_2FA = findViewById(R.id.info_2FA);
|
info_2FA = findViewById(R.id.info_2FA);
|
||||||
peertube_instance = findViewById(R.id.peertube_instance);
|
set_instance_type = findViewById(R.id.set_instance_type);
|
||||||
|
|
||||||
|
|
||||||
peertube_instance.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
||||||
|
int attachmentAction = sharedpreferences.getInt(Helper.SET_ATTACHMENT_ACTION, Helper.ATTACHMENT_ALWAYS);
|
||||||
|
switch (attachmentAction){
|
||||||
|
case 0:
|
||||||
|
set_instance_type.check(R.id.set_mastodon);
|
||||||
|
socialNetwork = UpdateAccountInfoAsyncTask.SOCIAL.MASTODON;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
set_instance_type.check(R.id.set_peertube);
|
||||||
|
socialNetwork = UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
set_instance_type.check(R.id.set_gnu);
|
||||||
|
socialNetwork = UpdateAccountInfoAsyncTask.SOCIAL.GNU;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
set_instance_type.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||||
if( isChecked)
|
switch(checkedId) {
|
||||||
login_uid.setHint(R.string.username);
|
case R.id.set_mastodon:
|
||||||
else
|
login_uid.setHint(R.string.email);
|
||||||
login_uid.setHint(R.string.email);
|
socialNetwork = UpdateAccountInfoAsyncTask.SOCIAL.MASTODON;
|
||||||
|
break;
|
||||||
|
case R.id.set_peertube:
|
||||||
|
login_uid.setHint(R.string.username);
|
||||||
|
socialNetwork = UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE;
|
||||||
|
break;
|
||||||
|
case R.id.set_gnu:
|
||||||
|
login_uid.setHint(R.string.email);
|
||||||
|
socialNetwork = UpdateAccountInfoAsyncTask.SOCIAL.GNU;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
connectionButton = findViewById(R.id.login_button);
|
connectionButton = findViewById(R.id.login_button);
|
||||||
|
|
||||||
info_instance.setOnClickListener(new View.OnClickListener() {
|
info_instance.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@ -399,7 +441,7 @@ public class LoginActivity extends BaseActivity {
|
||||||
login_uid.requestFocus();
|
login_uid.requestFocus();
|
||||||
}
|
}
|
||||||
if( social != null && social.equals("PEERTUBE")){
|
if( social != null && social.equals("PEERTUBE")){
|
||||||
peertube_instance.setChecked(true);
|
set_instance_type.check(R.id.set_peertube);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -429,14 +471,16 @@ public class LoginActivity extends BaseActivity {
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
Toasty.error(LoginActivity.this,getString(R.string.client_error), Toast.LENGTH_LONG).show();
|
Toasty.error(LoginActivity.this,getString(R.string.client_error), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
if( !peertube_instance.isChecked())
|
if( socialNetwork == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON)
|
||||||
actionToken = "/api/v1/apps";
|
actionToken = "/api/v1/apps";
|
||||||
else
|
else if( socialNetwork == UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE)
|
||||||
actionToken = "/api/v1/oauth-clients/local";
|
actionToken = "/api/v1/oauth-clients/local";
|
||||||
|
else
|
||||||
|
actionToken = "/api/v1/apps";
|
||||||
final HashMap<String, String> parameters = new HashMap<>();
|
final HashMap<String, String> parameters = new HashMap<>();
|
||||||
parameters.put(Helper.CLIENT_NAME, Helper.CLIENT_NAME_VALUE);
|
parameters.put(Helper.CLIENT_NAME, Helper.CLIENT_NAME_VALUE);
|
||||||
parameters.put(Helper.REDIRECT_URIS, client_id_for_webview?Helper.REDIRECT_CONTENT_WEB:Helper.REDIRECT_CONTENT);
|
parameters.put(Helper.REDIRECT_URIS, client_id_for_webview?Helper.REDIRECT_CONTENT_WEB:Helper.REDIRECT_CONTENT);
|
||||||
if( !peertube_instance.isChecked()) {
|
if( socialNetwork != UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE) {
|
||||||
parameters.put(Helper.SCOPES, Helper.OAUTH_SCOPES);
|
parameters.put(Helper.SCOPES, Helper.OAUTH_SCOPES);
|
||||||
}else {
|
}else {
|
||||||
parameters.put(Helper.SCOPES, Helper.OAUTH_SCOPES_PEERTUBE);
|
parameters.put(Helper.SCOPES, Helper.OAUTH_SCOPES_PEERTUBE);
|
||||||
|
@ -448,7 +492,7 @@ public class LoginActivity extends BaseActivity {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
String response;
|
String response;
|
||||||
if( !peertube_instance.isChecked())
|
if( socialNetwork != UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE)
|
||||||
response = new HttpsConnection(LoginActivity.this).post(Helper.instanceWithProtocol(instance) + actionToken, 30, parameters, null );
|
response = new HttpsConnection(LoginActivity.this).post(Helper.instanceWithProtocol(instance) + actionToken, 30, parameters, null );
|
||||||
else
|
else
|
||||||
response = new HttpsConnection(LoginActivity.this).get(Helper.instanceWithProtocol(instance) + actionToken, 30, parameters, null );
|
response = new HttpsConnection(LoginActivity.this).get(Helper.instanceWithProtocol(instance) + actionToken, 30, parameters, null );
|
||||||
|
@ -461,7 +505,7 @@ public class LoginActivity extends BaseActivity {
|
||||||
client_id = resobj.get(Helper.CLIENT_ID).toString();
|
client_id = resobj.get(Helper.CLIENT_ID).toString();
|
||||||
client_secret = resobj.get(Helper.CLIENT_SECRET).toString();
|
client_secret = resobj.get(Helper.CLIENT_SECRET).toString();
|
||||||
String id = null;
|
String id = null;
|
||||||
if( !peertube_instance.isChecked())
|
if( socialNetwork != UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE)
|
||||||
id = resobj.get(Helper.ID).toString();
|
id = resobj.get(Helper.ID).toString();
|
||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
SharedPreferences.Editor editor = sharedpreferences.edit();
|
SharedPreferences.Editor editor = sharedpreferences.edit();
|
||||||
|
@ -477,7 +521,7 @@ public class LoginActivity extends BaseActivity {
|
||||||
boolean embedded_browser = sharedpreferences.getBoolean(Helper.SET_EMBEDDED_BROWSER, true);
|
boolean embedded_browser = sharedpreferences.getBoolean(Helper.SET_EMBEDDED_BROWSER, true);
|
||||||
if( embedded_browser) {
|
if( embedded_browser) {
|
||||||
Intent i = new Intent(LoginActivity.this, WebviewConnectActivity.class);
|
Intent i = new Intent(LoginActivity.this, WebviewConnectActivity.class);
|
||||||
i.putExtra("social", peertube_instance.isChecked()?UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE:UpdateAccountInfoAsyncTask.SOCIAL.MASTODON);
|
i.putExtra("social", socialNetwork);
|
||||||
i.putExtra("instance", instance);
|
i.putExtra("instance", instance);
|
||||||
startActivity(i);
|
startActivity(i);
|
||||||
}else{
|
}else{
|
||||||
|
@ -532,7 +576,7 @@ public class LoginActivity extends BaseActivity {
|
||||||
parameters.put("password",login_passwd.getText().toString());
|
parameters.put("password",login_passwd.getText().toString());
|
||||||
}
|
}
|
||||||
String oauthUrl;
|
String oauthUrl;
|
||||||
if( !peertube_instance.isChecked()) {
|
if( socialNetwork != UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE) {
|
||||||
parameters.put("scope", " read write follow");
|
parameters.put("scope", " read write follow");
|
||||||
oauthUrl = "/oauth/token";
|
oauthUrl = "/oauth/token";
|
||||||
}else {
|
}else {
|
||||||
|
@ -558,7 +602,7 @@ public class LoginActivity extends BaseActivity {
|
||||||
editor.putString(Helper.PREF_KEY_OAUTH_TOKEN, token);
|
editor.putString(Helper.PREF_KEY_OAUTH_TOKEN, token);
|
||||||
editor.apply();
|
editor.apply();
|
||||||
//Update the account with the token;
|
//Update the account with the token;
|
||||||
new UpdateAccountInfoAsyncTask(LoginActivity.this, token, client_id, client_secret, refresh_token, instance, peertube_instance.isChecked()?UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE:UpdateAccountInfoAsyncTask.SOCIAL.MASTODON).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
new UpdateAccountInfoAsyncTask(LoginActivity.this, token, client_id, client_secret, refresh_token, instance, socialNetwork).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
} catch (JSONException ignored) {ignored.printStackTrace();}
|
} catch (JSONException ignored) {ignored.printStackTrace();}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -51,7 +51,8 @@ public class UpdateAccountInfoAsyncTask extends AsyncTask<Void, Void, Void> {
|
||||||
MASTODON,
|
MASTODON,
|
||||||
PEERTUBE,
|
PEERTUBE,
|
||||||
PIXELFED,
|
PIXELFED,
|
||||||
PLEROMA
|
PLEROMA,
|
||||||
|
GNU
|
||||||
}
|
}
|
||||||
public UpdateAccountInfoAsyncTask(Context context, String token, String client_id, String client_secret, String refresh_token, String instance, SOCIAL social){
|
public UpdateAccountInfoAsyncTask(Context context, String token, String client_id, String client_secret, String refresh_token, String instance, SOCIAL social){
|
||||||
this.contextReference = new WeakReference<>(context);
|
this.contextReference = new WeakReference<>(context);
|
||||||
|
|
|
@ -34,9 +34,7 @@ import java.security.NoSuchAlgorithmException;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import fr.gouv.etalab.mastodon.R;
|
import fr.gouv.etalab.mastodon.R;
|
||||||
import fr.gouv.etalab.mastodon.activities.MainActivity;
|
import fr.gouv.etalab.mastodon.activities.MainActivity;
|
||||||
|
@ -143,31 +141,24 @@ public class GNUAPI {
|
||||||
HashMap<String, String> requestParams = new HashMap<>();
|
HashMap<String, String> requestParams = new HashMap<>();
|
||||||
if( display_name != null)
|
if( display_name != null)
|
||||||
try {
|
try {
|
||||||
requestParams.put("display_name",URLEncoder.encode(display_name, "UTF-8"));
|
requestParams.put("name",URLEncoder.encode(display_name, "UTF-8"));
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
requestParams.put("display_name",display_name);
|
requestParams.put("name",display_name);
|
||||||
}
|
}
|
||||||
if( note != null)
|
if( note != null)
|
||||||
try {
|
try {
|
||||||
requestParams.put("note",URLEncoder.encode(note, "UTF-8"));
|
requestParams.put("description",URLEncoder.encode(note, "UTF-8"));
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
requestParams.put("note",note);
|
requestParams.put("description",note);
|
||||||
}
|
}
|
||||||
if( privacy != null)
|
if( privacy != null)
|
||||||
requestParams.put("locked",privacy== accountPrivacy.LOCKED?"true":"false");
|
requestParams.put("locked",privacy== accountPrivacy.LOCKED?"true":"false");
|
||||||
int i = 0;
|
|
||||||
if( customFields != null && customFields.size() > 0){
|
|
||||||
Iterator it = customFields.entrySet().iterator();
|
|
||||||
while (it.hasNext()) {
|
|
||||||
Map.Entry pair = (Map.Entry)it.next();
|
|
||||||
requestParams.put("fields_attributes["+i+"][name]",(String)pair.getKey());
|
|
||||||
requestParams.put("fields_attributes["+i+"][value]",(String)pair.getValue());
|
|
||||||
it.remove();
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
new HttpsConnection(context).patch(getAbsoluteUrl("/accounts/update_credentials"), 60, requestParams, avatar, avatarName, header, headerName, prefKeyOauthTokenT);
|
if( requestParams.size() > 0)
|
||||||
|
new HttpsConnection(context).patch(getAbsoluteUrl("/accounts/update_profile"), 60, requestParams, avatar, null, null, null, prefKeyOauthTokenT);
|
||||||
|
if( avatar!= null && avatarName != null)
|
||||||
|
new HttpsConnection(context).patch(getAbsoluteUrl("/accounts/update_profile_image"), 60, null, avatar, avatarName, null, null, prefKeyOauthTokenT);
|
||||||
|
|
||||||
} catch (HttpsConnection.HttpsConnectionException e) {
|
} catch (HttpsConnection.HttpsConnectionException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
setError(e.getStatusCode(), e);
|
setError(e.getStatusCode(), e);
|
||||||
|
@ -280,7 +271,7 @@ public class GNUAPI {
|
||||||
List<Relationship> relationships = new ArrayList<>();
|
List<Relationship> relationships = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
HttpsConnection httpsConnection = new HttpsConnection(context);
|
HttpsConnection httpsConnection = new HttpsConnection(context);
|
||||||
String response = httpsConnection.get(getAbsoluteUrl("/accounts/relationships"), 60, params, prefKeyOauthTokenT);
|
String response = httpsConnection.get(getAbsoluteUrl("/friendships/show"), 60, params, prefKeyOauthTokenT);
|
||||||
relationships = parseRelationshipResponse(new JSONArray(response));
|
relationships = parseRelationshipResponse(new JSONArray(response));
|
||||||
apiResponse.setSince_id(httpsConnection.getSince_id());
|
apiResponse.setSince_id(httpsConnection.getSince_id());
|
||||||
apiResponse.setMax_id(httpsConnection.getMax_id());
|
apiResponse.setMax_id(httpsConnection.getMax_id());
|
||||||
|
@ -1280,7 +1271,7 @@ public class GNUAPI {
|
||||||
action = String.format("/statuses/%s/unreblog", targetedId);
|
action = String.format("/statuses/%s/unreblog", targetedId);
|
||||||
break;
|
break;
|
||||||
case FOLLOW:
|
case FOLLOW:
|
||||||
action = String.format("/accounts/%s/follow", targetedId);
|
action = "/friendships/create";
|
||||||
break;
|
break;
|
||||||
case REMOTE_FOLLOW:
|
case REMOTE_FOLLOW:
|
||||||
action = "/follows";
|
action = "/follows";
|
||||||
|
@ -1288,7 +1279,7 @@ public class GNUAPI {
|
||||||
params.put("uri", targetedId);
|
params.put("uri", targetedId);
|
||||||
break;
|
break;
|
||||||
case UNFOLLOW:
|
case UNFOLLOW:
|
||||||
action = String.format("/accounts/%s/unfollow", targetedId);
|
action = "/friendships/destroy";
|
||||||
break;
|
break;
|
||||||
case BLOCK:
|
case BLOCK:
|
||||||
action = String.format("/accounts/%s/block", targetedId);
|
action = String.format("/accounts/%s/block", targetedId);
|
||||||
|
|
|
@ -77,11 +77,28 @@
|
||||||
android:src="@drawable/ic_info_login"
|
android:src="@drawable/ic_info_login"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp" />
|
android:layout_height="30dp" />
|
||||||
<CheckBox
|
<RadioGroup
|
||||||
android:id="@+id/peertube_instance"
|
android:id="@+id/set_instance_type"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:text="@string/peertube_instance"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:orientation="horizontal">
|
||||||
|
<RadioButton android:id="@+id/set_mastodon"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="true"
|
||||||
|
android:text="Mastodon"
|
||||||
|
/>
|
||||||
|
<RadioButton android:id="@+id/set_peertube"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Peertube"
|
||||||
|
/>
|
||||||
|
<RadioButton android:id="@+id/set_gnu"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="GNU"
|
||||||
|
/>
|
||||||
|
</RadioGroup>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.design.widget.TextInputLayout>
|
</android.support.design.widget.TextInputLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|
|
@ -83,11 +83,28 @@
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp" />
|
android:layout_height="30dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<CheckBox
|
<RadioGroup
|
||||||
android:id="@+id/peertube_instance"
|
android:id="@+id/set_instance_type"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:text="@string/peertube_instance"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:orientation="horizontal">
|
||||||
|
<RadioButton android:id="@+id/set_mastodon"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="true"
|
||||||
|
android:text="Mastodon"
|
||||||
|
/>
|
||||||
|
<RadioButton android:id="@+id/set_peertube"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Peertube"
|
||||||
|
/>
|
||||||
|
<RadioButton android:id="@+id/set_gnu"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="GNU"
|
||||||
|
/>
|
||||||
|
</RadioGroup>
|
||||||
</android.support.design.widget.TextInputLayout>
|
</android.support.design.widget.TextInputLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in New Issue