4个文件已添加
27个文件已修改
1 文件已重命名
| | |
| | | |
| | | import com.hdl.sdk.common.HDLSdk; |
| | | import com.hdl.sdk.connect.HDLLink; |
| | | import com.hdl.sdk.connect.cloud.HdlCloudApi; |
| | | import com.hdl.sdk.connect.cloud.broadcast.GlobalBroadcastManager; |
| | | import com.hdl.sdk.sourceos.OsManager; |
| | | |
| | |
| | | @Override |
| | | public void onCreate() { |
| | | super.onCreate(); |
| | | //初始化SDK |
| | | HDLSdk.getInstance().init(this); |
| | | //初始化SDK,如果不走从机入网,走app需要设置端口为8584 |
| | | HDLSdk.getInstance().init(this, 8584); |
| | | //如果走从机入网,不需要设置端口 |
| | | //HDLSdk.getInstance().init(this); |
| | | //控制SDK日志打印 |
| | | HDLSdk.getInstance().setLogEnabled(true); |
| | | |
| | |
| | | |
| | | //appkey:ryfElI3tVOT |
| | | //appsecret:AKIn7s1A2YnNvAZRtL8FQxzp0R2KUpIY |
| | | HDLLink.getInstance().initCloud(this, "ryfElI3tVOT", "AKIn7s1A2YnNvAZRtL8FQxzp0R2KUpIY"); |
| | | HDLLink.getInstance().initCloud(this, "ryfElI3tVOT", "AKIn7s1A2YnNvAZRtL8FQxzp0R2KUpIY", HdlCloudApi.BASE_BAHRAIN_URL); |
| | | |
| | | //注册全局广播,刷新token |
| | | GlobalBroadcastManager.registerGlobalBroadcast(this); |
| | |
| | | void searchGatewayBroadcast() { |
| | | tv.setText("搜索网关中..."); |
| | | responseTv.setText(""); |
| | | HDLLinkConfig.getInstance().getGatewayId(); |
| | | |
| | | String gatewayId = HDLLinkConfig.getInstance().getGatewayId(); |
| | | Log.d("panlili", "MainActivity.java:searchGatewayBroadcast----->gatewayId= " + gatewayId); |
| | | HDLLink.getInstance().searchGatewayBroadcast(new HDLAuthSocket.SearchGatewayCallBack() { |
| | | @Override |
| | | public void onError(HDLLinkException e) { |
| | |
| | | |
| | | import android.annotation.SuppressLint; |
| | | import android.os.Bundle; |
| | | import android.view.View; |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | |
| | | private static final String TAG = "SourceBindActivity"; |
| | | private QrCodeView qrcodeView; |
| | | private TextView responseTv; |
| | | private View view; |
| | | |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | |
| | | private void initView() { |
| | | qrcodeView = findViewById(R.id.qrcode_view); |
| | | responseTv = findViewById(R.id.response_tv); |
| | | view = findViewById(R.id.rl_back); |
| | | view.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | finish(); |
| | | } |
| | | }); |
| | | createBindQRCodeInfo(); |
| | | } |
| | | |
| | |
| | | private Button btnApiVersion, btnDeviceModel, btnOsVersion, btnRunningMemory, btnInnerStorage, btnFreeStorage, btnKernelVersion, btnBuilderNumber, btnFwVersion, btnShutDown, btnReboot, btnSystemConfiginfo, btnBrightness, btnRotation, notifyOpen, notifyClose, btnOpenBackLight, btnCloseBackLight, btnStatusBarShow, btnStatusBarHide, btnMicEnable, btnEthMacAddress, btnEthIpAddress, btnScardPath, btnInner, btnInstall, btnEthernetConnect, btnSubmitStaticIp, btnSleep, btnWakeUp, btnFilterPermission, btnOta, btnNetmask, btnGateway, btnDns, btnDisconnectEth, btnConnectEth, btnWwitchDhcp; |
| | | private TextView tvContent; |
| | | private EditText editIpAddress, editGateway, editNetmask, editDns1, editDns2, editBrightness, editRotation; |
| | | private View view; |
| | | |
| | | final private int LED_NOTIFICATION_ID = 100; |
| | | |
| | |
| | | btnConnectEth.setOnClickListener(this); |
| | | btnWwitchDhcp.setOnClickListener(this); |
| | | |
| | | view = findViewById(R.id.rl_back); |
| | | view.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | finish(); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | private void initKnob() { |
| | |
| | | import android.annotation.SuppressLint; |
| | | import android.os.Bundle; |
| | | import android.util.Log; |
| | | import android.view.View; |
| | | |
| | | import androidx.appcompat.app.AppCompatActivity; |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | |
| | | private List<FunctionBean> devicesList = new ArrayList<>(); |
| | | private DevicesListAdapter mDevicesListAdapter; |
| | | private RecyclerView mRecyclerView; |
| | | private View view; |
| | | |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | |
| | | mRecyclerView.setLayoutManager(new LinearLayoutManager(this)); |
| | | mDevicesListAdapter = new DevicesListAdapter(this, devicesList); |
| | | mRecyclerView.setAdapter(mDevicesListAdapter); |
| | | |
| | | view = findViewById(R.id.rl_back); |
| | | view.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | finish(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private void initData() { |
| | |
| | | android:layout_height="match_parent" |
| | | tools:context=".device.DevicesListActivity"> |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/toolbar" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="44dp" |
| | | android:background="@color/white"> |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/rl_back" |
| | | android:layout_width="47dp" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <ImageView |
| | | android:layout_width="10dp" |
| | | android:layout_height="17dp" |
| | | android:layout_centerVertical="true" |
| | | android:layout_marginStart="16dp" |
| | | android:src="@mipmap/activity_back" /> |
| | | </RelativeLayout> |
| | | </RelativeLayout> |
| | | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/device_list_rv" |
| | | android:layout_width="match_parent" |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | xmlns:tools="http://schemas.android.com/tools" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical" |
| | | tools:context=".SourceBindActivity"> |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/toolbar" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="44dp" |
| | | android:background="@color/white"> |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/rl_back" |
| | | android:layout_width="47dp" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <ImageView |
| | | android:layout_width="10dp" |
| | | android:layout_height="17dp" |
| | | android:layout_centerVertical="true" |
| | | android:layout_marginStart="16dp" |
| | | android:src="@mipmap/activity_back" /> |
| | | </RelativeLayout> |
| | | </RelativeLayout> |
| | | |
| | | <com.hdl.sdk.sourceos.qrcode.QrCodeView |
| | | android:id="@+id/qrcode_view" |
| | |
| | | android:id="@+id/response_tv" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:padding="3dp" |
| | | android:layout_marginTop="28dp" /> |
| | | android:layout_marginTop="28dp" |
| | | android:padding="3dp" /> |
| | | |
| | | </LinearLayout> |
| | |
| | | android:orientation="vertical"> |
| | | |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/toolbar" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="44dp" |
| | | android:background="@color/white"> |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/rl_back" |
| | | android:layout_width="47dp" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <ImageView |
| | | android:layout_width="10dp" |
| | | android:layout_height="17dp" |
| | | android:layout_centerVertical="true" |
| | | android:layout_marginStart="16dp" |
| | | android:src="@mipmap/activity_back" /> |
| | | </RelativeLayout> |
| | | </RelativeLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_content" |
| | | android:layout_width="match_parent" |
| | |
| | | defaultConfig { |
| | | minSdkVersion rootProject.minSdkVersion |
| | | targetSdkVersion rootProject.targetSdkVersion |
| | | versionCode 119 |
| | | versionName "1.1.9" |
| | | versionCode 123 |
| | | versionName "1.2.3" |
| | | } |
| | | buildTypes { |
| | | debug { |
| | |
| | | |
| | | embed 'com.hdl.hdlhttp:hxhttp:1.0.4' |
| | | |
| | | // api 'androidx.appcompat:appcompat:1.3.1' |
| | | // api 'com.google.android.material:material:1.4.0' |
| | | |
| | | embed 'com.squareup.okhttp3:okhttp:4.9.1' |
| | | embed 'com.squareup.okhttp3:logging-interceptor:4.9.1' |
| | | embed 'com.squareup.okio:okio:2.8.0' |
| | |
| | | embed 'com.trello.rxlifecycle4:rxlifecycle-android-lifecycle:4.0.2' |
| | | |
| | | embed 'org.reactivestreams:reactive-streams:1.0.3' |
| | | |
| | | // embed(name: 'hxhttp_1.0.4_230201',ext: 'aar') |
| | | |
| | | embed project(path: ':hdl-connect', configuration: 'default') |
| | | |
| | | } |
| | |
| | | defaultConfig { |
| | | minSdkVersion rootProject.minSdkVersion |
| | | targetSdkVersion rootProject.targetSdkVersion |
| | | versionCode 9 |
| | | versionName "1.2.1" |
| | | versionCode 11 |
| | | versionName "1.2.3" |
| | | |
| | | consumerProguardFiles "consumer-rules.pro" |
| | | } |
| | |
| | | |
| | | private Context context; |
| | | |
| | | private String version = "1.2.1"; |
| | | private String version = "1.2.2"; |
| | | |
| | | private int bindPort = 8585;//绑定的端口 |
| | | |
| | | /** |
| | | * 获取当前版本 |
| | |
| | | }); |
| | | } |
| | | |
| | | public void init(Context context, int bindPort) { |
| | | if (this.context != null) { |
| | | return; |
| | | } |
| | | this.context = context.getApplicationContext(); |
| | | this.bindPort = bindPort; |
| | | HDLAuthSocket.getInstance().init(); |
| | | HDLSocket.getInstance().broadcastRequest(); |
| | | LogUtils.i("HDLSdk Version:" + getVersion()); |
| | | |
| | | //订阅所有的主题 |
| | | HDLLink.getInstance().registerAllTopicsListener(new EventListener() { |
| | | @Override |
| | | public void onMessage(Object msg) { |
| | | if (msg == null || !(msg instanceof LinkResponse)) { |
| | | return; |
| | | } |
| | | AllTopicManagerUtils.manager((LinkResponse) msg); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | public int getBindPort() { |
| | | return bindPort; |
| | | } |
| | | |
| | | public void setBindPort(int bindPort) { |
| | | this.bindPort = bindPort; |
| | | } |
| | | |
| | | public Context getContext() { |
| | | return context; |
| | |
| | | } |
| | | |
| | | String mac_Oid_GatewayId = topics[2]; |
| | | Log.d("panlili", "AllTopicManagerUtils.java:manager----->topic= " + topic); |
| | | |
| | | if (!isLocalDevice(mac_Oid_GatewayId)) { |
| | | LogUtils.i("不是当前设备的网关Id,Id是" + mac_Oid_GatewayId); |
| | |
| | | /** |
| | | * 初始化云端 |
| | | */ |
| | | public void initCloud(Context context, String appKey, String appSecret) { |
| | | public void initCloud(Context context, String appKey, String appSecret, String url) { |
| | | |
| | | HDLCloudConfig.getInstance().init(context, appKey, appSecret, HdlCloudApi.BASE_CHINA_URL); |
| | | HDLCloudConfig.getInstance().init(context, appKey, appSecret, url); |
| | | |
| | | HxHttpConfig.getInstance().ignoreSSL(); |
| | | |
| | |
| | | public static final String BASE_CHINA_URL = "https://china-gateway.hdlcontrol.com"; |
| | | |
| | | //测试环境 |
| | | // public static final String BASE_CHINA_URL = "https://test-gz.hdlcontrol.com"; |
| | | public static final String BASE_TEST_URL = "https://test-gz.hdlcontrol.com"; |
| | | |
| | | //国外环境 |
| | | public static final String BASE_BAHRAIN_URL = "https://bahrain-gateway.hdlcontrol.com"; |
| | | |
| | | //登陆刷新token |
| | | public static final String LOGIN = "/smart-footstone/member/oauth/login"; |
| | |
| | | |
| | | public static Disposable applyDeviceSecret(String supplier, String mac, String spk, CallBackListener callBack) { |
| | | return HxHttp.builder() |
| | | .url(HdlCloudApi.BASE_CHINA_URL + HdlCloudApi.APPLY_DEVICE_SECRET) |
| | | .url(HdlCloudApi.APPLY_DEVICE_SECRET) |
| | | .params("supplier", supplier) |
| | | .params("mac", mac) |
| | | .params("spk", spk) |
| | |
| | | */ |
| | | public static Disposable checkAppVersion(String versionCode, String appCode, CheckAppVersionListener listener) { |
| | | return HxHttp.builder() |
| | | .url(HdlCloudApi.BASE_CHINA_URL + HdlCloudApi.CHECK_APP_VERSION_URL) |
| | | .url(HdlCloudApi.CHECK_APP_VERSION_URL) |
| | | .params("version", versionCode) |
| | | .params("appCode", appCode) |
| | | .params("releaseSystem", "Android") |
| | |
| | | * udp默认端口 |
| | | */ |
| | | private static final int UDP_PORT = 8585; |
| | | private static int BIND_UDP_PORT = 8584; |
| | | /** |
| | | * 因为考虑到使用一个端口,要支持接收多网关的数据,所以只允许使用一个 |
| | | */ |
| | |
| | | private synchronized UdpSocketBoot getUdpBoot() { |
| | | try { |
| | | if (udpSocketBoot == null) { |
| | | udpSocketBoot = UdpClient.init(UDP_PORT, getUdpOptions()); |
| | | //区分是8584还是8585 |
| | | BIND_UDP_PORT = HDLSdk.getInstance().getBindPort(); |
| | | udpSocketBoot = UdpClient.init(BIND_UDP_PORT, getUdpOptions()); |
| | | udpSocketBoot.bind(); |
| | | |
| | | LogUtils.i("初始化Socket udp"); |
| | |
| | | package com.hdl.sdk.socket.client; |
| | | |
| | | |
| | | import android.content.Context; |
| | | import android.net.wifi.WifiManager; |
| | | import android.text.TextUtils; |
| | | |
| | | import com.hdl.sdk.common.HDLSdk; |
| | | import com.hdl.sdk.common.utils.IpUtils; |
| | | import com.hdl.sdk.common.utils.LogUtils; |
| | | import com.hdl.sdk.socket.SocketPool; |
| | |
| | | */ |
| | | private DatagramPacket receivePacket; |
| | | |
| | | private WifiManager.MulticastLock lock; |
| | | /** |
| | | * 缓冲区大小 |
| | | */ |
| | |
| | | this.socketOptions = socketOptions; |
| | | byte[] receiveByte = new byte[BUFFER]; |
| | | receivePacket = new DatagramPacket(receiveByte, receiveByte.length); |
| | | |
| | | WifiManager manager = (WifiManager) HDLSdk.getInstance().getContext().getApplicationContext() |
| | | .getSystemService(Context.WIFI_SERVICE); |
| | | this.lock = manager.createMulticastLock("UDPwifi"); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | @Override |
| | | public void bind() throws Exception { |
| | | public synchronized void bind() throws Exception { |
| | | try { |
| | | //已经绑定过就不用再绑定 |
| | | if (null != mSocket) { |
| | | return; |
| | | } |
| | | lock.acquire(); |
| | | if (TextUtils.isEmpty(ipAddress)) { |
| | | mSocket = SocketPool.getInstance().getUdpSocket(new InetSocketAddress(port)); |
| | | } else { |
| | |
| | | |
| | | implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.6' |
| | | // implementation 'com.google.code.gson:gson:2.8.8' |
| | | implementation files('libs\\com.hdl.sdk-v1.2.1.aar') |
| | | implementation files('libs\\com.hdl.sdk-v1.2.2.aar') |
| | | |
| | | implementation 'com.squareup.okhttp3:okhttp:4.9.1' |
| | | implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' |
| | | implementation 'com.squareup.okio:okio:2.8.0' |
| | | //retrofit |
| | | implementation 'com.squareup.retrofit2:retrofit:2.9.0' |
| | | implementation 'com.squareup.retrofit2:converter-scalars:2.9.0' |
| | | implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0' |
| | | implementation 'io.reactivex.rxjava3:rxandroid:3.0.0' |
| | | implementation 'io.reactivex.rxjava3:rxjava:3.1.1' |
| | | implementation 'com.google.code.gson:gson:2.8.8' |
| | | |
| | | implementation 'com.trello.rxlifecycle4:rxlifecycle:4.0.2' |
| | | implementation 'com.trello.rxlifecycle4:rxlifecycle-android:4.0.2' |
| | | implementation 'com.trello.rxlifecycle4:rxlifecycle-android-lifecycle:4.0.2' |
| | | |
| | | implementation 'org.reactivestreams:reactive-streams:1.0.3' |
| | | |
| | | //二维码 |
| | | implementation 'com.google.zxing:core:3.4.1' |
| | |
| | | @Override
|
| | | public void onCreate() {
|
| | | super.onCreate();
|
| | | //初始化SDK
|
| | | HDLSdk.getInstance().init(this);
|
| | | //初始化SDK,如果不走从机入网,走app需要设置端口为8584
|
| | | HDLSdk.getInstance().init(this, 8584);
|
| | | //如果走从机入网,不需要设置端口
|
| | | //HDLSdk.getInstance().init(this);
|
| | | //控制SDK日志打印
|
| | | HDLSdk.getInstance().setLogEnabled(true);
|
| | |
|
| | |
| | | void searchGatewayBroadcast() { |
| | | tv.setText("搜索网关中..."); |
| | | responseTv.setText(""); |
| | | HDLLinkConfig.getInstance().getGatewayId(); |
| | | |
| | | String gatewayId = HDLLinkConfig.getInstance().getGatewayId(); |
| | | Log.d("panlili", "MainActivity.java:searchGatewayBroadcast----->gatewayId= " + gatewayId); |
| | | HDLLink.getInstance().searchGatewayBroadcast(new HDLAuthSocket.SearchGatewayCallBack() { |
| | | @Override |
| | | public void onError(HDLLinkException e) { |
| | |
| | | |
| | | import android.annotation.SuppressLint; |
| | | import android.os.Bundle; |
| | | import android.view.View; |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | |
| | | private static final String TAG = "SourceBindActivity"; |
| | | private QrCodeView qrcodeView; |
| | | private TextView responseTv; |
| | | private View view; |
| | | |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | |
| | | private void initView() { |
| | | qrcodeView = findViewById(R.id.qrcode_view); |
| | | responseTv = findViewById(R.id.response_tv); |
| | | view = findViewById(R.id.rl_back); |
| | | view.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | finish(); |
| | | } |
| | | }); |
| | | createBindQRCodeInfo(); |
| | | } |
| | | |
| | |
| | | private Button btnApiVersion, btnDeviceModel, btnOsVersion, btnRunningMemory, btnInnerStorage, btnFreeStorage, btnKernelVersion, btnBuilderNumber, btnFwVersion, btnShutDown, btnReboot, btnSystemConfiginfo, btnBrightness, btnRotation, notifyOpen, notifyClose, btnOpenBackLight, btnCloseBackLight, btnStatusBarShow, btnStatusBarHide, btnMicEnable, btnEthMacAddress, btnEthIpAddress, btnScardPath, btnInner, btnInstall, btnEthernetConnect, btnSubmitStaticIp, btnSleep, btnWakeUp, btnFilterPermission, btnOta, btnNetmask, btnGateway, btnDns, btnDisconnectEth, btnConnectEth, btnWwitchDhcp; |
| | | private TextView tvContent; |
| | | private EditText editIpAddress, editGateway, editNetmask, editDns1, editDns2, editBrightness, editRotation; |
| | | private View view; |
| | | |
| | | final private int LED_NOTIFICATION_ID = 100; |
| | | |
| | |
| | | btnConnectEth.setOnClickListener(this); |
| | | btnWwitchDhcp.setOnClickListener(this); |
| | | |
| | | view = findViewById(R.id.rl_back); |
| | | view.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | finish(); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | private void initKnob() { |
| | |
| | | import android.annotation.SuppressLint; |
| | | import android.os.Bundle; |
| | | import android.util.Log; |
| | | import android.view.View; |
| | | |
| | | import androidx.appcompat.app.AppCompatActivity; |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | |
| | | private List<FunctionBean> devicesList = new ArrayList<>(); |
| | | private DevicesListAdapter mDevicesListAdapter; |
| | | private RecyclerView mRecyclerView; |
| | | private View view; |
| | | |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | |
| | | mRecyclerView.setLayoutManager(new LinearLayoutManager(this)); |
| | | mDevicesListAdapter = new DevicesListAdapter(this, devicesList); |
| | | mRecyclerView.setAdapter(mDevicesListAdapter); |
| | | |
| | | view = findViewById(R.id.rl_back); |
| | | view.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | finish(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private void initData() { |
| | |
| | | android:layout_height="match_parent" |
| | | tools:context=".device.DevicesListActivity"> |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/toolbar" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="44dp" |
| | | android:background="@color/white"> |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/rl_back" |
| | | android:layout_width="47dp" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <ImageView |
| | | android:layout_width="10dp" |
| | | android:layout_height="17dp" |
| | | android:layout_centerVertical="true" |
| | | android:layout_marginStart="16dp" |
| | | android:src="@mipmap/activity_back" /> |
| | | </RelativeLayout> |
| | | </RelativeLayout> |
| | | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/device_list_rv" |
| | | android:layout_width="match_parent" |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | xmlns:tools="http://schemas.android.com/tools" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical" |
| | | tools:context=".SourceBindActivity"> |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/toolbar" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="44dp" |
| | | android:background="@color/white"> |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/rl_back" |
| | | android:layout_width="47dp" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <ImageView |
| | | android:layout_width="10dp" |
| | | android:layout_height="17dp" |
| | | android:layout_centerVertical="true" |
| | | android:layout_marginStart="16dp" |
| | | android:src="@mipmap/activity_back" /> |
| | | </RelativeLayout> |
| | | </RelativeLayout> |
| | | |
| | | <com.hdl.sdk.sourceos.qrcode.QrCodeView |
| | | android:id="@+id/qrcode_view" |
| | |
| | | android:id="@+id/response_tv" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:padding="3dp" |
| | | android:layout_marginTop="28dp" /> |
| | | android:layout_marginTop="28dp" |
| | | android:padding="3dp" /> |
| | | |
| | | </LinearLayout> |
| | |
| | | android:orientation="vertical"> |
| | | |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/toolbar" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="44dp" |
| | | android:background="@color/white"> |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/rl_back" |
| | | android:layout_width="47dp" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <ImageView |
| | | android:layout_width="10dp" |
| | | android:layout_height="17dp" |
| | | android:layout_centerVertical="true" |
| | | android:layout_marginStart="16dp" |
| | | android:src="@mipmap/activity_back" /> |
| | | </RelativeLayout> |
| | | </RelativeLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_content" |
| | | android:layout_width="match_parent" |
| | |
| | | <resources> |
| | | <string name="app_name">HDLSDK Demo</string> |
| | | <string name="app_name">HDLSDK</string> |
| | | <string name="http_unknown">未知网络错误,请稍后再试</string> |
| | | </resources> |