Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several minor changes for UI and extra stuff #398

Merged
merged 8 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import android.content.SharedPreferences;
import android.os.Bundle;

import androidx.core.text.HtmlCompat;
import androidx.fragment.app.Fragment;

import android.preference.PreferenceManager;
Expand All @@ -14,13 +16,14 @@
import android.widget.TextView;
import android.widget.Button;

public class BackupsFragment extends Fragment implements View.OnClickListener {
public class BackupsFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_backups, container, false);

TextView textView = view.findViewById(R.id.textViewGoogle);
textView.setText(HtmlCompat.fromHtml(getString(R.string.google_auto_backup_link), HtmlCompat.FROM_HTML_MODE_LEGACY));
textView.setMovementMethod(LinkMovementMethod.getInstance());

Button doneButton = view.findViewById(R.id.button_onboard_done);
Expand All @@ -33,8 +36,4 @@ public void onboardDone(View view) {
sharedPreferencesEditor.putBoolean(COMPLETED_ONBOARDING, true).apply();
requireActivity().finish();
}

@Override
public void onClick(View view) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import android.os.Bundle;
import android.security.keystore.KeyPermanentlyInvalidatedException;
import android.security.keystore.UserNotAuthenticatedException;
import android.text.Html;
import android.text.InputType;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
Expand Down Expand Up @@ -83,6 +82,7 @@
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.core.text.HtmlCompat;
import androidx.recyclerview.widget.RecyclerView;

public class Activity extends AppCompatActivity
Expand Down Expand Up @@ -442,7 +442,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
final AlertDialog dialog = new AlertDialog.Builder(this)
.setTitle(r.getString(R.string.main_about_title,
info.versionName, info.versionCode))
.setMessage(Html.fromHtml(r.getString(R.string.main_about_message)))
.setMessage(HtmlCompat.fromHtml(r.getString(R.string.main_about_message), HtmlCompat.FROM_HTML_MODE_LEGACY))
.setPositiveButton(R.string.close, null)
.create();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@ public void onAnimationStart(Animator animation) {
mImageActive.setOnClickListener(mSelectClick);
mShare.setOnClickListener(mShareClick);
mView.setOnClickListener(mViewClick);
mView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
mSelectClick.onClick(mIcons);
return true;
}
});
}


Expand Down
3 changes: 2 additions & 1 deletion mobile/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:spanCount="@integer/columns"
tools:listitem="@layout/token"
/>

<LinearLayout
Expand Down Expand Up @@ -111,4 +112,4 @@
</LinearLayout>


</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Loading
Loading