فهرست منبع

重构欢迎页

Signed-off-by: duanchangpeng <838560574@qq.com>
duanchangpeng 5 سال پیش
والد
کامیت
1794ece93d

+ 10 - 0
app/build.gradle

@@ -17,6 +17,9 @@ android {
         versionName "1.0"
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+        ndk {
+            abiFilters "armeabi-v7a", "arm64-v8a"
+        }
     }
 
     buildTypes {
@@ -25,6 +28,11 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
         }
     }
+    repositories {
+        flatDir {
+            dirs 'libs'
+        }
+    }
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
         targetCompatibility JavaVersion.VERSION_1_8
@@ -44,6 +52,8 @@ dependencies {
     implementation 'androidx.navigation:navigation-fragment-ktx:2.3.1'
     implementation 'androidx.navigation:navigation-ui-ktx:2.3.1'
     implementation 'androidx.gridlayout:gridlayout:1.0.0'
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
+    implementation(name: 'chileaf_wear_sdk_2.0.0', ext: 'aar')
     testImplementation 'junit:junit:4.+'
     androidTestImplementation 'androidx.test.ext:junit:1.1.2'
     androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

BIN
app/libs/chileaf_wear_sdk_2.0.0.aar


+ 102 - 0
app/src/main/java/com/example/watch/ui/activity/BaseActivity

@@ -0,0 +1,102 @@
+package com.example.watch.ui.activity
+
+import android.bluetooth.BluetoothAdapter
+import android.bluetooth.BluetoothManager
+import android.content.Intent
+import android.content.pm.PackageManager
+import android.os.Bundle
+import android.os.Handler
+import android.os.Looper
+import android.view.View
+import android.widget.ImageView
+import android.widget.TextView
+import android.widget.Toast
+import androidx.annotation.LayoutRes
+import androidx.appcompat.app.AppCompatActivity
+import com.android.chileaf.WearManager
+
+abstract class BaseActivity : AppCompatActivity() {
+    abstract val Timber: Any
+    protected var mManager: WearManager? = null
+    protected var mLoading: LoadingDialog? = null
+    protected var mHandler = Handler(Looper.getMainLooper())
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        setContentView(layoutId())
+        initialize()
+        initView()
+        initData(savedInstanceState)
+    }
+
+    @LayoutRes
+    protected abstract fun layoutId(): Int
+    protected abstract fun initView()
+    protected abstract fun initData(savedInstanceState: Bundle?)
+    private fun initialize() {
+        val ivBack = findViewById<ImageView>(R.id.iv_toolbar_back)
+        ivBack?.setOnClickListener { v: View? -> onBackPressed() }
+        mManager = WearManager.getInstance(this)
+        mManager.setDebug(BuildConfig.DEBUG)
+    }
+
+    protected fun setTitle(title: String?) {
+        val tvTitle = findViewById<TextView>(R.id.tv_toolbar_title)
+        if (tvTitle != null) {
+            tvTitle.text = title
+        }
+    }
+
+    protected fun launchDetail(type: Int, stamp: Long) {
+        val history = Intent(this, HistoryDetailActivity::class.java)
+        history.putExtra(HistoryDetailActivity.EXTRA_TYPE, type)
+        history.putExtra(HistoryDetailActivity.EXTRA_STAMP, stamp)
+        startActivity(history)
+    }
+
+    protected fun showLoading(message: String? = getString(R.string.loading)) {
+        mLoading = LoadingDialog.Builder(this)
+            .setMessage(message)
+            .build()
+        mLoading.show()
+    }
+
+    protected fun showLoadingAutoDismiss(delay: Long) {
+        showLoading()
+        mHandler.postDelayed({ hideLoading() }, delay)
+    }
+
+    protected fun hideLoading() {
+        if (mLoading != null && mLoading.isShowing()) {
+            mLoading.dismiss()
+        }
+    }
+
+    protected fun showToast(message: String?) {
+        runOnUiThread {
+            Toast.makeText(this, message, Toast.LENGTH_SHORT).show()
+        }
+    }
+
+    protected fun ensureBLESupported() {
+        if (!packageManager.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {
+            Toast.makeText(this, R.string.no_ble, Toast.LENGTH_LONG).show()
+            finish()
+        }
+    }
+
+    protected val isBLEEnabled: Boolean
+        protected get() {
+            val bluetoothManager = getSystemService(BLUETOOTH_SERVICE) as BluetoothManager
+            val adapter = bluetoothManager.adapter
+            return adapter != null && adapter.isEnabled
+        }
+
+    protected fun showBLEDialog() {
+        val enableIntent = Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE)
+        startActivity(enableIntent)
+    }
+}
+
+class LoadingDialog {
+
+}

