discord-jadx/app/src/main/java/com/discord/views/ToolbarTitleLayout.java

60 lines
2.3 KiB
Java
Raw Normal View History

2021-06-27 20:44:35 +00:00
package com.discord.views;
import android.content.Context;
import android.view.LayoutInflater;
2021-07-19 11:38:20 +00:00
import android.widget.ImageView;
2021-06-27 20:44:35 +00:00
import android.widget.TextView;
import androidx.annotation.ColorInt;
import androidx.constraintlayout.widget.ConstraintLayout;
2021-07-19 19:45:22 +00:00
import c.a.i.r3;
2021-06-27 20:44:35 +00:00
import com.discord.utilities.view.extensions.ViewExtensions;
import d0.z.d.m;
/* compiled from: ToolbarTitleLayout.kt */
public final class ToolbarTitleLayout extends ConstraintLayout {
2021-07-19 19:45:22 +00:00
public final r3 i;
2021-06-27 20:44:35 +00:00
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ToolbarTitleLayout(Context context) {
super(context);
m.checkNotNullParameter(context, "context");
2021-07-19 19:45:22 +00:00
LayoutInflater.from(getContext()).inflate(2131558829, this);
2021-07-20 00:17:12 +00:00
int i = 2131365436;
ImageView imageView = (ImageView) findViewById(2131365436);
2021-07-19 11:38:20 +00:00
if (imageView != null) {
2021-07-20 00:17:12 +00:00
i = 2131365437;
StatusView statusView = (StatusView) findViewById(2131365437);
2021-07-19 11:38:20 +00:00
if (statusView != null) {
2021-07-20 00:17:12 +00:00
i = 2131365438;
TextView textView = (TextView) findViewById(2131365438);
2021-07-19 11:38:20 +00:00
if (textView != null) {
2021-07-20 00:17:12 +00:00
i = 2131365439;
TextView textView2 = (TextView) findViewById(2131365439);
2021-07-19 11:38:20 +00:00
if (textView2 != null) {
2021-07-19 19:45:22 +00:00
r3 r3Var = new r3(this, imageView, statusView, textView, textView2);
m.checkNotNullExpressionValue(r3Var, "ViewToolbarTitleBinding.…ater.from(context), this)");
this.i = r3Var;
2021-07-19 11:38:20 +00:00
return;
}
2021-06-27 20:44:35 +00:00
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(getResources().getResourceName(i)));
}
public final TextView getTitle() {
2021-07-19 11:38:20 +00:00
TextView textView = this.i.d;
2021-06-27 20:44:35 +00:00
m.checkNotNullExpressionValue(textView, "binding.toolbarTitle");
return textView;
}
public final void setSubtitle(CharSequence charSequence) {
2021-07-19 11:38:20 +00:00
TextView textView = this.i.e;
2021-06-27 20:44:35 +00:00
m.checkNotNullExpressionValue(textView, "binding.toolbarTitleSubtext");
ViewExtensions.setTextAndVisibilityBy(textView, charSequence);
}
public final void setTitleColor(@ColorInt int i) {
2021-07-19 11:38:20 +00:00
this.i.d.setTextColor(i);
2021-06-27 20:44:35 +00:00
}
}