a_setting_table.xml 13.9 KB
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2016 wugian
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="@drawable/ic_general_bg"
              android:orientation="horizontal">

    <ScrollView
            android:scrollbars="none"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
        <TableLayout android:orientation="vertical"
                     android:gravity="center|top"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content">
            <TableRow android:layout_width="match_parent"
                      android:layout_height="wrap_content">

                <TextView android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          android:layout_marginTop="20dp"
                          android:gravity="center|left"
                          android:layout_marginLeft="40dp"
                          android:drawableLeft="@drawable/ic_arrow"
                          android:id="@+id/type_tv"
                          android:text="@string/setting"
                          android:textSize="40sp"/>
            </TableRow>


            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:layout_height="wrap_content">
                <TextView style="@style/GeneralTextViewTheme"
                          android:layout_marginRight="15dp"
                          android:text="@string/ip_promote"/>
                <EditText style="@style/GeneralTextViewTheme"
                          android:id="@+id/ip_et"
                          android:hint="@string/ip_promote"
                          android:textColor="@color/black"
                          android:layout_width="400dp"/>

            </TableRow>

            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:id="@+id/name_row"
                      android:layout_height="wrap_content">
                <TextView style="@style/GeneralTextViewTheme"
                          android:layout_marginRight="15dp"
                          android:text="@string/usr_promote"/>
                <EditText style="@style/GeneralTextViewTheme"
                          android:textColor="@color/black"
                          android:layout_width="400dp"
                          android:hint="@string/usr_promote"
                          android:id="@+id/usr_et"/>

            </TableRow>

            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:id="@+id/pwd_row"
                      android:layout_height="wrap_content">
                <TextView style="@style/GeneralTextViewTheme"
                          android:layout_marginRight="15dp"
                          android:text="@string/pwd_promote"/>
                <EditText style="@style/GeneralTextViewTheme"
                          android:textColor="@color/black"
                          android:layout_width="400dp"
                          android:hint="@string/pwd_promote"
                          android:id="@+id/pwd_et"/>

            </TableRow>

            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:layout_height="wrap_content">
                <TextView style="@style/GeneralTextViewTheme"
                          android:layout_marginRight="15dp"
                          android:text="@string/folder_promote"/>
                <EditText style="@style/GeneralTextViewTheme"
                          android:textColor="@color/black"
                          android:layout_width="400dp"
                          android:hint="@string/folder_promote"
                          android:id="@+id/folder_et"/>

            </TableRow>

            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:layout_height="wrap_content">

                <Button style="@style/GeneralTextViewTheme"
                        android:id="@+id/checkAppUpdate_btn"
                        android:textColor="@color/black"
                        android:onClick="checkAppUpdate"
                        android:text="@string/check_for_update"/>

                <Button style="@style/GeneralTextViewTheme"
                        android:text="@string/testing_connection"
                        android:textColor="@color/black"
                        android:id="@+id/testConnect_btn"
                        android:onClick="testConnecting"
                        android:layout_width="400dp"/>
            </TableRow>

            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:layout_height="wrap_content">

                <Button style="@style/GeneralTextViewTheme"
                        android:onClick="copyOutDb"
                        android:id="@+id/copyOut_btn"
                        android:textColor="@color/black"
                        android:text="@string/cp_db"/>
                <Button style="@style/GeneralTextViewTheme"
                        android:text="@string/pull_remote_db_data"
                        android:textColor="@color/black"
                        android:id="@+id/copyIn_btn"
                        android:onClick="copyInDb"/>

            </TableRow>

            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:layout_height="wrap_content">

                <Button style="@style/GeneralTextViewTheme"
                        android:onClick="choseSource"
                        android:id="@+id/choseSource_btn"
                        android:textColor="@color/black"
                        android:visibility="visible"
                        android:text="@string/chose_source"/>

                <Button style="@style/GeneralTextViewTheme"
                        android:layout_width="300dp"
                        android:layout_height="48dp"
                        android:textColor="@color/black"
                        android:maxLines="1"
                        android:onClick="updateDb"
                        android:id="@+id/updateDb_btn"
                        android:visibility="visible"
                        android:text="@string/update_db"/>
            </TableRow>

            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:layout_height="wrap_content">

                <Button style="@style/GeneralTextViewTheme"
                        android:id="@+id/addNewClazzBtn"
                        android:onClick="addNewClazz"
                        android:visibility="visible"
                        android:textColor="@color/black"
                        android:text="@string/update_type1"/>

                <Button style="@style/GeneralTextViewTheme"
                        android:onClick="update1905Movies"
                        android:visibility="visible"
                        android:id="@+id/update1905_btn"
                        android:textColor="@color/black"
                        android:text="@string/update_1905_source"/>
            </TableRow>

            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:layout_height="wrap_content">

                <Button style="@style/GeneralTextViewTheme"
                        android:onClick="setLights"
                        android:visibility="visible"
                        android:textColor="@color/black"
                        android:text="@string/set_sm_light"/>

                <Button style="@style/GeneralTextViewTheme"
                        android:onClick="update1905Movies"
                        android:visibility="invisible"
                        android:textColor="@color/black"
                        android:text="@string/update_1905_source"/>
            </TableRow>
            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:visibility="gone"
                      android:layout_height="wrap_content">

                <TextView style="@style/GeneralTextViewTheme"
                          android:onClick="addNewClazz"
                          android:visibility="visible"
                          android:layout_gravity="center"
                          android:textColor="@color/white"
                          android:text="@string/pre_ads_times"/>

                <Spinner
                        android:id="@+id/choseAdsTime_sp"
                        android:gravity="center"
                        android:paddingLeft="20dp"
                        android:paddingRight="40dp"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                />
            </TableRow>

            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:layout_height="wrap_content">

                <TextView style="@style/GeneralTextViewTheme"
                          android:onClick="getMoviesFromDoubanAndSave"
                          android:layout_marginRight="15dp"
                          android:text="@string/seri_num"/>

                <TextView style="@style/GeneralTextViewTheme"
                          android:id="@+id/seriNum_tv"
                />
            </TableRow>

            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:gravity="center|left"
                      android:layout_height="wrap_content">

                <TextView style="@style/GeneralTextViewTheme"
                          android:layout_marginRight="15dp"
                          android:text="@string/start_open"/>
                <CheckBox android:layout_width="wrap_content"
                          android:id="@+id/startOpen"
                          android:layout_height="wrap_content"/>


            </TableRow>

            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:gravity="center|left"
                      android:id="@+id/ssid_row"
                      android:layout_height="wrap_content">

                <TextView style="@style/GeneralTextViewTheme"
                          android:layout_marginRight="15dp"
                          android:text="@string/open_wifi_ap"/>
                <CheckBox android:layout_width="match_parent"
                          android:id="@+id/openAp"
                          android:layout_height="wrap_content"/>

            </TableRow>

            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:gravity="center|left"
                      android:id="@+id/ssid1_row"
                      android:layout_height="wrap_content">

                <TextView style="@style/GeneralTextViewTheme"
                          android:layout_marginRight="15dp"
                          android:text="@string/ssid"/>
                <EditText android:layout_width="match_parent"
                          android:hint="@string/ssid_hint"
                          android:id="@+id/ssid"
                          android:layout_height="wrap_content"/>

            </TableRow><!-- android:text="@string/ssid_hint"-->

            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:gravity="center|left"
                      android:id="@+id/ssid2_row"
                      android:layout_height="wrap_content">

                <TextView style="@style/GeneralTextViewTheme"
                          android:layout_marginRight="15dp"
                          android:text="@string/pwd"/>
                <EditText android:layout_width="match_parent"
                          android:id="@+id/pwd"
                          android:hint="@string/pwd_hint"

                          android:layout_height="wrap_content"/>

            </TableRow><!--android:text="@string/pwd_hint1"-->

            <TableRow android:layout_width="match_parent"
                      android:layout_marginLeft="40dp"
                      android:gravity="center|left"
                      android:layout_height="wrap_content">

                <TextView style="@style/GeneralTextViewTheme"
                          android:layout_marginRight="15dp"
                          android:text="@string/app_list"/>
                <com.xgimi.gimicinema.view.MetroGridView
                        android:layout_width="match_parent"
                        android:id="@+id/appList"
                        android:numColumns="1"
                        android:layout_height="wrap_content"/>

            </TableRow>
        </TableLayout>
    </ScrollView>
</LinearLayout>