1

I know, the question may seem duplicate but is not. I am using AppCompatTextView from androidX and the documentation says that the AppCompatTextView inherits the TextView's long list of methods. Among them there is setJustificationMode() and getJustificationMode() methods. But still I can't use those methods below API 26.

@BindView(R.id.textView3) AppCompatTextView mTextView;

@Override
public void prepareUI() {
    mTextView.setJustificationMode(Layout.JUSTIFICATION_MODE_INTER_WORD);
}

I even tried writing it from the XML, but still no success. I tried it with app:justificationMode && android:justificationMode... Is there something that I am doing it wrong or missing?

Here is the link to the AppCompatTextView documentation: AppCompatTextView documentation

amira
  • 416
  • 1
  • 7
  • 24
  • it looks like method you are using is not inherited in androidx see this. https://developer.android.com/reference/androidx/appcompat/widget/AppCompatTextView – karan Nov 15 '18 at 11:52
  • JustificationModes are only used on Android Oreo and above not below that.. – Ümañg ßürmån Nov 15 '18 at 11:58
  • Android does not support "Full Justification", but .... https://stackoverflow.com/a/24986794/3941761 – user6042 Jul 07 '19 at 21:53

0 Answers0