+ 102 - 0
app/src/main/java/com/example/watch/ui/activity/BaseActivity.kt

@@ -0,0 +1,102 @@
+package com.example.watch.ui.activity
+
+//import android.bluetooth.BluetoothAdapter
+//import android.bluetooth.BluetoothManager
+//import android.content.Intent
+//import android.content.pm.PackageManager
+//import android.os.Bundle
+//import android.os.Handler
+//import android.os.Looper
+//import android.view.View
+//import android.widget.ImageView
+//import android.widget.TextView
+//import android.widget.Toast
+//import androidx.annotation.LayoutRes
+//import androidx.appcompat.app.AppCompatActivity
+//import com.android.chileaf.WearManager
+//
+//abstract class BaseActivity : AppCompatActivity() {
+//    abstract val Timber: Any
+//    protected var mManager: WearManager? = null
+//    protected var mLoading: LoadingDialog? = null
+//    protected var mHandler = Handler(Looper.getMainLooper())
+//    override fun onCreate(savedInstanceState: Bundle?) {
+//        super.onCreate(savedInstanceState)
+//        setContentView(layoutId())
+//        initialize()
+//        initView()
+//        initData(savedInstanceState)
+//    }
+//
+//    @LayoutRes
+//    protected abstract fun layoutId(): Int
+//    protected abstract fun initView()
+//    protected abstract fun initData(savedInstanceState: Bundle?)
+//    private fun initialize() {
+//        val ivBack = findViewById<ImageView>(R.id.iv_toolbar_back)
+//        ivBack?.setOnClickListener { v: View? -> onBackPressed() }
+//        mManager = WearManager.getInstance(this)
+//        mManager.setDebug(BuildConfig.DEBUG)
+//    }
+//
+//    protected fun setTitle(title: String?) {
+//        val tvTitle = findViewById<TextView>(R.id.tv_toolbar_title)
+//        if (tvTitle != null) {
+//            tvTitle.text = title
+//        }
+//    }
+//
+//    protected fun launchDetail(type: Int, stamp: Long) {
+//        val history = Intent(this, HistoryDetailActivity::class.java)
+//        history.putExtra(HistoryDetailActivity.EXTRA_TYPE, type)
+//        history.putExtra(HistoryDetailActivity.EXTRA_STAMP, stamp)
+//        startActivity(history)
+//    }
+//
+//    protected fun showLoading(message: String? = getString(R.string.loading)) {
+//        mLoading = LoadingDialog.Builder(this)
+//            .setMessage(message)
+//            .build()
+//        mLoading.show()
+//    }
+//
+//    protected fun showLoadingAutoDismiss(delay: Long) {
+//        showLoading()
+//        mHandler.postDelayed({ hideLoading() }, delay)
+//    }
+//
+//    protected fun hideLoading() {
+//        if (mLoading != null && mLoading.isShowing()) {
+//            mLoading.dismiss()
+//        }
+//    }
+//
+//    protected fun showToast(message: String?) {
+//        runOnUiThread {
+//            Toast.makeText(this, message, Toast.LENGTH_SHORT).show()
+//        }
+//    }
+//
+//    protected fun ensureBLESupported() {
+//        if (!packageManager.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {
+//            Toast.makeText(this, R.string.no_ble, Toast.LENGTH_LONG).show()
+//            finish()
+//        }
+//    }
+//
+//    protected val isBLEEnabled: Boolean
+//        protected get() {
+//            val bluetoothManager = getSystemService(BLUETOOTH_SERVICE) as BluetoothManager
+//            val adapter = bluetoothManager.adapter
+//            return adapter != null && adapter.isEnabled
+//        }
+//
+//    protected fun showBLEDialog() {
+//        val enableIntent = Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE)
+//        startActivity(enableIntent)
+//    }
+//}
+//
+//class LoadingDialog {
+//
+//}

