Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 20
buildToolsVersion '20.0.0'
compileSdkVersion 19
buildToolsVersion '27.0.3'

defaultConfig {
applicationId "com.shubhangrathore.multisimtoggle"
minSdkVersion 15
targetSdkVersion 20
targetSdkVersion 19
}
buildTypes {
release {
runProguard false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':floatingActionButton')
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':floatingActionButton')
}
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.shubhangrathore.multisimtoggle"
android:versionCode="3"
android:versionName="1.2">
android:versionCode="4"
android:versionName="1.3">

<uses-permission android:name="android.permission.ACCESS_SUPERUSER" />

Expand Down
239 changes: 111 additions & 128 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,150 +19,133 @@
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout 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:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/material_indigo"
android:fitsSystemWindows="true"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:orientation="vertical"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity">

<LinearLayout
android:id="@+id/header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/material_indigo"
android:orientation="vertical"
android:padding="@dimen/activity_horizontal_margin">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|bottom"
android:text="@string/app_name"
android:textColor="@android:color/white"
android:textSize="@dimen/title_size" />

<TextView
android:id="@+id/multisim_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|top"
android:text="@string/disabled"
android:textColor="@color/light_font"
android:textSize="@dimen/subtitle_size" />
</LinearLayout>

<View
android:id="@+id/shadow_up"
android:layout_width="match_parent"
android:layout_height="8sp"
android:background="@drawable/shadow_up" />

<LinearLayout
android:id="@+id/content"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_height="wrap_content"
android:background="@color/material_indigo_light"
android:orientation="vertical">
android:gravity="center"
android:orientation="horizontal">

<com.faizmalkani.floatingactionbutton.Fab
android:id="@+id/fabbutton_info"
android:layout_width="@dimen/circle_with"
android:layout_height="@dimen/circle_height"
android:layout_above="@+id/shadow_up"
android:layout_margin="@dimen/circle_margin"
android:layout_toRightOf="@+id/fabbutton_sim_toggle" />

<com.faizmalkani.floatingactionbutton.Fab
android:id="@+id/fabbutton_sim_toggle"
android:layout_width="@dimen/circle_with"
android:layout_height="@dimen/circle_height"
android:layout_above="@+id/shadow_up"
android:layout_centerHorizontal="true"
android:layout_margin="@dimen/circle_margin" />

<com.faizmalkani.floatingactionbutton.Fab
android:id="@+id/fabbutton_github"
android:layout_width="@dimen/circle_with"
android:layout_height="@dimen/circle_height"
android:layout_above="@+id/shadow_up"
android:layout_margin="@dimen/circle_margin"
android:layout_toLeftOf="@+id/fabbutton_sim_toggle" />

<LinearLayout
android:id="@+id/header"
android:layout_width="fill_parent"
android:layout_height="230dp"
android:background="@color/material_indigo"
android:orientation="vertical">
</LinearLayout>

<TextView
android:layout_width="fill_parent"
android:layout_height="160dp"
android:gravity="left|bottom"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:text="@string/multisim"
android:textColor="@android:color/white"
android:textSize="34sp" />
<View
android:id="@+id/shadow_down"
android:layout_width="fill_parent"
android:layout_height="8sp"
android:background="@drawable/shadow_down" />

<TextView
android:id="@+id/multisim_status"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="left|top"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingTop="6dp"
android:text="@string/disabled"
android:textColor="@color/light_font"
android:textSize="16sp" />

</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="8sp"
android:background="@drawable/shadow_down" />

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout
android:id="@+id/footer"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:background="@color/material_indigo_dark"
android:orientation="vertical"
android:padding="@dimen/activity_vertical_margin">

<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true">
android:layout_height="wrap_content"
android:gravity="center|left"
android:padding="8dp"
android:text="@string/app_name"
android:textColor="@android:color/white"
android:textSize="@dimen/subtitle_size"
android:textStyle="bold" />

<TextView
android:id="@+id/app_version"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center|left"
android:padding="8dp"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:text="@string/version"
android:textColor="@android:color/white"
android:textSize="@dimen/subtitle_size" />

<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<RelativeLayout
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">

<com.faizmalkani.floatingactionbutton.Fab
android:id="@+id/fabbutton_info"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_above="@+id/shadow_up"
android:layout_marginBottom="30dp"
android:layout_marginLeft="20dp"
android:layout_toRightOf="@+id/fabbutton_sim_toggle" />

