Initial commit
This commit is contained in:
79
sources/com/ubt/jimu/user/view/setting/TeachActivity.java
Normal file
79
sources/com/ubt/jimu/user/view/setting/TeachActivity.java
Normal file
@@ -0,0 +1,79 @@
|
||||
package com.ubt.jimu.user.view.setting;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.JimuApplication;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.blockly.Utils;
|
||||
import com.ubt.jimu.user.model.TeachModel;
|
||||
import com.ubt.jimu.user.view.adapter.TeachAdapter;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class TeachActivity extends BaseActivity {
|
||||
private String b;
|
||||
RecyclerView ryTeach;
|
||||
private String a = "jimu/help";
|
||||
private String c = "https://jimu.ubtrobot.com/%s/%s/%s";
|
||||
|
||||
private void initData() {
|
||||
this.b = JimuApplication.l().c();
|
||||
if (!this.b.equals("CN")) {
|
||||
this.b = "EN";
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
TeachModel teachModel = new TeachModel();
|
||||
teachModel.a(getString(R.string.setting_study_component));
|
||||
teachModel.b(String.format(this.c, this.a, this.b, "Component.html"));
|
||||
arrayList.add(teachModel);
|
||||
TeachModel teachModel2 = new TeachModel();
|
||||
teachModel2.a(getString(R.string.setting_study_assemble));
|
||||
teachModel2.b(String.format(this.c, this.a, this.b, "Build.html"));
|
||||
teachModel2.c("https://video.ubtrobot.com/jimu/videos/build.mp4");
|
||||
teachModel2.a(R.drawable.setting_study_play);
|
||||
arrayList.add(teachModel2);
|
||||
TeachModel teachModel3 = new TeachModel();
|
||||
teachModel3.b(String.format(this.c, this.a, this.b, "Connect.html"));
|
||||
teachModel3.a(getString(R.string.setting_study_connect));
|
||||
arrayList.add(teachModel3);
|
||||
TeachModel teachModel4 = new TeachModel();
|
||||
teachModel4.b(String.format(this.c, this.a, this.b, "Actions.html"));
|
||||
teachModel4.c("https://video.ubtrobot.com/jimu/videos/action.mp4");
|
||||
teachModel4.a(R.drawable.setting_study_play);
|
||||
teachModel4.a(getString(R.string.setting_study_actions));
|
||||
arrayList.add(teachModel4);
|
||||
TeachModel teachModel5 = new TeachModel();
|
||||
teachModel5.a(getString(R.string.setting_study_programming));
|
||||
teachModel5.b(Utils.getBlocklyHelpUrl());
|
||||
arrayList.add(teachModel5);
|
||||
TeachAdapter teachAdapter = new TeachAdapter(this, arrayList);
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, 0, false);
|
||||
this.ryTeach.setAdapter(teachAdapter);
|
||||
this.ryTeach.setLayoutManager(linearLayoutManager);
|
||||
}
|
||||
|
||||
private void initEvent() {
|
||||
}
|
||||
|
||||
public static void start(Context context) {
|
||||
context.startActivity(new Intent(context, (Class<?>) TeachActivity.class));
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_teach);
|
||||
ButterKnife.a(this);
|
||||
initData();
|
||||
initEvent();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user