+ 3 - 42
app/src/main/java/com/example/watch/ui/activity/MainActivity.kt

@@ -6,10 +6,12 @@ import android.os.Bundle
 import android.widget.Button
 import android.widget.Toast
 import androidx.appcompat.app.AppCompatActivity
+import com.android.chileaf.WearManager
 import com.example.watch.R
 
 
 class MainActivity : AppCompatActivity() {
+
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
 
@@ -20,40 +22,7 @@ class MainActivity : AppCompatActivity() {
         login()
 
 //        连接心率带
-        linkHeartBand()
-
-        //判断是否有权限
-//        if (ContextCompat.checkSelfPermission(this,
-//                        Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
-////请求权限
-//            ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},
-//                    MY_PERMISSIONS_REQUEST_ACCESS_COARSE_LOCATION);
-////判断是否需要 向用户解释,为什么要申请该权限
-//            if(ActivityCompat.shouldShowRequestPermissionRationale(this,
-//                            Manifest.permission.READ_CONTACTS)) {
-//                Toast.makeText(this, "shouldShowRequestPermissionRationale", Toast.LENGTH_SHORT).show();
-//            }
-//        }
-
-//        点击按钮Toast
-//        val button4 = findViewById<Button>(R.id.CONNECT)
-//        button4.setOnClickListener {
-//            Toast.makeText(this, "112233!", Toast.LENGTH_LONG).show();
-////            获取蓝牙权限
-//            val mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter()
-//            if (mBluetoothAdapter == null) {
-//                // Device does not support Bluetooth
-//                Toast.makeText(this, "当前设备不支持蓝牙!", Toast.LENGTH_LONG).show();
-//            } else {
-//                Toast.makeText(this, "当前设备不支持蓝牙!", Toast.LENGTH_LONG).show();
-//            }
-//        }
-
-
-//        跳转BaseActivity
-//        val intent = Intent(this, BaseActivity().javaClass)
-//        startActivity(intent)
-
+//        linkHeartBand()
 
     }
 
@@ -72,15 +41,7 @@ class MainActivity : AppCompatActivity() {
                 startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT)
             }else{
                 val mBluetoothLeScanner = mBluetoothAdapter.bluetoothLeScanner
-                Toast.makeText(this, "蓝牙何在?", Toast.LENGTH_SHORT).show()
-
-//                https://www.cnblogs.com/arci/p/8145145.html
 
-//                val bleScanCallback = BleScanCallback(bleScanResults)
-//                bleScanCallback.setContext(this.applicationContext)
-//                bleScanner.startScan(bleScanCallback)
-//                Toast.makeText(this.applicationContext, "蓝牙BLE扫描开始", Toast.LENGTH_SHORT).show()
-//                bleScanHandler.postDelayed(bleStopScan, this.BLE_SCAN_PERIOD)
                 }
         }
     }

+ 266 - 0
app/src/main/java/com/example/watch/ui/activity/MainActivity2.kt