<com.faizmalkani.floatingactionbutton.Fab
android:id="@+id/fabbutton_sim_toggle"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_above="@+id/shadow_up"
android:layout_centerHorizontal="true"
android:layout_marginBottom="30dp" />

<com.faizmalkani.floatingactionbutton.Fab
android:id="@+id/fabbutton_github"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_above="@+id/shadow_up"
android:layout_marginBottom="30dp"
android:layout_marginRight="20dp"
android:layout_toLeftOf="@+id/fabbutton_sim_toggle" />

<View
android:id="@+id/shadow_up"
android:layout_width="match_parent"
android:layout_height="8sp"
android:layout_above="@+id/footer"
android:background="@drawable/shadow_up" />

<LinearLayout
android:id="@+id/footer"
android:layout_width="fill_parent"
android:layout_height="135dp"
android:layout_alignParentBottom="true"
android:background="@color/material_indigo_dark"
android:orientation="vertical">

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center|left"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:text="@string/app_name"
android:textColor="@android:color/white"
android:textSize="14sp"
android:textStyle="bold" />

<TextView
android:id="@+id/app_version"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center|left"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:text="@string/version"
android:textColor="@android:color/white"
android:textSize="12sp" />

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:gravity="center|left"
android:onClick="openDeveloperWebsite"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:text="@string/app_copyright"
android:textColor="@android:color/white"
android:textSize="12sp" />

</LinearLayout>

</RelativeLayout>

android:layout_height="wrap_content"
android:clickable="true"
android:gravity="center|left"
android:onClick="openDeveloperWebsite"
android:text="@string/app_copyright"
android:textColor="@android:color/white"
android:textSize="@dimen/information_size" />
</ScrollView>

</LinearLayout>

</FrameLayout>

</LinearLayout>
63 changes: 63 additions & 0 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ MultiSIM Toggle
~
~ Android app to enable or disable multiSIM functionality on multiSIM supporting ROMs
~
~ Copyright (c) 2018 Jhuan Reategui Solis
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<resources>

<!-- App details -->

<!-- Menu -->

<string name="action_exit">Salir</string>


<!-- Misc strings -->

<string name="disabled">Desactivado</string>
<string name="enabled">Activado</string>

<string name="tap_floating_button_to_enable">Toque el botón flotante para habilitar multiSIM</string>
<string name="tap_floating_button_to_disable">Toque el botón flotante para deshabilitar multiSIM</string>
<string name="warning">ADVERTENCIA</string>
<string name="note_details">Active la multisim solo si su ROM lo admite</string>

<string name="github_source">Codigo fuente en Github</string>
<string name="know_more">Saber mas sobre la aplicación</string>

<string name="disable_multisim">Disable MultiSIM</string>
<string name="disable_multisim_warning">
\nEl teléfono se reiniciará automáticamente después de que MultiSIM se desactive correctamente.
\n\nSe requieren permisos Root.\n</string>
<string name="continue_button">Continuar</string>
<string name="cancel">Cancelar</string>
<string name="cancelled">Cancelado</string>
<string name="multisim_disabled">MultiSIM Desactivado</string>
<string name="multisim_enabled">MultiSIM Activado</string>
<string name="unable_to_execute">Error...</string>

<string name="enable_multisim">Activar MultiSIM</string>
<string name="enable_multisim_warning">
\nEl teléfono se reiniciará automáticamente después de que MultiSIM se habilite correctamente.
\n\nSe requieren permisos Root.\n</string>

<string name="rebooting">Reiniciando...</string>
<string name="opening_developer_website">Abrir el sitio web del desarrollador</string>

</resources>
6 changes: 6 additions & 0 deletions app/src/main/res/values-w240dp/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="title_size">20sp</dimen>
<dimen name="subtitle_size">12sp</dimen>
<dimen name="information_size">10sp</dimen>
</resources>
8 changes: 7 additions & 1 deletion app/src/main/res/values-w820dp/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
<dimen name="title_size">44sp</dimen>
<dimen name="subtitle_size">30</dimen>
<dimen name="circle_with">102dp</dimen>
<dimen name="circle_height">102dp</dimen>
<dimen name="circle_margin">30dp</dimen>
<dimen name="information_size">24sp</dimen>

</resources>
6 changes: 6 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="title_size">34sp</dimen>
<dimen name="subtitle_size">18sp</dimen>
<dimen name="information_size">14sp</dimen>
<dimen name="circle_with">72dp</dimen>
<dimen name="circle_height">72dp</dimen>
<dimen name="circle_margin">20dp</dimen>
</resources>
Loading