diff options
Diffstat (limited to 'app/res')
52 files changed, 662 insertions, 223 deletions
diff --git a/app/res/drawable-hdpi/ic_launcher.png b/app/res/drawable-hdpi/ic_launcher.png Binary files differdeleted file mode 100644 index 50093ae..0000000 --- a/app/res/drawable-hdpi/ic_launcher.png +++ /dev/null diff --git a/app/res/drawable-hdpi/ic_launcher2.png b/app/res/drawable-hdpi/ic_launcher2.png Binary files differdeleted file mode 100644 index 78d26b2..0000000 --- a/app/res/drawable-hdpi/ic_launcher2.png +++ /dev/null diff --git a/app/res/drawable-hdpi/ic_launcher_tris.png b/app/res/drawable-hdpi/ic_launcher_tris.png Binary files differdeleted file mode 100644 index ddaa253..0000000 --- a/app/res/drawable-hdpi/ic_launcher_tris.png +++ /dev/null diff --git a/app/res/drawable-hdpi/ic_stat_discon.png b/app/res/drawable-hdpi/ic_stat_discon.png Binary files differnew file mode 100644 index 0000000..f92319a --- /dev/null +++ b/app/res/drawable-hdpi/ic_stat_discon.png diff --git a/app/res/drawable-hdpi/ic_stat_repwifi.png b/app/res/drawable-hdpi/ic_stat_repwifi.png Binary files differnew file mode 100644 index 0000000..1de8885 --- /dev/null +++ b/app/res/drawable-hdpi/ic_stat_repwifi.png diff --git a/app/res/drawable-mdpi/ic_launcher.png b/app/res/drawable-mdpi/ic_launcher.png Binary files differdeleted file mode 100644 index e2fe865..0000000 --- a/app/res/drawable-mdpi/ic_launcher.png +++ /dev/null diff --git a/app/res/drawable-mdpi/ic_launcher2.png b/app/res/drawable-mdpi/ic_launcher2.png Binary files differdeleted file mode 100644 index 4a61a75..0000000 --- a/app/res/drawable-mdpi/ic_launcher2.png +++ /dev/null diff --git a/app/res/drawable-mdpi/ic_launcher_tris.png b/app/res/drawable-mdpi/ic_launcher_tris.png Binary files differdeleted file mode 100644 index 935010c..0000000 --- a/app/res/drawable-mdpi/ic_launcher_tris.png +++ /dev/null diff --git a/app/res/drawable-mdpi/ic_stat_discon.png b/app/res/drawable-mdpi/ic_stat_discon.png Binary files differnew file mode 100644 index 0000000..a8c3bf6 --- /dev/null +++ b/app/res/drawable-mdpi/ic_stat_discon.png diff --git a/app/res/drawable-mdpi/ic_stat_repwifi.png b/app/res/drawable-mdpi/ic_stat_repwifi.png Binary files differnew file mode 100644 index 0000000..9ecece8 --- /dev/null +++ b/app/res/drawable-mdpi/ic_stat_repwifi.png diff --git a/app/res/drawable-xhdpi/ic_launcher.png b/app/res/drawable-xhdpi/ic_launcher.png Binary files differdeleted file mode 100644 index 71ed985..0000000 --- a/app/res/drawable-xhdpi/ic_launcher.png +++ /dev/null diff --git a/app/res/drawable-xhdpi/ic_launcher2.png b/app/res/drawable-xhdpi/ic_launcher2.png Binary files differdeleted file mode 100644 index 01fc7ef..0000000 --- a/app/res/drawable-xhdpi/ic_launcher2.png +++ /dev/null diff --git a/app/res/drawable-xhdpi/ic_launcher_tris.png b/app/res/drawable-xhdpi/ic_launcher_tris.png Binary files differdeleted file mode 100644 index 5992ef4..0000000 --- a/app/res/drawable-xhdpi/ic_launcher_tris.png +++ /dev/null diff --git a/app/res/drawable-xhdpi/ic_stat_discon.png b/app/res/drawable-xhdpi/ic_stat_discon.png Binary files differnew file mode 100644 index 0000000..2500cd6 --- /dev/null +++ b/app/res/drawable-xhdpi/ic_stat_discon.png diff --git a/app/res/drawable-xhdpi/ic_stat_repwifi.png b/app/res/drawable-xhdpi/ic_stat_repwifi.png Binary files differnew file mode 100644 index 0000000..93f6876 --- /dev/null +++ b/app/res/drawable-xhdpi/ic_stat_repwifi.png diff --git a/app/res/drawable-xxhdpi/ic_launcher.png b/app/res/drawable-xxhdpi/ic_launcher.png Binary files differdeleted file mode 100644 index 5545989..0000000 --- a/app/res/drawable-xxhdpi/ic_launcher.png +++ /dev/null diff --git a/app/res/drawable-xxhdpi/ic_launcher2.png b/app/res/drawable-xxhdpi/ic_launcher2.png Binary files differdeleted file mode 100644 index aaf68c6..0000000 --- a/app/res/drawable-xxhdpi/ic_launcher2.png +++ /dev/null diff --git a/app/res/drawable-xxhdpi/ic_launcher_tris.png b/app/res/drawable-xxhdpi/ic_launcher_tris.png Binary files differdeleted file mode 100644 index 0bf88f3..0000000 --- a/app/res/drawable-xxhdpi/ic_launcher_tris.png +++ /dev/null diff --git a/app/res/drawable/button_bg.xml b/app/res/drawable/button_bg.xml new file mode 100644 index 0000000..5523e98 --- /dev/null +++ b/app/res/drawable/button_bg.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle" > + + <solid android:color="@color/ThemeDark" /> + + <corners android:radius="3dp" /> + + <stroke + android:width="2dp" + android:color="@color/ThemeLight" /> + +</shape>
\ No newline at end of file diff --git a/app/res/drawable/button_bg_pressed.xml b/app/res/drawable/button_bg_pressed.xml new file mode 100644 index 0000000..6e4e953 --- /dev/null +++ b/app/res/drawable/button_bg_pressed.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle" > + + <solid android:color="@color/ThemeLight" /> + + <corners android:radius="3dp" /> + + <stroke + android:width="2dp" + android:color="@color/ThemeDark" /> + +</shape>
\ No newline at end of file diff --git a/app/res/drawable/checkmark.xml b/app/res/drawable/checkmark.xml new file mode 100644 index 0000000..9bcf74e --- /dev/null +++ b/app/res/drawable/checkmark.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > + <item android:drawable="@drawable/checkmark_frame"> + + </item> + <item + android:height="3dp" + android:top="11dp" + android:left="7dp" + android:width="10dp"> + <rotate android:fromDegrees="45" > + <shape android:shape="rectangle" > + <solid android:color="@color/ThemeLight" /> + </shape> + </rotate> + </item> + <item + android:height="3dp" + android:left="12dp" + android:top="10dp" + android:width="15dp"> + <rotate android:fromDegrees="-50" > + <shape android:shape="rectangle" > + <solid android:color="@color/ThemeLight" /> + </shape> + </rotate> + </item> + +</layer-list>
\ No newline at end of file diff --git a/app/res/drawable/checkmark_frame.xml b/app/res/drawable/checkmark_frame.xml new file mode 100644 index 0000000..1d5cb45 --- /dev/null +++ b/app/res/drawable/checkmark_frame.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > + + <item + android:height="20dp" + android:width="20dp" + android:top="5dp" + android:left="5dp"> + <shape android:shape="rectangle" > + <solid android:color="@android:color/transparent" /> + + <stroke + android:width="2dp" + android:color="@color/ThemeDark" /> + </shape> + </item> + <item + android:height="30dp" + android:width="30dp"> + <shape android:shape="rectangle" > + <solid android:color="@android:color/transparent" /> + </shape> + </item> + +</layer-list>
\ No newline at end of file diff --git a/app/res/drawable/divider_shape.xml b/app/res/drawable/divider_shape.xml new file mode 100644 index 0000000..23d0a16 --- /dev/null +++ b/app/res/drawable/divider_shape.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle" > + + <solid android:color="@color/ThemeDark" /> + + <corners android:radius="2dp" /> + + <stroke + android:width="1dp" + android:color="@color/ThemeLight" /> + +</shape>
\ No newline at end of file diff --git a/app/res/drawable/radio_button.xml b/app/res/drawable/radio_button.xml new file mode 100644 index 0000000..ec611f0 --- /dev/null +++ b/app/res/drawable/radio_button.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > + <item android:drawable="@drawable/radio_frame"> + + </item> + <item + android:height="13dp" + android:width="13dp" + android:left="6dp" + android:top="6dp"> + <shape android:shape="oval" > + <solid android:color="@color/ThemeDark" /> + </shape> + </item> +</layer-list>
\ No newline at end of file diff --git a/app/res/drawable/radio_frame.xml b/app/res/drawable/radio_frame.xml new file mode 100644 index 0000000..de69091 --- /dev/null +++ b/app/res/drawable/radio_frame.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > + <item + android:height="25dp" + android:width="25dp"> + <shape android:shape="oval" > + <gradient + android:angle="45" + android:endColor="#101010" + android:startColor="#585858" + android:type="linear" > + </gradient> + </shape> + </item> + + <item + android:height="20dp" + android:left="2.5dp" + android:top="2.5dp" + android:width="20dp"> + <shape android:shape="oval" > + <solid android:color="@android:color/black" /> + + <stroke + android:width="1dp" + android:color="@color/ThemeDark" /> + </shape> + </item> + +</layer-list>
\ No newline at end of file diff --git a/app/res/drawable/repwifi_button.xml b/app/res/drawable/repwifi_button.xml new file mode 100644 index 0000000..263ee14 --- /dev/null +++ b/app/res/drawable/repwifi_button.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android" > + <item android:drawable="@drawable/button_bg_pressed" + android:state_pressed="true"/> + + <item android:drawable="@drawable/button_bg"/> +</selector>
\ No newline at end of file diff --git a/app/res/drawable/repwifi_checkbox.xml b/app/res/drawable/repwifi_checkbox.xml new file mode 100644 index 0000000..afe3b7f --- /dev/null +++ b/app/res/drawable/repwifi_checkbox.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android" > + + <item android:drawable="@drawable/checkmark" + android:state_checked="true"/> + + <item android:drawable="@drawable/checkmark_frame" + android:state_checked="false" /> + +</selector>
\ No newline at end of file diff --git a/app/res/drawable/repwifi_progbar.xml b/app/res/drawable/repwifi_progbar.xml new file mode 100644 index 0000000..1b05913 --- /dev/null +++ b/app/res/drawable/repwifi_progbar.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> + +<animation-list xmlns:android="http://schemas.android.com/apk/res/android" + android:oneshot="false" > + + <item android:duration="300"> + <bitmap android:src="@drawable/rw_prog_1" /> + </item> + <item android:duration="300"> + <bitmap android:src="@drawable/rw_prog_2" /> + </item> + <item android:duration="300"> + <bitmap android:src="@drawable/rw_prog_3" /> + </item> + <item android:duration="300"> + <bitmap android:src="@drawable/rw_prog_0" /> + </item> + +</animation-list>
\ No newline at end of file diff --git a/app/res/drawable/repwifi_radiobutton.xml b/app/res/drawable/repwifi_radiobutton.xml new file mode 100644 index 0000000..053e100 --- /dev/null +++ b/app/res/drawable/repwifi_radiobutton.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android" > + + <item android:drawable="@drawable/radio_button" + android:state_checked="true"/> + + <item android:drawable="@drawable/radio_button" + android:state_pressed="true"/> + + <item android:drawable="@drawable/radio_frame" + android:state_checked="false" /> + +</selector>
\ No newline at end of file diff --git a/app/res/drawable/rw_prog_0.png b/app/res/drawable/rw_prog_0.png Binary files differnew file mode 100644 index 0000000..b2f15ea --- /dev/null +++ b/app/res/drawable/rw_prog_0.png diff --git a/app/res/drawable/rw_prog_1.png b/app/res/drawable/rw_prog_1.png Binary files differnew file mode 100644 index 0000000..0db5a6f --- /dev/null +++ b/app/res/drawable/rw_prog_1.png diff --git a/app/res/drawable/rw_prog_2.png b/app/res/drawable/rw_prog_2.png Binary files differnew file mode 100644 index 0000000..3389b47 --- /dev/null +++ b/app/res/drawable/rw_prog_2.png diff --git a/app/res/drawable/rw_prog_3.png b/app/res/drawable/rw_prog_3.png Binary files differnew file mode 100644 index 0000000..155a2de --- /dev/null +++ b/app/res/drawable/rw_prog_3.png diff --git a/app/res/layout/activity_credits.xml b/app/res/layout/activity_credits.xml index 871536c..04280d4 100644 --- a/app/res/layout/activity_credits.xml +++ b/app/res/layout/activity_credits.xml @@ -1,17 +1,16 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:background="@color/ThemeDark"> + android:background="@color/ThemeDark" + android:orientation="vertical" > - <TextView + <TextView android:id="@+id/txt_credits" android:layout_width="fill_parent" android:layout_height="fill_parent" + android:scrollbars="vertical" android:textColor="@color/ThemeLight" android:textColorLink="@color/ThemeLight" - android:textSize="7pt" - android:scrollbars = "vertical" /> - + android:textSize="7pt" /> </LinearLayout>
\ No newline at end of file diff --git a/app/res/layout/activity_input_password.xml b/app/res/layout/activity_input_password.xml index a024879..14dd78a 100644 --- a/app/res/layout/activity_input_password.xml +++ b/app/res/layout/activity_input_password.xml @@ -2,63 +2,63 @@ xmlns:tools="http://schemas.android.com/tools" tools:context=".InputPasswordActivity" > - - <ScrollView android:id="@+id/login_form" android:layout_width="match_parent" android:layout_height="match_parent" - android:background = "@color/black" > + android:background="@color/black" > <LinearLayout style="@style/LoginFormContainer" - android:orientation="vertical" - android:background="@color/black" android:layout_width="match_parent" - android:layout_height="wrap_content" > - - <TextView + android:layout_height="wrap_content" + android:background="@color/black" + android:orientation="vertical" > + + <TextView android:id="@+id/txt_insert_pass" android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textCursorDrawable="@null" - android:textColor="@color/ThemeLight" - android:textSize="10pt" - android:layout_marginBottom="10dp" - android:background="@color/black" - android:maxLines = "10" - android:text="@string/insert_nets_password" /> - + android:layout_height="wrap_content" + android:layout_marginBottom="10dp" + android:background="@color/black" + android:maxLines="10" + android:text="@string/insert_nets_password" + android:textColor="@color/ThemeLight" + android:textSize="10pt" /> + <EditText android:id="@+id/txt_password" android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="textPassword" + android:maxLines="1" + android:singleLine="true" android:textColor="@color/ThemeLight" + android:background="@drawable/button_bg" + android:textCursorDrawable="@null" android:textSize="10pt" - android:maxLines="1" - android:singleLine="true" /> - - <CheckBox + android:padding="5dp" /> + + <CheckBox android:id="@+id/chk_show_pass" - android:textColor="@color/ThemeLight" - android:text="@string/show_password" android:layout_width="wrap_content" - android:layout_height="wrap_content" /> - + android:layout_height="wrap_content" + android:text="@string/show_password" + android:textColor="@color/ThemeLight" + android:textSize="9pt" /> + <Button android:id="@+id/sign_in_button" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="@color/ThemeDark" - android:textColor="@color/ThemeLight" android:layout_gravity="right" android:layout_marginTop="16dp" + android:background="@drawable/repwifi_button" + android:onClick="onBtnNextClick" android:paddingLeft="32dp" android:paddingRight="32dp" android:text="@string/button_text_next" - android:onClick="onBtnNextClick" /> - + android:textColor="@color/ThemeLight" /> </LinearLayout> </ScrollView> diff --git a/app/res/layout/activity_input_ssid.xml b/app/res/layout/activity_input_ssid.xml new file mode 100644 index 0000000..aa7e8f3 --- /dev/null +++ b/app/res/layout/activity_input_ssid.xml @@ -0,0 +1,85 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/black" + android:padding="20dp" + tools:context=".InputSsidActivity" > + + <!-- --> + + <Button + android:id="@+id/btn_select_hidden_ssid" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:layout_marginBottom="32dp" + android:layout_marginTop="16dp" + android:background="@drawable/repwifi_button" + android:onClick="onBtnSelectClick" + android:paddingLeft="32dp" + android:paddingRight="32dp" + android:text="@string/select_saved_net" + android:textColor="@color/ThemeLight" /> + + <View + android:id="@+id/line" + android:layout_width="match_parent" + android:layout_height="2dp" + android:layout_below="@id/btn_select_hidden_ssid" + android:layout_marginBottom="20dp" + android:layout_marginTop="20dp" + android:background="@color/ThemeLight" /> + + <TextView + android:id="@+id/txt_insert_ssid" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@id/line" + android:layout_centerHorizontal="true" + android:layout_marginBottom="10dp" + android:background="@color/black" + android:maxLines="1" + android:text="@string/input_ssid" + android:textColor="@color/ThemeLight" + android:textSize="9pt" /> + + <EditText + android:id="@+id/txt_ssid" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@id/txt_insert_ssid" + android:layout_centerHorizontal="true" + android:layout_marginBottom="30dp" + android:background="@drawable/button_bg" + android:inputType="text" + android:maxLines="1" + android:singleLine="true" + android:textColor="@color/ThemeLight" + android:textCursorDrawable="@null" + android:padding="5dp" + android:textSize="10pt" /> + + <LinearLayout + style="@style/LoginFormContainer" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@id/txt_ssid" + android:background="@color/black" + android:orientation="vertical" > + + <Button + android:id="@+id/btn_next_hidden_ssid" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="right" + android:layout_marginTop="16dp" + android:background="@drawable/repwifi_button" + android:onClick="onBtnNextClick" + android:paddingLeft="32dp" + android:paddingRight="32dp" + android:text="@string/button_text_next" + android:textColor="@color/ThemeLight" /> + </LinearLayout> + +</RelativeLayout>
\ No newline at end of file diff --git a/app/res/layout/activity_long_task.xml b/app/res/layout/activity_long_task.xml index 769144e..a17ba32 100644 --- a/app/res/layout/activity_long_task.xml +++ b/app/res/layout/activity_long_task.xml @@ -3,23 +3,25 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/black" > - - <ProgressBar - android:id="@+id/progbar" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerHorizontal="true" - android:layout_centerVertical="true" /> - - <TextView - android:id="@+id/txt_msg" + + <ProgressBar + android:id="@+id/progbar" + style="?android:attr/progressBarStyleLarge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="gone" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" + android:indeterminateDrawable="@drawable/repwifi_progbar" /> + + <TextView + android:id="@+id/txt_msg" android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerHorizontal="true" - android:layout_centerVertical="true" - android:layout_below="@id/progbar" - android:padding="10dp" - android:textColor="@color/ThemeLight" /> - - + android:layout_height="wrap_content" + android:layout_below="@id/progbar" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" + android:padding="10dp" + android:textColor="@color/ThemeLight" /> + </RelativeLayout>
\ No newline at end of file diff --git a/app/res/layout/activity_main.xml b/app/res/layout/activity_main.xml index 3818751..b9359ba 100644 --- a/app/res/layout/activity_main.xml +++ b/app/res/layout/activity_main.xml @@ -1,57 +1,70 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:padding="15dp" - android:background="@color/black" > + android:background="@color/black" + android:padding="15dp" > + + <TextView + android:id="@+id/txt_main" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:layout_marginBottom="10dp" + android:layout_marginTop="10dp" + android:background="@color/black" + android:maxLines="10" + android:text="" + android:textColor="@color/ThemeLight" /> + + <Button + android:id="@+id/btn_scan" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:layout_marginBottom="20dp" + android:layout_marginTop="15dp" + android:background="@drawable/repwifi_button" + android:onClick="btnScanClick" + android:paddingLeft="5dp" + android:paddingRight="5dp" + android:text="@string/scan_networks" + android:textColor="@color/ThemeLight" /> + + <Button + android:id="@+id/btn_hidden_ssid" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_below="@id/btn_scan" + android:layout_centerHorizontal="true" + android:layout_marginBottom="20dp" + android:background="@drawable/repwifi_button" + android:onClick="btnHiddenClick" + android:paddingLeft="5dp" + android:paddingRight="5dp" + android:text="@string/connect_hidden" + android:textColor="@color/ThemeLight" /> - <TextView - android:id="@+id/txt_main" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_centerHorizontal="true" - android:textColor="@color/ThemeLight" - android:background="@color/black" - android:maxLines = "10" - android:layout_marginTop="10dp" - android:layout_marginBottom="10dp" - android:text="" /> - - <Button - android:id="@+id/btn_scan" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:paddingLeft="5dp" - android:paddingRight="5dp" - android:layout_centerHorizontal="true" - android:textColor="@color/ThemeLight" - android:background="@color/ThemeDark" - android:text="@string/scan_networks" - android:onClick="btnScanClick" - android:layout_marginTop="15dp" - android:layout_marginBottom="20dp" /> - - <Button - android:id="@+id/btn_manage_nets" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_below="@id/btn_scan" - android:paddingLeft="5dp" - android:paddingRight="5dp" - android:layout_centerHorizontal="true" - android:textColor="@color/ThemeLight" - android:background="@color/ThemeDark" - android:text="@string/manage_networks" - android:onClick="btnManageClick" - android:layout_marginBottom="20dp" /> - - <ImageView - android:id="@+id/img_logo" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_centerHorizontal="true" - android:layout_below="@id/btn_manage_nets" - android:layout_margin="20dp" > - - </ImageView> - - </RelativeLayout>
\ No newline at end of file + <Button + android:id="@+id/btn_manage_nets" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_below="@id/btn_hidden_ssid" + android:layout_centerHorizontal="true" + android:layout_marginBottom="20dp" + android:background="@drawable/repwifi_button" + android:onClick="btnManageClick" + android:paddingLeft="5dp" + android:paddingRight="5dp" + android:text="@string/manage_networks" + android:textColor="@color/ThemeLight" /> + + <ImageView + android:id="@+id/img_logo" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_below="@id/btn_manage_nets" + android:layout_centerHorizontal="true" + android:layout_margin="20dp" > + </ImageView> + +</RelativeLayout>
\ No newline at end of file diff --git a/app/res/layout/activity_network_details.xml b/app/res/layout/activity_network_details.xml index a36c957..6442585 100644 --- a/app/res/layout/activity_network_details.xml +++ b/app/res/layout/activity_network_details.xml @@ -2,8 +2,8 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:padding="15dp" android:background="@color/black" + android:padding="15dp" tools:context=".NetworkDetailsActivity" > <TextView @@ -11,28 +11,29 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="10dp" + android:background="@color/black" android:textColor="@color/ThemeLight" - android:textSize="7pt" - android:background="@color/black" /> - + android:textSize="7pt" /> + <CheckBox android:id="@+id/chk_show_pass_details" + android:layout_width="wrap_content" + android:layout_height="wrap_content" android:layout_below="@id/txt_net_details" + android:text="@string/show_password" android:textColor="@color/ThemeLight" - android:text="@string/show_password" - android:layout_width="wrap_content" - android:layout_height="wrap_content" /> - - <Button + android:textSize="10pt" /> + + <Button android:id="@+id/btn_delete" - android:layout_below="@id/chk_show_pass_details" - android:layout_marginTop="15dp" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_below="@id/chk_show_pass_details" android:layout_centerHorizontal="true" - android:textColor="@color/ThemeLight" - android:background="@color/ThemeDark" + android:layout_marginTop="15dp" + android:background="@drawable/repwifi_button" + android:onClick="btnDeleteClick" android:text="@string/delete" - android:onClick="btnDeleteClick" /> + android:textColor="@color/ThemeLight" /> </RelativeLayout>
\ No newline at end of file diff --git a/app/res/layout/activity_select_network.xml b/app/res/layout/activity_select_network.xml index 2dd7958..d1c0be5 100644 --- a/app/res/layout/activity_select_network.xml +++ b/app/res/layout/activity_select_network.xml @@ -3,56 +3,54 @@ android:id="@+id/layout_selnets" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@color/black" android:padding="15dp" - tools:context=".SelectNetworkActivity" - android:background="@color/black" > - - <TextView - android:id="@+id/txt_selnets" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerHorizontal="true" - android:textColor="@color/ThemeLight" - android:textSize="10pt" - android:maxLines = "5" - android:scrollbars = "vertical" - android:layout_marginBottom="10dp" /> - + tools:context=".SelectNetworkActivity" > + + <TextView + android:id="@+id/txt_selnets" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:layout_marginBottom="10dp" + android:maxLines="5" + android:scrollbars="vertical" + android:textColor="@color/ThemeLight" + android:textSize="10pt" /> + <Button - android:id="@+id/btn_rescan" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_below="@id/txt_selnets" - android:paddingLeft="10dp" - android:paddingRight="10dp" - android:layout_centerHorizontal="true" - android:textColor="@color/ThemeLight" - android:background="@color/ThemeDark" - android:text="@string/rescan" - android:onClick="btnScanClick" /> + android:id="@+id/btn_rescan" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_below="@id/txt_selnets" + android:layout_centerHorizontal="true" + android:background="@drawable/repwifi_button" + android:onClick="btnScanClick" + android:paddingLeft="10dp" + android:paddingRight="10dp" + android:text="@string/rescan" + android:textColor="@color/ThemeLight" /> - <ScrollView - android:id="@+id/scrollview" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:layout_below="@id/btn_rescan" - android:layout_centerHorizontal="true" - android:scrollbars="vertical" - android:fillViewport="true" - android:textColor="@color/ThemeLight" - android:background="@color/White" > + <ScrollView + android:id="@+id/scrollview" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:layout_below="@id/btn_rescan" + android:layout_centerHorizontal="true" + android:background="@color/black" + android:fillViewport="true" + android:scrollbars="vertical" + android:textColor="@color/ThemeLight" > - <TableLayout - android:id="@+id/table_networks" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_gravity="fill_horizontal" - android:isScrollContainer="true" - android:textColor="@color/ThemeLight" - android:background="@color/black" > - </TableLayout> - - - </ScrollView> + <TableLayout + android:id="@+id/table_networks" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_gravity="fill_horizontal" + android:background="@color/black" + android:isScrollContainer="true" + android:textColor="@color/ThemeLight" > + </TableLayout> + </ScrollView> </RelativeLayout>
\ No newline at end of file diff --git a/app/res/layout/activity_settings.xml b/app/res/layout/activity_settings.xml new file mode 100644 index 0000000..a887096 --- /dev/null +++ b/app/res/layout/activity_settings.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/black" > + + <ListView + android:id="@android:id/list" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/black" /> + +</LinearLayout>
\ No newline at end of file diff --git a/app/res/layout/activity_show_status.xml b/app/res/layout/activity_show_status.xml index 9f7e584..5afc596 100644 --- a/app/res/layout/activity_show_status.xml +++ b/app/res/layout/activity_show_status.xml @@ -2,8 +2,8 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:padding="15dp" android:background="@color/black" + android:padding="15dp" tools:context=".ShowStatusActivity" > <TextView @@ -13,31 +13,31 @@ android:layout_centerHorizontal="true" android:background="@color/black" android:textColor="@color/ThemeLight" /> - - <Button + + <Button android:id="@+id/btn_disconnect" - android:background="@color/ThemeDark" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_centerHorizontal="true" android:layout_below="@id/txt_status" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" android:layout_marginTop="10dp" - android:textColor="@color/ThemeLight" + android:background="@drawable/repwifi_button" + android:onClick="onBtnDisconnectClick" android:text="@string/disconnect" - android:onClick="onBtnDisconnectClick"/> - - <Button + android:textColor="@color/ThemeLight" /> + + <Button android:id="@+id/btn_back" - android:background="@color/ThemeDark" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_centerHorizontal="true" android:layout_below="@id/txt_status" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" android:layout_marginTop="10dp" - android:textColor="@color/ThemeLight" + android:background="@drawable/repwifi_button" + android:onClick="onBtnMainClick" android:text="@string/back_main" - android:onClick="onBtnMainClick"/> + android:textColor="@color/ThemeLight" /> </RelativeLayout>
\ No newline at end of file diff --git a/app/res/menu/activity_input_ssid.xml b/app/res/menu/activity_input_ssid.xml new file mode 100644 index 0000000..77f358b --- /dev/null +++ b/app/res/menu/activity_input_ssid.xml @@ -0,0 +1,9 @@ +<menu xmlns:android="http://schemas.android.com/apk/res/android" > + + <item + android:id="@+id/menu_settings" + android:orderInCategory="100" + android:showAsAction="never" + android:title="@string/menu_settings"/> + +</menu>
\ No newline at end of file diff --git a/app/res/menu/activity_main.xml b/app/res/menu/activity_main.xml index 7855b0d..e9a1624 100644 --- a/app/res/menu/activity_main.xml +++ b/app/res/menu/activity_main.xml @@ -1,15 +1,19 @@ -<menu xmlns:android="http://schemas.android.com/apk/res/android" > +<menu xmlns:android="http://schemas.android.com/apk/res/android" + android:divider="@drawable/divider_shape" + android:dividerHeight="2pt" + android:textColor="@color/ThemeLight" > <item - android:id="@+id/menu_credits" - android:orderInCategory="100" + android:id="@+id/menu_config" + android:orderInCategory="1" android:showAsAction="never" - android:title="@string/menu_credits" /> - + android:textColor="@color/ThemeLight" + android:title="@string/menu_config"/> <item - android:id="@+id/menu_config" - android:orderInCategory="100" + android:id="@+id/menu_credits" + android:orderInCategory="2" android:showAsAction="never" - android:title="@string/menu_config" /> + android:textColor="@color/ThemeLight" + android:title="@string/menu_credits"/> </menu>
\ No newline at end of file diff --git a/app/res/values/array.xml b/app/res/values/array.xml index ac6da05..c8c4d9b 100644 --- a/app/res/values/array.xml +++ b/app/res/values/array.xml @@ -1,16 +1,17 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <string-array name="debug_priority_names"> - <item >Log everything</item> - <item >Log medium priority events</item> - <item >Log high priority events only</item> - <item >Logging disabled</item> + <item>Log everything</item> + <item>Log medium priority events</item> + <item>Log high priority events only</item> + <item>Logging disabled</item> </string-array> <string-array name="debug_priority"> - <item >0</item> - <item >1</item> - <item >2</item> - <item >3</item> + <item>0</item> + <item>1</item> + <item>2</item> + <item>3</item> </string-array> - + </resources>
\ No newline at end of file diff --git a/app/res/values/colors.xml b/app/res/values/colors.xml index 22767c8..f637c6a 100644 --- a/app/res/values/colors.xml +++ b/app/res/values/colors.xml @@ -1,7 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> -<resources> +<resources> + <color name="ThemeLight">#FFA500</color> <color name="ThemeDark">#5F021F</color> + <color name="ThemeDarkSecondary">#5f0230</color> <color name="black">#000000</color> <color name="White">#FFFFFF</color> + <color name="Transparent">#00000000</color> + <color name="Anthracite">#181818</color> + </resources>
\ No newline at end of file diff --git a/app/res/values/strings.xml b/app/res/values/strings.xml index 0771c3e..dccbe44 100644 --- a/app/res/values/strings.xml +++ b/app/res/values/strings.xml @@ -20,14 +20,25 @@ <string name="delete">Delete network info</string> <string name="manage_networks">Manage Networks</string> <string name="title_activity_credits">Credits</string> - <string name="credit_text">Copyright 2017 Filippo \"Fil\" Bergamo<br/><br/>This app is Free Software.<br/>It\'s licensed under the terms of <a href="https://www.gnu.org/licenses/gpl.txt">GPL v3</a><br/><br/>This app is developed as a contribution to <br/><a href="http://www.replicant.us">The Replicant Project</a><br/><br/><b><u><big>Thank GNUs:</big></u></b><br/><br/><b>Tibi \"tct\" Turbureanu</b><br/>for having done the initial job of porting libre WiFi to Replicant 4.2.<br/><br/><b>Wolfgang Wiedmeyer</b><br/>for porting libre WiFi to Replicant 6.0 and for helping with the scripts.<br/><br/>To report on bugs, request features, or any help request, please refer to:<br/><a href="http://redmine.replicant.us/projects/replicant/boards">Replicant\'s Forum</a><br/></string> + <string name="credit_text">Copyright 2017 Filippo \"Fil\" Bergamo<br/><br/>This app is Free Software.<br/>It\'s licensed under the terms of <a href="https://www.gnu.org/licenses/gpl.txt">GPL v3</a><br/><br/>This app is developed as a contribution to <br/><a href="http://www.replicant.us">The Replicant Project</a><br/><br/><b><u><big>Thank GNUs:</big></u></b><br/><br/><b>Tiberiu - Technoethical</b><br/>for having done the initial job of porting libre WiFi to Replicant 4.2.<br/><br/><b>Wolfgang Wiedmeyer</b><br/>for porting libre WiFi to Replicant 6.0 and for helping with the scripts.<br/><br/>To report on bugs, request features, or any help request, please refer to:<br/><a href="http://redmine.replicant.us/projects/replicant/boards">Replicant\'s Forum</a><br/><br/>Source code is hosted at: <br/><a href="https://git.replicant.us/contrib/Fil/RepWifiApp/">https://git.replicant.us/contrib/Fil/RepWifiApp/</a><br/></string> <string name="menu_config">Settings</string> - <string name="msg_interface_not_found">External WiFi adapter not found!\nPlease plug in a supported WiFi adapter and retry.</string> + <string name="msg_interface_not_found">WiFi adapter not found!\nPlease plug in a supported WiFi adapter and retry.</string> <string name="msg_confirm_delete_network">Are you sure you want to delete this network?</string> <string name="yes">Yes</string> <string name="no">No</string> <string name="retry">Retry</string> <string name="msg_root_disabled">Root access is disabled.\n\nSeems like root access is disabled on this device.\nRepWifi needs root access in order to work.\nPlease, enable root access for applications in:\nSettings > Developer options > Root access > "Apps only"\nWhen done so, restart RepWifi and grant the permission to use root, if asked.</string> <string name="msg_root_denied">Root access denied.\nSeems like you denied root access to RepWifi.\nRepWifi needs root access in order to work.\nPlease, restart the application, and grant RepWifi the permission to use root, when asked.</string> + <string name="connect_hidden">Connect to Hidden Network</string> + <string name="input_ssid">Or.. Insert Network\'s name (SSID)</string> + <string name="title_activity_input_ssid">Insert Network\'s Name</string> + <string name="menu_settings">Settings</string> + <string name="select_saved_net">Use Saved Network</string> + <string name="dns1_default">185.121.177.177</string> + <string name="dns2_default">169.239.202.202</string> + <string name="receiver_description">RepWifi\'s listener for startup event. Provides auto-start and notification features to RepWifi.</string> + <string name="confirm_reset_settings">Are you sure you want to reset all settings to default?</string> + <string name="confirm_kill_backend">Are you sure you want to kill the back-end processes?</string> + <string name="summary_kill_backend">Sometimes back-end programs get stuck in inconsistent states.\nClicking this button restores normal behaviour by killing running instances of wpa_supplicant and dhcpcd."</string> </resources>
\ No newline at end of file diff --git a/app/res/values/styles.xml b/app/res/values/styles.xml index c414ecc..18e186b 100644 --- a/app/res/values/styles.xml +++ b/app/res/values/styles.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> -<resources> +<resources xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. --> - <style name="AppBaseTheme" parent="android:Theme.Light"> + <style name="AppBaseTheme" parent="android:Theme.Holo"> <!-- Theme customizations available in newer API levels can go in res/values-vXX/styles.xml, while customizations related to @@ -15,7 +15,57 @@ <!-- Application theme. --> <style name="AppTheme" parent="AppBaseTheme"> + <!-- All customizations that are NOT specific to a particular API-level can go here. --> + <item name="android:itemBackground">@color/Anthracite</item> + <item name="android:actionMenuTextColor">@color/ThemeLight</item> + <item name="android:itemTextAppearance">@style/TextAppearanceMenu</item> + <item name="android:listChoiceIndicatorMultiple">@drawable/repwifi_checkbox</item> + <item name="android:listDivider">@color/ThemeDark</item> + <item name="android:dividerHeight">1dp</item> + </style> + + <style name="TextAppearanceMenu"> + <item name="android:textColor">@color/ThemeLight</item> + </style> + + <style name="Theme.SettingsTheme" parent="@style/AppTheme"> <!-- "@android:style/Theme.Holo" --> + <item name="android:windowBackground">@color/Anthracite</item> + <item name="android:textColor">@color/ThemeLight</item> + <item name="android:textColorSecondary">@android:color/white</item> + <item name="android:alertDialogTheme">@style/Theme.RepWifiDialogTheme</item> + <item name="android:listChoiceIndicatorMultiple">@drawable/repwifi_checkbox</item> </style> + <style name="listViewPrefs" parent="@android:style/Widget.ListView"> + <item name="android:background">@color/Anthracite</item> + <item name="android:textColor">@color/ThemeLight</item> + <item name="android:cacheColorHint">@color/Anthracite</item> + </style> + + <style name="RepWifi.BorderlessButton" parent="@android:style/Widget.Holo.Button.Borderless"> + <item name="android:textColor">@color/ThemeLight</item> + <item name="android:background">@drawable/repwifi_button</item> + </style> + + <style name="RepWifi.ButtonBar.AlertDialog" parent="@android:style/Holo.ButtonBar.AlertDialog"> + <item name="android:textColor">@color/ThemeLight</item> + <item name="android:background">@color/ThemeDark</item> + </style> + + <!-- dialog theme --> + <style name="Theme.RepWifiDialogTheme" parent="@android:style/Theme.Holo.Dialog"> + <item name="android:textColor">@color/ThemeLight</item> + <item name="android:textColorPrimary">@color/ThemeLight</item> + <item name="android:textColorSecondary">@color/ThemeDark</item> + <item name="android:windowBackground">@android:color/transparent</item> + <item name="android:borderlessButtonStyle">@style/RepWifi.BorderlessButton</item> + <item name="android:buttonStyle">@style/RepWifi.BorderlessButton</item> + <item name="android:buttonBarStyle">@style/RepWifi.ButtonBar.AlertDialog</item> + <item name="android:listViewStyle">@style/listViewPrefs</item> + <item name="android:windowNoTitle">true</item> + <item name="android:listChoiceIndicatorSingle">@drawable/repwifi_radiobutton</item> + </style> + + </resources>
\ No newline at end of file diff --git a/app/res/xml/debug_settings.xml b/app/res/xml/debug_settings.xml new file mode 100644 index 0000000..8aa09f4 --- /dev/null +++ b/app/res/xml/debug_settings.xml @@ -0,0 +1,18 @@ +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > + + <ListPreference + android:id="@+id/pref_debug_prio" + android:defaultValue="3" + android:entries="@array/debug_priority_names" + android:entryValues="@array/debug_priority" + android:key="debug_priority" + android:title="Log priority" + android:divider="@drawable/divider_shape" /> + + <Preference android:title="Reset back-end engine" + android:key="pref_kill_backend" + android:summary="@string/summary_kill_backend" + android:background="@drawable/button_bg" + android:textColor="@color/ThemeLight" /> + +</PreferenceScreen>
\ No newline at end of file diff --git a/app/res/xml/general_settings.xml b/app/res/xml/general_settings.xml new file mode 100644 index 0000000..d836b67 --- /dev/null +++ b/app/res/xml/general_settings.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="utf-8"?> +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > + + <EditTextPreference + android:id="@+id/pref_dns1" + android:defaultValue="@string/dns1_default" + android:key="dns1" + android:summary="Set the IPv4 address of the primary DNS server.\nIf left blank, RepWifi will try to use the default gateway as a DNS resolver." + android:title="DNS server #1" + android:textColor="@color/ThemeLight" + android:background="@color/ThemeDark" + android:padding="5dp"/> + + + <EditTextPreference + android:id="@+id/pref_dns2" + android:defaultValue="@string/dns2_default" + android:key="dns2" + android:summary="Set the IPv4 address of the secondary DNS server.\nIf the primary address is blank, this will be ignored." + android:title="DNS server #2" + android:textColor="@color/ThemeLight" + android:background="@color/ThemeDark" + android:padding="5dp"/> + + <CheckBoxPreference + android:id="@+id/pref_autoconnect" + android:defaultValue="false" + android:key="enable_autoconnect" + android:summary="When the WiFi dongle is attached, RepWifi connects automatically to reachable known networks.\n(Experimental)." + android:title="Enable Autoconnect" /> + + <CheckBoxPreference + android:id="@+id/pref_progbar" + android:defaultValue="true" + android:key="enable_progbar" + android:summary="Show an animated progress bar while doing long background tasks.\nKeep it disabled to (hopefully) save some extra power for the WiFi dongle." + android:title="Animated progress bar" /> + + <CheckBoxPreference + android:id="@+id/pref_autostart" + android:defaultValue="false" + android:key="enable_autostart" + android:summary="If checked, RepWifi is started automatically on system's startup." + android:title="Enable Start at Boot" /> + + <Preference android:title="Restore Defaults" + android:key="pref_restore_default" + android:summary="click to restore default settings\n(then return to main screen to apply the reset)" + android:background="@drawable/button_bg" + android:textColor="@color/ThemeLight" /> + +</PreferenceScreen>
\ No newline at end of file diff --git a/app/res/xml/settings.xml b/app/res/xml/settings.xml deleted file mode 100644 index f53f00f..0000000 --- a/app/res/xml/settings.xml +++ /dev/null @@ -1,12 +0,0 @@ -<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > - - <ListPreference - android:key="debug_priority" - android:title="Log priority" - android:id="@+id/pref_debug_prio" - android:entries="@array/debug_priority_names" - android:entryValues="@array/debug_priority" - android:defaultValue="3" /> - - -</PreferenceScreen>
\ No newline at end of file diff --git a/app/res/xml/settings_headers.xml b/app/res/xml/settings_headers.xml index d2212da..50f7436 100644 --- a/app/res/xml/settings_headers.xml +++ b/app/res/xml/settings_headers.xml @@ -1,11 +1,14 @@ <?xml version="1.0" encoding="utf-8"?> +<preference-headers xmlns:android="http://schemas.android.com/apk/res/android" > -<preference-headers - xmlns:android="http://schemas.android.com/apk/res/android"> - - <header - android:fragment="fil.libre.repwifiapp.activities.SettingsActivity$RepWifiFragment" - android:title="Debug" - android:summary="set debugging variables" /> + <header + android:fragment="fil.libre.repwifiapp.activities.SettingsActivity$GeneralSettingFragment" + android:summary="set general options" + android:title="Options" /> + + <header + android:fragment="fil.libre.repwifiapp.activities.SettingsActivity$DebugSettingFragment" + android:summary="set advanced options and debug variables" + android:title="Advanced & Debug" /> </preference-headers>
\ No newline at end of file |