@@ -0,0 +1,266 @@
+package com.example.watch.ui.activity
+//
+//import android.bluetooth.BluetoothDevice
+//import android.content.Context
+//import android.content.DialogInterface
+//import android.content.Intent
+//import android.content.pm.PackageInfo
+//import android.net.Uri
+//import android.os.Build
+//import android.os.Bundle
+//import android.provider.Settings
+//import android.provider.Settings.SettingNotFoundException
+//import android.view.View
+//import android.widget.Button
+//import android.widget.TextView
+//import androidx.appcompat.app.AlertDialog
+//import com.android.chileaf.fitness.callback.WearManagerCallbacks
+//import com.example.watch.R
+//import com.yanzhenjie.permission.AndPermission
+//import com.yanzhenjie.permission.runtime.Permission
+//import timber.log.Timber
+//
+//class MainActivity : BaseActivity(), ScannerFragment.OnDeviceSelectedListener,
+//    WearManagerCallbacks {
+//    private var mDeviceConnected = false
+//    private var mTvAppVersion: TextView? = null
+//    private var mTvDeviceName: TextView? = null
+//    private var mTvVersion: TextView? = null
+//    private var mTvRssi: TextView? = null
+//    private var mTvBattery: TextView? = null
+//    private var mTvSport: TextView? = null
+//    private var mTvHeartRate: TextView? = null
+//    private var mBtnConnect: Button? = null
+//    protected fun layoutId(): Int {
+//        return R.layout.activity_main
+//    }
+//
+//    protected fun initView() {
+//        mTvAppVersion = findViewById(R.id.tv_app_version)
+//        mTvDeviceName = findViewById(R.id.tv_device_name)
+//        mTvRssi = findViewById(R.id.tv_rssi)
+//        mTvVersion = findViewById(R.id.tv_version)
+//        mTvBattery = findViewById(R.id.tv_battery)
+//        mTvSport = findViewById(R.id.tv_sport)
+//        mTvHeartRate = findViewById(R.id.tv_hr)
+//        mBtnConnect = findViewById(R.id.btn_connect)
+//        mTvAppVersion!!.text = "App Version:$versionName"
+//
+//        //User information
+//        findViewById(R.id.btn_user_info).setOnClickListener({ view ->
+//            startActivity(
+//                Intent(
+//                    this,
+//                    UserInfoActivity::class.java
+//                )
+//            )
+//        })
+//        //Restoration
+//        findViewById(R.id.btn_restoration).setOnClickListener({ view -> mManager.Restoration() })
+//        //Get 7 days sport history
+//        findViewById(R.id.btn_history_sport).setOnClickListener({ view ->
+//            launchHistory(
+//                HistoryActivity.TYPE_SPORT
+//            )
+//        })
+//        //Heart rate history record
+//        findViewById(R.id.btn_history_heart).setOnClickListener({ view ->
+//            launchHistory(
+//                HistoryActivity.TYPE_HEART
+//            )
+//        })
+//        //Get the number of steps in the interval
+//        findViewById(R.id.btn_interval).setOnClickListener({ view -> launchHistory(HistoryActivity.TYPE_INTERVAL) })
+//        //Get historical data for a single key press
+//        findViewById(R.id.btn_single).setOnClickListener({ view -> launchHistory(HistoryActivity.TYPE_SINGLE) })
+//        mBtnConnect!!.setOnClickListener { view: View? ->
+//            if (isBLEEnabled()) {
+//                if (!mDeviceConnected) {
+//                    showDeviceScanningDialog()
+//                } else {
+//                    mManager.disConnect()
+//                }
+//            } else {
+//                showBLEDialog()
+//            }
+//        }
+//    }
+//
+//    protected fun initData(savedInstanceState: Bundle?) {
+//        ensureBLESupported()
+//        if (!isBLEEnabled()) {
+//            showBLEDialog()
+//        }
+//        mManager.setManagerCallbacks(this)
+//    }
+//
+//    private fun launchHistory(type: Int) {
+//        val history = Intent(this, HistoryActivity::class.java)
+//        history.putExtra(HistoryActivity.EXTRA_HISTORY, type)
+//        startActivity(history)
+//    }
+//
+//    //Scan device
+//    private fun showDeviceScanningDialog() {
+//        if (isLocationEnabled(this)) {
+//            AndPermission.with(this)
+//                .runtime()
+//                .permission(
+//                    Permission.ACCESS_FINE_LOCATION,
+//                    Permission.ACCESS_COARSE_LOCATION,
+//                    Permission.ACCESS_BACKGROUND_LOCATION
+//                )
+//                .onGranted({ permissions ->
+//                    runOnUiThread {
+//                        val dialog: ScannerFragment = ScannerFragment.getInstance()
+//                        dialog.show(getSupportFragmentManager(), "scan_fragment")
+//                    }
+//                })
+//                .onDenied({ permissions ->
+//                    if (AndPermission.hasAlwaysDeniedPermission(this@MainActivity, permissions)) {
+//                        AlertDialog.Builder(this)
+//                            .setTitle(getString(R.string.permission_required))
+//                            .setMessage(getString(R.string.permission_location_info))
+//                            .setPositiveButton("OK",
+//                                DialogInterface.OnClickListener { dialog: DialogInterface?, which: Int -> onPermissionSettings() })
+//                            .setNegativeButton("Cancel", null)
+//                            .show()
+//                    }
+//                })
+//                .start()
+//        } else {
+//            AlertDialog.Builder(this)
+//                .setTitle(getString(R.string.location_permission_title))
+//                .setMessage(getString(R.string.location_permission_info))
+//                .setPositiveButton("OK",
+//                    DialogInterface.OnClickListener { dialog: DialogInterface?, which: Int -> onEnableLocation() })
+//                .setNegativeButton("Cancel", null)
+//                .show()
+//        }
+//    }
+//
+//    fun onEnableLocation() {
+//        val intent = Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS)
+//        startActivity(intent)
+//    }
+//
+//    fun onPermissionSettings() {
+//        val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
+//        intent.data = Uri.fromParts("package", getPackageName(), null)
+//        startActivity(intent)
+//    }
+//
+//    private fun defaultUI() {
+//        mTvDeviceName!!.text = "Device name"
+//        mTvVersion!!.text = "Version:--"
+//        mTvRssi!!.text = "Rssi:--"
+//        mTvBattery!!.text = "Battery:--"
+//        mTvSport!!.text = "Sport:--"
+//        mTvHeartRate!!.text = "Heart Rate:--"
+//        mBtnConnect.setText(getString(R.string.action_connect))
+//    }
+//
+//    private val versionName: String?
+//        private get() {
+//            try {
+//                val packageInfo: PackageInfo =
+//                    getPackageManager().getPackageInfo(getPackageName(), 0)
+//                return packageInfo.versionName
+//            } catch (e: Exception) {
+//                e.printStackTrace()
+//            }
+//            return null
+//        }
+//
+//    fun onDeviceSelected(device: BluetoothDevice?, name: String?) {
+//        mManager.connect(device, false)
+//        mTvDeviceName.setText(getString(R.string.device_name, name))
+//    }
+//
+//    override fun onError(device: BluetoothDevice, message: String, errorCode: Int) {
+//        Timber.e("onError: ($errorCode)")
+//        showToast("$message ($errorCode)")
+//    }
+//
+//    override fun onDeviceNotSupported(device: BluetoothDevice) {
+//        showToast(getString(R.string.not_supported))
+//    }
+//
+//    override fun onSoftwareVersion(device: BluetoothDevice, software: String) {
+//        runOnUiThread { mTvVersion!!.text = "Version:$software" }
+//    }
+//
+//    override fun onRssiRead(device: BluetoothDevice, rssi: Int) {
+//        runOnUiThread { mTvRssi!!.text = "Rssi:" + rssi + "dBm" }
+//    }
+//
+//    override fun onBatteryLevelChanged(device: BluetoothDevice, batteryLevel: Int) {
+//        runOnUiThread { mTvBattery.setText(getString(R.string.battery, batteryLevel)) }
+//    }
+//
+//    override fun onHeartRateMeasurementReceived(
+//        device: BluetoothDevice,
+//        heartRate: Int,
+//        contactDetected: Boolean?,
+//        energyExpanded: Int?,
+//        rrIntervals: List<Int>?
+//    ) {
+//        runOnUiThread {
+//            mTvHeartRate.setText(getString(R.string.heart_rate, heartRate))
+//            if (rrIntervals != null) {
+//                Timber.e("rrIntervals:%s", rrIntervals.toString())
+//            }
+//        }
+//    }
+//
+//    override fun onSportReceived(device: BluetoothDevice, step: Int, distance: Int, calorie: Int) {
+//        runOnUiThread {
+//            mTvSport.setText(
+//                getString(
+//                    R.string.sport,
+//                    step,
+//                    distance / 100f,
+//                    calorie / 10f
+//                )
+//            )
+//        }
+//    }
+//
+//    override fun onDeviceConnected(device: BluetoothDevice) {
+//        mDeviceConnected = true
+//        runOnUiThread { mBtnConnect.setText(R.string.action_disconnect) }
+//    }
+//
+//    override fun onDeviceDisconnected(device: BluetoothDevice) {
+//        runOnUiThread { defaultUI() }
+//        mDeviceConnected = false
+//        mManager.close()
+//    }
+//
+//    fun onBackPressed() {
+//        mManager.disConnect()
+//        super.onBackPressed()
+//    }
+//
+//    companion object {
+//        fun isLocationEnabled(context: Context): Boolean {
+//            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+//                var locationMode = Settings.Secure.LOCATION_MODE_OFF
+//                try {
+//                    locationMode = Settings.Secure.getInt(
+//                        context.contentResolver,
+//                        Settings.Secure.LOCATION_MODE
+//                    )
+//                } catch (e: SettingNotFoundException) {
+//                    // do nothing
+//                }
+//                return locationMode != Settings.Secure.LOCATION_MODE_OFF
+//            }
+//            return true
+//        }
+//    }
+//}
+//
+//private fun TextView?.setText(string: Any): Any {
+//
+//}

