forked from luiscib3r/todo
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Luis Ciber
committed
Sep 5, 2021
1 parent
393fe23
commit bf79ef9
Showing
114 changed files
with
1,310 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+22.4 KB
android/app/src/development/res/drawable-nodpi/app_widget_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions
5
android/app/src/development/res/drawable-v21/back_imagen_widget.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape android:shape="oval" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<solid android:color="#2196F3" /> | ||
</shape> |
5 changes: 5 additions & 0 deletions
5
android/app/src/development/res/drawable-v21/back_imagen_widget_button.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape android:shape="rectangle" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<solid android:color="#2196F3" /> | ||
</shape> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<item android:drawable="@drawable/bono" /> | ||
<item android:drawable="@drawable/corp" /> | ||
<item android:drawable="@drawable/datos" /> | ||
<item android:drawable="@drawable/saldo" /> | ||
|
||
</layer-list> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions
14
android/app/src/development/res/layout/close_float_widget.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?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="#aaFF0000" | ||
android:gravity="bottom" | ||
android:orientation="vertical"> | ||
|
||
<ImageButton | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="@android:color/transparent" | ||
android:src="@drawable/close" /> | ||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/float_window_layout" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="#7a000000"> | ||
|
||
|
||
</RelativeLayout> |
61 changes: 61 additions & 0 deletions
61
android/app/src/development/res/layout/todo_app_widget.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout android:padding="2.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" | ||
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
<RelativeLayout android:background="#424242" android:layout_width="fill_parent" android:layout_height="wrap_content"> | ||
<RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true"> | ||
<LinearLayout android:orientation="horizontal" android:id="@+id/widget_layout_top" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="5.0dip" android:layout_alignParentLeft="true" android:layout_alignParentTop="true"> | ||
<RelativeLayout android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginRight="5.0dip"> | ||
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:weightSum="3.0" android:layout_alignParentLeft="true"> | ||
<LinearLayout android:gravity="center" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0"> | ||
<LinearLayout android:id="@+id/todo_logo" android:gravity="center" android:layout_width="48.0dip" android:layout_height="48.0dip"> | ||
<ImageView android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@mipmap/launcher_icon" /> | ||
</LinearLayout> | ||
<LinearLayout android:id="@+id/todo_logo_text" android:gravity="center" android:layout_width="48.0dip" android:layout_height="48.0dip"> | ||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" android:text="TODO" android:textColor="#FFF" /> | ||
</LinearLayout> | ||
</LinearLayout> | ||
<LinearLayout android:gravity="center" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0"> | ||
<LinearLayout android:gravity="center" android:id="@+id/widget_button_net_datos" android:background="@drawable/back_imagen_widget_button" android:layout_width="32.0dip" android:layout_height="32.0dip"> | ||
<ImageView android:layout_width="22.0dip" android:layout_height="22.0dip" android:src="@mipmap/ic_widget_button_datos" /> | ||
</LinearLayout> | ||
</LinearLayout> | ||
<LinearLayout android:gravity="center" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0"> | ||
<LinearLayout android:gravity="center" android:id="@+id/widget_button_net_wifi" android:background="@drawable/back_imagen_widget_button" android:layout_width="32.0dip" android:layout_height="32.0dip"> | ||
<ImageView android:layout_width="22.0dip" android:layout_height="22.0dip" android:src="@mipmap/ic_widget_button_wifi" /> | ||
</LinearLayout> | ||
</LinearLayout> | ||
</LinearLayout> | ||
</RelativeLayout> | ||
</LinearLayout> | ||
<LinearLayout android:orientation="horizontal" android:id="@+id/linearLayout_button1" android:padding="15.0dip" android:paddingBottom="10.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:weightSum="5.0" android:layout_below="@id/widget_layout_top" android:layout_alignParentLeft="true"> | ||
<LinearLayout android:gravity="center" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0"> | ||
<LinearLayout android:gravity="center" android:id="@+id/widget_button_saldo" android:background="@drawable/back_imagen_widget" android:layout_width="@dimen/widget_button_back" android:layout_height="@dimen/widget_button_back"> | ||
<ImageView android:layout_width="@dimen/widget_button_icon" android:layout_height="@dimen/widget_button_icon" android:src="@mipmap/ic_main_list_item2" /> | ||
</LinearLayout> | ||
</LinearLayout> | ||
<LinearLayout android:gravity="center" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0"> | ||
<LinearLayout android:gravity="center" android:id="@+id/widget_button_bonos" android:background="@drawable/back_imagen_widget" android:layout_width="@dimen/widget_button_back" android:layout_height="@dimen/widget_button_back"> | ||
<ImageView android:layout_width="@dimen/widget_button_icon" android:layout_height="@dimen/widget_button_icon" android:src="@mipmap/ic_saldo_list_item4" /> | ||
</LinearLayout> | ||
</LinearLayout> | ||
<LinearLayout android:gravity="center" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0"> | ||
<LinearLayout android:gravity="center" android:id="@+id/widget_button_saldo_datos" android:background="@drawable/back_imagen_widget" android:layout_width="@dimen/widget_button_back" android:layout_height="@dimen/widget_button_back"> | ||
<ImageView android:layout_width="@dimen/widget_button_icon" android:layout_height="@dimen/widget_button_icon" android:src="@mipmap/ic_planes_datos_list_item1" /> | ||
</LinearLayout> | ||
</LinearLayout> | ||
<LinearLayout android:gravity="center" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0"> | ||
<LinearLayout android:gravity="center" android:id="@+id/widget_button_saldo_voz" android:background="@drawable/back_imagen_widget" android:layout_width="@dimen/widget_button_back" android:layout_height="@dimen/widget_button_back"> | ||
<ImageView android:layout_width="@dimen/widget_button_icon" android:layout_height="@dimen/widget_button_icon" android:src="@mipmap/ic_planes_voz_list_item1" /> | ||
</LinearLayout> | ||
</LinearLayout> | ||
<LinearLayout android:gravity="center" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0"> | ||
<LinearLayout android:gravity="center" android:id="@+id/widget_button_saldo_sms" android:background="@drawable/back_imagen_widget" android:layout_width="@dimen/widget_button_back" android:layout_height="@dimen/widget_button_back"> | ||
<ImageView android:layout_width="@dimen/widget_button_icon" android:layout_height="@dimen/widget_button_icon" android:src="@mipmap/ic_planes_sms_list_item1" /> | ||
</LinearLayout> | ||
</LinearLayout> | ||
</LinearLayout> | ||
</RelativeLayout> | ||
</RelativeLayout> | ||
</RelativeLayout> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-941 Bytes
(32%)
android/app/src/development/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.37 KB
(23%)
android/app/src/development/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.92 KB
(20%)
android/app/src/development/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-5.54 KB
(20%)
android/app/src/development/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.09 KB
android/app/src/development/res/mipmap-xxxhdpi/ic_main_list_item2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.62 KB
android/app/src/development/res/mipmap-xxxhdpi/ic_planes_datos_list_item1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.82 KB
android/app/src/development/res/mipmap-xxxhdpi/ic_planes_sms_list_item1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.07 KB
android/app/src/development/res/mipmap-xxxhdpi/ic_planes_voz_list_item1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.45 KB
android/app/src/development/res/mipmap-xxxhdpi/ic_saldo_list_item4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.02 KB
android/app/src/development/res/mipmap-xxxhdpi/ic_widget_button_apn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.61 KB
android/app/src/development/res/mipmap-xxxhdpi/ic_widget_button_datos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.8 KB
android/app/src/development/res/mipmap-xxxhdpi/ic_widget_button_wifi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<resources> | ||
|
||
<style name="ThemeOverlay.Android.AppWidgetContainer" parent=""> | ||
<item name="appWidgetBackgroundColor">@color/light_blue_900</item> | ||
<item name="appWidgetTextColor">@color/light_blue_200</item> | ||
</style> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<resources> | ||
<declare-styleable name="AppWidgetAttrs"> | ||
<attr name="appWidgetBackgroundColor" format="color" /> | ||
<attr name="appWidgetTextColor" format="color" /> | ||
</declare-styleable> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<resources> | ||
<color name="light_blue_50">#FFE1F5FE</color> | ||
<color name="light_blue_200">#FF81D4FA</color> | ||
<color name="light_blue_600">#FF039BE5</color> | ||
<color name="light_blue_900">#FF01579B</color> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
<!-- | ||
Refer to App Widget Documentation for margin information | ||
http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout | ||
--> | ||
<dimen name="widget_margin">0dp</dimen> | ||
<dimen name="widget_button_icon">25.0dip</dimen> | ||
<dimen name="widget_button_back">40.0dip</dimen> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="appwidget_text">EXAMPLE</string> | ||
<string name="add_widget">Add widget</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<resources> | ||
|
||
<style name="ThemeOverlay.Android.AppWidgetContainer" parent=""> | ||
<item name="appWidgetBackgroundColor">@color/light_blue_600</item> | ||
<item name="appWidgetTextColor">@color/light_blue_50</item> | ||
</style> | ||
</resources> |
10 changes: 10 additions & 0 deletions
10
android/app/src/development/res/xml/todo_app_widget_info.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:initialKeyguardLayout="@layout/todo_app_widget" | ||
android:initialLayout="@layout/todo_app_widget" | ||
android:minWidth="250dp" | ||
android:minHeight="110dp" | ||
android:previewImage="@drawable/app_widget_preview" | ||
android:resizeMode="horizontal|vertical" | ||
android:updatePeriodMillis="86400000" | ||
android:widgetCategory="home_screen"></appwidget-provider> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
android/app/src/main/java/com/cubanopensource/todo/TodoAppWidget.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
package com.cubanopensource.todo | ||
|
||
import android.annotation.SuppressLint | ||
import android.app.PendingIntent | ||
import android.appwidget.AppWidgetManager | ||
import android.appwidget.AppWidgetProvider | ||
import android.content.ComponentName | ||
import android.content.Context | ||
import android.content.Intent | ||
import android.net.Uri | ||
import android.os.Build | ||
import android.provider.Settings | ||
import android.widget.RemoteViews | ||
|
||
/** | ||
* Implementation of App Widget functionality. | ||
*/ | ||
class TodoAppWidget : AppWidgetProvider() { | ||
override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray) { | ||
// There may be multiple widgets active, so update all of them | ||
for (appWidgetId in appWidgetIds) { | ||
updateAppWidget(context, appWidgetManager, appWidgetId) | ||
} | ||
} | ||
|
||
override fun onEnabled(context: Context) { | ||
// Enter relevant functionality for when the first widget is created | ||
} | ||
|
||
override fun onDisabled(context: Context) { | ||
// Enter relevant functionality for when the last widget is disabled | ||
} | ||
} | ||
|
||
@SuppressLint("UnspecifiedImmutableFlag") | ||
internal fun updateAppWidget(context: Context, appWidgetManager: AppWidgetManager, appWidgetId: Int) { | ||
// Construct the RemoteViews object | ||
val views = RemoteViews(context.packageName, R.layout.todo_app_widget) | ||
|
||
val pendingIntentSaldo = PendingIntent.getActivity(context, 0, | ||
Intent(Intent.ACTION_CALL, Uri.parse("tel:*222${Uri.encode("#")}")), 0) | ||
|
||
val pendingIntentBono = PendingIntent.getActivity(context, 0, | ||
Intent(Intent.ACTION_CALL, Uri.parse("tel:*222*266${Uri.encode("#")}")), 0) | ||
|
||
val pendingIntentDatos = PendingIntent.getActivity(context, 0, | ||
Intent(Intent.ACTION_CALL, Uri.parse("tel:*222*328${Uri.encode("#")}")), 0) | ||
|
||
val pendingIntentVoz = PendingIntent.getActivity(context, 0, | ||
Intent(Intent.ACTION_CALL, Uri.parse("tel:*222*869${Uri.encode("#")}")), 0) | ||
|
||
val pendingIntentSms = PendingIntent.getActivity(context, 0, | ||
Intent(Intent.ACTION_CALL, Uri.parse("tel:*222*767${Uri.encode("#")}")), 0) | ||
|
||
val pendingIntentTODO = PendingIntent.getActivity(context, 0, | ||
Intent(context, MainActivity::class.java), 0) | ||
|
||
val pendingIntentWifi = PendingIntent.getActivity(context, 0, Intent(Settings.ACTION_WIFI_SETTINGS), 0) | ||
|
||
val dataUseIntent = Intent(Intent.ACTION_MAIN) | ||
dataUseIntent.component = (ComponentName( | ||
"com.android.settings", | ||
"com.android.settings.Settings\$DataUsageSummaryActivity" | ||
)) | ||
dataUseIntent.flags = (Intent.FLAG_ACTIVITY_NEW_TASK and Intent.FLAG_ACTIVITY_CLEAR_TOP) | ||
|
||
val pendingIntentData: PendingIntent = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) | ||
PendingIntent.getActivity(context, 0, Intent(Settings.ACTION_DATA_USAGE_SETTINGS), 0) | ||
else | ||
PendingIntent.getActivity(context, 0, dataUseIntent, 0) | ||
|
||
views.setOnClickPendingIntent(R.id.widget_button_saldo, pendingIntentSaldo) | ||
views.setOnClickPendingIntent(R.id.widget_button_bonos, pendingIntentBono) | ||
views.setOnClickPendingIntent(R.id.widget_button_saldo_datos, pendingIntentDatos) | ||
views.setOnClickPendingIntent(R.id.widget_button_saldo_voz, pendingIntentVoz) | ||
views.setOnClickPendingIntent(R.id.widget_button_saldo_sms, pendingIntentSms) | ||
views.setOnClickPendingIntent(R.id.todo_logo, pendingIntentTODO) | ||
views.setOnClickPendingIntent(R.id.widget_button_net_wifi, pendingIntentWifi) | ||
views.setOnClickPendingIntent(R.id.widget_button_net_datos, pendingIntentData) | ||
|
||
// Instruct the widget manager to update the widget | ||
appWidgetManager.updateAppWidget(appWidgetId, views) | ||
} |
6 changes: 0 additions & 6 deletions
6
android/app/src/main/kotlin/com/cubanopensource/MainActivity.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.