<io.adx3.library.view.Adx3UserView
android:id="@+id/view_user"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:unitId="UnitId">
<ImageView
android:id="@+id/imageView"
android:layout_width="100dp"
android:layout_height="100dp"
android:scaleType="fitXY"
android:src="@mipmap/ic_launcher"
app:layout_constraintLeft_toLeftOf="parent" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:textColor="@color/black"
app:layout_constraintLeft_toRightOf="@+id/imageView" />
<io.adx3.library.view.videoplayer.player.Adx3VideoView
android:id="@+id/video_user"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginTop="10dp"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
</io.adx3.library.view.Adx3UserView>
public class UserAInsertctivity extends AppCompatActivity {
TextView textView;
ImageView imageView;
Adx3UserView view_user;
Adx3VideoView video_user;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.xml);
initView();
setUserView();
}
private void initView() {
textView = findViewById(R.id.textView);
imageView = findViewById(R.id.imageView);
view_user = findViewById(R.id.view_user);
video_user = findViewById(R.id.video_user);
}
private void setUserView() {
//if you don't set the UnitId in XML
//view_user.setUnitId("UnitId");
view_user.setImageView(imageView);
view_user.setVideoView(video_user);
view_user.setTextView(textView);
view_user.load();
}
}