更新UI
This commit is contained in:
@@ -2,7 +2,6 @@ package com.mogo.cloud;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
@@ -14,10 +13,6 @@ import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
*/
|
||||
public class PassPortActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
private EditText etAppKey;
|
||||
private EditText etDevicesId;
|
||||
private EditText etSignSecret;
|
||||
private Button btnRefreshToken;
|
||||
private TextView tvSn;
|
||||
private TextView tvToken;
|
||||
@@ -27,16 +22,13 @@ public class PassPortActivity extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_pass_port_actvity);
|
||||
|
||||
etAppKey = findViewById(R.id.etAppKey);
|
||||
etDevicesId = findViewById(R.id.etDevicesId);
|
||||
etSignSecret = findViewById(R.id.etSignSecret);
|
||||
btnRefreshToken = findViewById(R.id.btnRefreshToken);
|
||||
tvSn = findViewById(R.id.tvSn);
|
||||
tvToken = findViewById(R.id.tvToken);
|
||||
|
||||
btnRefreshToken.setOnClickListener(v -> {
|
||||
tvSn.setText(MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getSn());
|
||||
tvToken.setText(MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getToken());
|
||||
tvSn.setText("SN:" + MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getSn());
|
||||
tvToken.setText("Token:" + MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getToken());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -6,26 +6,6 @@
|
||||
android:orientation="vertical"
|
||||
tools:context=".PassPortActivity">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etAppKey"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="AppKey" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etDevicesId"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:hint="DevicesId" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etSignSecret"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:hint="SignSecret" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnRefreshToken"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
Reference in New Issue
Block a user