BIN
app/src/main/res/drawable/enter_btn.png


BIN
app/src/main/res/drawable/welcome1.png


BIN
app/src/main/res/drawable/welcome2.png


BIN
app/src/main/res/drawable/welcome3.png


+ 13 - 19
app/src/main/res/layout/activity_viewpage.xml

@@ -2,11 +2,7 @@
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-    <TextView
-        android:id="@+id/textView2"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/app_version" />
+
     <ViewFlipper
         android:id="@+id/viewFlipper"
         android:layout_width="match_parent"
@@ -15,38 +11,36 @@
         <ImageView
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:src="@drawable/help1"
-            android:contentDescription="@string/app_version"
-            />
+            android:scaleType="fitXY"
+            android:src="@drawable/welcome1" />
 
         <ImageView
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:src="@drawable/help2"
-            android:contentDescription="@string/app_version"
+            android:scaleType="fitXY"
+            android:src="@drawable/welcome2"
             />
 
         <RelativeLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:background="@drawable/help3"
-            android:contentDescription="@string/app_version"
+            android:scaleType="fitXY"
+            android:background="@drawable/welcome3"
             >
 
             <Button
                 android:id="@+id/btn"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
+                android:layout_width="100dp"
+                android:layout_height="30dp"
                 android:layout_alignParentBottom="true"
                 android:layout_centerHorizontal="true"
-                android:layout_marginBottom="60dp"
                 android:gravity="center"
                 android:text="@string/enter_main"
+                android:background="@drawable/enter_btn"
+                android:textColor="#768E00"
                 android:contentDescription="@string/app_version"
+                android:layout_marginBottom="20dp"
                 android:textSize="22sp" />
-
-
-
         </RelativeLayout>
 
     </ViewFlipper>
@@ -56,7 +50,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="center_horizontal|bottom"
-        android:layout_marginBottom="30dp"
+        android:layout_marginBottom="60dp"
         android:orientation="horizontal" />
 
 </FrameLayout>