diff --git a/app/src/main/java/app/fedilab/android/peertube/activities/LoginActivity.java b/app/src/main/java/app/fedilab/android/peertube/activities/LoginActivity.java index f0729699..fe3f09d5 100644 --- a/app/src/main/java/app/fedilab/android/peertube/activities/LoginActivity.java +++ b/app/src/main/java/app/fedilab/android/peertube/activities/LoginActivity.java @@ -71,23 +71,10 @@ public class LoginActivity extends BaseBarActivity { finish(); } - if (getSupportActionBar() != null) + if (getSupportActionBar() != null) { getSupportActionBar().setDisplayHomeAsUpEnabled(true); - - - SpannableString content_create; - content_create = new SpannableString(getString(R.string.join_peertube)); - - content_create.setSpan(new UnderlineSpan(), 0, content_create.length(), 0); - content_create.setSpan(new ForegroundColorSpan(Helper.fetchAccentColor(LoginActivity.this)), 0, content_create.length(), - Spanned.SPAN_INCLUSIVE_EXCLUSIVE); - binding.createAnAccountPeertube.setText(content_create, TextView.BufferType.SPANNABLE); - - binding.createAnAccountPeertube.setOnClickListener(v -> { - Intent mainActivity = new Intent(LoginActivity.this, PeertubeRegisterActivity.class); - startActivity(mainActivity); - }); - + getSupportActionBar().setTitle(R.string.login); + } binding.loginInstanceContainer.setVisibility(View.VISIBLE); diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginJoin.java b/app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginJoin.java index fcbb855b..07e18135 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginJoin.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginJoin.java @@ -14,6 +14,7 @@ package app.fedilab.android.ui.fragment; * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ +import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; @@ -24,11 +25,10 @@ import androidx.fragment.app.Fragment; import app.fedilab.android.databinding.FragmentLoginJoinBinding; import app.fedilab.android.mastodon.helper.Helper; +import app.fedilab.android.peertube.activities.PeertubeRegisterActivity; public class FragmentLoginJoin extends Fragment { - - private FragmentLoginJoinBinding binding; public View onCreateView(@NonNull LayoutInflater inflater, @@ -41,7 +41,16 @@ public class FragmentLoginJoin extends Fragment { getParentFragmentManager(), android.R.id.content, new FragmentLoginPickInstanceMastodon(), null, null, FragmentLoginPickInstanceMastodon.class.getName()); }); - + binding.joinPeertube.setOnClickListener(v -> { + Intent mainActivity = new Intent(requireActivity(), PeertubeRegisterActivity.class); + startActivity(mainActivity); + }); return root; } + + @Override + public void onDestroyView() { + super.onDestroyView(); + binding = null; + } } \ No newline at end of file diff --git a/app/src/main/res/layouts/mastodon/layout/fragment_login_join.xml b/app/src/main/res/layouts/mastodon/layout/fragment_login_join.xml index 45f8c681..9161b4c8 100644 --- a/app/src/main/res/layouts/mastodon/layout/fragment_login_join.xml +++ b/app/src/main/res/layouts/mastodon/layout/fragment_login_join.xml @@ -14,147 +14,151 @@ You should have received a copy of the GNU General Public License along with Fedilab; if not, see . --> - - + android:orientation="vertical" + android:padding="12dp"> - - - + android:layout_marginTop="12dp" + android:gravity="center_horizontal" + android:text="@string/invite_join_the_fediverse" + android:textAppearance="@style/TextAppearance.Material3.HeadlineMedium" /> + + + android:orientation="vertical" + android:padding="12dp"> - + + + + + + + + + + + - + - - - - - - - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layouts/peertube/layout/activity_login_peertube.xml b/app/src/main/res/layouts/peertube/layout/activity_login_peertube.xml index 17241d5b..cb6e5912 100644 --- a/app/src/main/res/layouts/peertube/layout/activity_login_peertube.xml +++ b/app/src/main/res/layouts/peertube/layout/activity_login_peertube.xml @@ -14,168 +14,73 @@ You should have received a copy of the GNU General Public License along with Fedilab; if not, see . --> - + android:gravity="center" + android:orientation="vertical" + android:padding="24dp"> - + android:layout_height="wrap_content" + android:hint="@string/instance"> - - - - + android:enabled="false" + android:importantForAutofill="no" + android:inputType="textWebEmailAddress" + android:singleLine="true" /> - + - + android:layout_height="wrap_content" + android:layout_marginTop="12dp"> - + android:hint="@string/username_or_email" + android:importantForAutofill="no" + android:inputType="textEmailAddress" + android:singleLine="true" /> + - + - - - + android:hint="@string/password" + android:importantForAutofill="no" + android:inputType="textPassword" + android:singleLine="true" /> + - + - - - - - - - - - - - - - - - -