mirror of
https://github.com/Dvorinka/1356.git
synced 2026-06-03 19:42:57 +00:00
fix and improve
This commit is contained in:
@@ -7,7 +7,7 @@ plugins {
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.example.lifetimer"
|
||||
namespace = "com.example.app1356"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
@@ -23,7 +23,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId = "com.example.lifetimer"
|
||||
applicationId = "com.example.app1356"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||
minSdk = flutter.minSdkVersion
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<application
|
||||
android:label="lifetimer"
|
||||
android:label="1356"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:usesCleartextTraffic="true">
|
||||
@@ -30,7 +36,7 @@
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="lifetimer" />
|
||||
<data android:scheme="app1356" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
package com.example.lifetimer
|
||||
package com.example.app1356
|
||||
|
||||
import android.appwidget.AppWidgetManager
|
||||
import android.content.Context
|
||||
import android.content.SharedPreferences
|
||||
import android.widget.RemoteViews
|
||||
import com.example.lifetimer.R
|
||||
import com.example.app1356.R
|
||||
import es.antonborri.home_widget.HomeWidgetProvider
|
||||
|
||||
class NextCountdownWidgetProvider : HomeWidgetProvider() {
|
||||
@@ -16,7 +16,7 @@ class NextCountdownWidgetProvider : HomeWidgetProvider() {
|
||||
) {
|
||||
appWidgetIds.forEach { widgetId ->
|
||||
val title = widgetData.getString("next_title", "Next goal")
|
||||
val subtitle = widgetData.getString("next_subtitle", "Open Lifetimer to see details")
|
||||
val subtitle = widgetData.getString("next_subtitle", "Open 1356 to see details")
|
||||
val timeLeft = widgetData.getString("next_time_left", "0 days left")
|
||||
|
||||
val views = RemoteViews(context.packageName, R.layout.next_countdown_widget).apply {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#1E1E1E" />
|
||||
<corners android:radius="16dp" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#33FFFFFF" />
|
||||
</shape>
|
||||
@@ -2,7 +2,8 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#121212"
|
||||
android:background="#1A1A1A"
|
||||
android:backgroundTint="#2A2A2A"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
@@ -13,6 +14,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Next goal"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end" />
|
||||
@@ -23,7 +25,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="0 days left"
|
||||
android:textColor="#FFCC66"
|
||||
android:textColor="#4CAF50"
|
||||
android:textStyle="bold"
|
||||
android:textSize="20sp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end" />
|
||||
@@ -33,7 +36,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="Open Lifetimer to see details"
|
||||
android:text="Open 1356 to see details"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="12sp"
|
||||
android:maxLines="2"
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<?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="@drawable/widget_background"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- 1356 Branding -->
|
||||
<TextView
|
||||
android:id="@+id/text_brand"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1356"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:background="#4CAF50"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<!-- Days Remaining -->
|
||||
<TextView
|
||||
android:id="@+id/text_days"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1356"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="36sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
<!-- Label -->
|
||||
<TextView
|
||||
android:id="@+id/text_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="days remaining"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Progress Bar -->
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:progressTint="#4CAF50"
|
||||
android:progressBackgroundTint="#33FFFFFF" />
|
||||
|
||||
<!-- Progress Text -->
|
||||
<TextView
|
||||
android:id="@+id/text_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0% Complete"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">1356</string>
|
||||
|
||||
<!-- Google Sign-In Configuration -->
|
||||
<string name="default_web_client_id" translatable="false">YOUR_WEB_CLIENT_ID_HERE</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user