Skip to content

Commit

Permalink
optimizations suggested by android studio. hope it won't break anything
Browse files Browse the repository at this point in the history
  • Loading branch information
ebaschiera committed Nov 13, 2022
1 parent 213ff0d commit 7af2a35
Showing 1 changed file with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
package com.ebaschiera.triplecamel.ui.main;

import androidx.lifecycle.ViewModelProviders;

import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import android.text.Html;
import android.text.Spanned;
import android.text.method.LinkMovementMethod;
Expand All @@ -16,13 +9,14 @@
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.ebaschiera.triplecamel.R;

public class MainFragment extends Fragment {

private MainViewModel mViewModel;

public static MainFragment newInstance() {
return new MainFragment();
}
Expand All @@ -32,7 +26,7 @@ public static MainFragment newInstance() {
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.main_fragment, container, false);
TextView about_text = (TextView) rootView.findViewById(R.id.innerTextViewAbout);
TextView about_text = rootView.findViewById(R.id.innerTextViewAbout);
Spanned sp = Html.fromHtml(getString(R.string.about_this_app));
about_text.setText(sp);
about_text.setMovementMethod(LinkMovementMethod.getInstance());
Expand All @@ -42,8 +36,6 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mViewModel = ViewModelProviders.of(this).get(MainViewModel.class);
// TODO: Use the ViewModel
}

}

0 comments on commit 7af2a35

Please sign in to comment.