Bug fixes, Start supporting google awareness API
This commit is contained in:
parent
42dbe7e235
commit
1494c2bc1e
@ -15,7 +15,7 @@ android {
|
||||
applicationId "com.tommasoberlose.anotherwidget"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 26
|
||||
versionCode 14
|
||||
versionCode 15
|
||||
versionName "1.1"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@ -48,4 +48,6 @@ dependencies {
|
||||
compile 'com.android.support:design:26.1.0'
|
||||
compile 'org.greenrobot:eventbus:3.0.0'
|
||||
compile 'com.android.support:recyclerview-v7:26.1.0'
|
||||
compile 'com.google.android.gms:play-services-awareness:11.4.2'
|
||||
compile 'joda-time:joda-time:2.9.9'
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":14},"path":"app-release.apk","properties":{"packageId":"com.tommasoberlose.anotherwidget","split":"","minSdkVersion":"19"}}]
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":15},"path":"app-release.apk","properties":{"packageId":"com.tommasoberlose.anotherwidget","split":"","minSdkVersion":"19"}}]
|
@ -14,6 +14,11 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
|
||||
<meta-data
|
||||
android:name="com.google.android.awareness.API_KEY"
|
||||
android:value="AIzaSyAMkqiQHTdZGOUxRd0ZEvvrIE1qN_3pJb4"/>
|
||||
|
||||
<activity
|
||||
android:name=".ui.activity.MainActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
|
@ -14,6 +14,7 @@ object Constants {
|
||||
val LOCATION_REQUEST_CODE = 2
|
||||
val CALENDAR_APP_REQUEST_CODE = 3
|
||||
val WEATHER_APP_REQUEST_CODE = 4
|
||||
val EVENT_APP_REQUEST_CODE = 6
|
||||
val WEATHER_PROVIDER_REQUEST_CODE = 5
|
||||
|
||||
|
||||
@ -48,6 +49,8 @@ object Constants {
|
||||
val PREF_WEATHER_APP_NAME = "PREF_WEATHER_APP_NAME"
|
||||
val PREF_WEATHER_APP_PACKAGE = "PREF_WEATHER_APP_PACKAGE"
|
||||
val PREF_WEATHER_PROVIDER_API_KEY = "PREF_WEATHER_PROVIDER_API_KEY"
|
||||
val PREF_EVENT_APP_NAME = "PREF_EVENT_APP_NAME"
|
||||
val PREF_EVENT_APP_PACKAGE = "PREF_EVENT_APP_PACKAGE"
|
||||
|
||||
val ACTION_EXTRA_OPEN_WEATHER_PROVIDER = "ACTION_EXTRA_OPEN_WEATHER_PROVIDER"
|
||||
|
||||
|
@ -10,7 +10,7 @@ import java.util.Date
|
||||
|
||||
class Event {
|
||||
var id: Int = 0
|
||||
var title: String? = null
|
||||
var title: String = ""
|
||||
var startDate: Long = 0
|
||||
var endDate: Long = 0
|
||||
var calendarID: Int = 0
|
||||
|
@ -28,10 +28,6 @@ class WeatherReceiver : BroadcastReceiver() {
|
||||
removeUpdates(context)
|
||||
WeatherUtil.updateWeather(context)
|
||||
|
||||
if (SP.getBoolean(Constants.PREF_SHOW_WEATHER, true)) {
|
||||
Util.showWeatherNotification(context, SP.getString(Constants.PREF_WEATHER_PROVIDER_API_KEY, "").equals(""))
|
||||
}
|
||||
|
||||
val am = context.getSystemService(Context.ALARM_SERVICE) as AlarmManager
|
||||
val i = Intent(context, WeatherReceiver::class.java)
|
||||
i.action = Constants.ACTION_WEATHER_UPDATE
|
||||
|
@ -198,6 +198,13 @@ class MainActivity : AppCompatActivity() {
|
||||
.commit()
|
||||
Util.updateWidget(this)
|
||||
updateSettings()
|
||||
} else if (requestCode == Constants.EVENT_APP_REQUEST_CODE && resultCode == Activity.RESULT_OK && data != null) {
|
||||
SP.edit()
|
||||
.putString(Constants.PREF_EVENT_APP_NAME, data.getStringExtra(Constants.RESULT_APP_NAME))
|
||||
.putString(Constants.PREF_EVENT_APP_PACKAGE, data.getStringExtra(Constants.RESULT_APP_PACKAGE))
|
||||
.commit()
|
||||
Util.updateWidget(this)
|
||||
updateSettings()
|
||||
} else if (requestCode == Constants.WEATHER_PROVIDER_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
|
||||
WeatherReceiver().setOneTimeUpdate(this)
|
||||
sendBroadcast(Intent(Constants.ACTION_WEATHER_UPDATE))
|
||||
@ -237,25 +244,7 @@ class MainActivity : AppCompatActivity() {
|
||||
val e = CalendarUtil.getNextEvent(this)
|
||||
|
||||
if (e.id != 0) {
|
||||
val difference = e.startDate - now.timeInMillis
|
||||
|
||||
|
||||
|
||||
if (difference > 1000 * 60) {
|
||||
var time = ""
|
||||
val hour = TimeUnit.MILLISECONDS.toHours(difference)
|
||||
if (hour > 0) {
|
||||
time = hour.toString() + getString(R.string.h_code) + " "
|
||||
}
|
||||
val minutes = TimeUnit.MILLISECONDS.toMinutes(difference - hour * 3600 * 1000)
|
||||
if (minutes > 0) {
|
||||
time += "" + minutes + getString(R.string.min_code)
|
||||
}
|
||||
|
||||
next_event.text = String.format("%s %s %s", e.title, getString(R.string.in_code), time)
|
||||
} else {
|
||||
next_event.text = String.format("%s", e.title)
|
||||
}
|
||||
next_event.text = Util.getDifferenceText(this, e.title, now.timeInMillis, e.startDate)
|
||||
|
||||
if (!e.allDay) {
|
||||
val startHour: String = if (SP.getString(Constants.PREF_HOUR_FORMAT, "12").equals("12")) Constants.badHourFormat.format(e.startDate) else Constants.goodHourFormat.format(e.startDate)
|
||||
@ -268,7 +257,9 @@ class MainActivity : AppCompatActivity() {
|
||||
val endCal = Calendar.getInstance()
|
||||
endCal.timeInMillis = e.endDate
|
||||
|
||||
if (startCal.get(Calendar.HOUR_OF_DAY) >= endCal.get(Calendar.HOUR_OF_DAY)) {
|
||||
if (startCal.get(Calendar.HOUR_OF_DAY) > endCal.get(Calendar.HOUR_OF_DAY)) {
|
||||
dayDiff++
|
||||
} else if (startCal.get(Calendar.HOUR_OF_DAY) == endCal.get(Calendar.HOUR_OF_DAY) && startCal.get(Calendar.MINUTE) >= endCal.get(Calendar.MINUTE)) {
|
||||
dayDiff++
|
||||
}
|
||||
var multipleDay: String = ""
|
||||
@ -455,6 +446,11 @@ class MainActivity : AppCompatActivity() {
|
||||
startActivityForResult(Intent(this, ChooseApplicationActivity::class.java), Constants.WEATHER_APP_REQUEST_CODE)
|
||||
}
|
||||
|
||||
event_app_label.text = SP.getString(Constants.PREF_EVENT_APP_NAME, getString(R.string.default_name))
|
||||
action_event_app.setOnClickListener {
|
||||
startActivityForResult(Intent(this, ChooseApplicationActivity::class.java), Constants.EVENT_APP_REQUEST_CODE)
|
||||
}
|
||||
|
||||
if (!SP.getString(Constants.PREF_WEATHER_PROVIDER_API_KEY, "").equals("")) {
|
||||
label_weather_provider_api_key.text = getString(R.string.settings_weather_provider_api_key_subtitle_all_set)
|
||||
alert_icon.visibility = View.GONE
|
||||
|
@ -34,7 +34,9 @@ class WeatherProviderActivity : AppCompatActivity() {
|
||||
val SP = PreferenceManager.getDefaultSharedPreferences(this)
|
||||
action_paste.setOnClickListener {
|
||||
val clipboard = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
||||
api_key.setText(clipboard.primaryClip.getItemAt(0).text)
|
||||
if (clipboard.primaryClip != null && clipboard.primaryClip.itemCount > 0) {
|
||||
api_key.setText(clipboard.primaryClip.getItemAt(0).text)
|
||||
}
|
||||
}
|
||||
|
||||
Util.collapse(button_container)
|
||||
|
@ -96,23 +96,7 @@ class TheWidget : AppWidgetProvider() {
|
||||
val e = CalendarUtil.getNextEvent(context)
|
||||
|
||||
if (e.id != 0) {
|
||||
val difference = e.startDate - now.timeInMillis
|
||||
|
||||
if (difference > 1000 * 60) {
|
||||
var time = ""
|
||||
val hour = TimeUnit.MILLISECONDS.toHours(difference)
|
||||
if (hour > 0) {
|
||||
time = hour.toString() + context.getString(R.string.h_code) + " "
|
||||
}
|
||||
val minutes = TimeUnit.MILLISECONDS.toMinutes(difference - hour * 3600 * 1000)
|
||||
if (minutes > 0) {
|
||||
time += "" + minutes + context.getString(R.string.min_code)
|
||||
}
|
||||
|
||||
views.setTextViewText(R.id.next_event, String.format("%s %s %s", e.title, context.getString(R.string.in_code), time))
|
||||
} else {
|
||||
views.setTextViewText(R.id.next_event, String.format("%s", e.title))
|
||||
}
|
||||
views.setTextViewText(R.id.next_event, Util.getDifferenceText(context, e.title, now.timeInMillis, e.startDate))
|
||||
|
||||
if (!e.allDay) {
|
||||
val startHour: String = if (SP.getString(Constants.PREF_HOUR_FORMAT, "12").equals("12")) Constants.badHourFormat.format(e.startDate) else Constants.goodHourFormat.format(e.startDate)
|
||||
@ -125,7 +109,9 @@ class TheWidget : AppWidgetProvider() {
|
||||
val endCal = Calendar.getInstance()
|
||||
endCal.timeInMillis = e.endDate
|
||||
|
||||
if (startCal.get(Calendar.HOUR_OF_DAY) >= endCal.get(Calendar.HOUR_OF_DAY)) {
|
||||
if (startCal.get(Calendar.HOUR_OF_DAY) > endCal.get(Calendar.HOUR_OF_DAY)) {
|
||||
dayDiff++
|
||||
} else if (startCal.get(Calendar.HOUR_OF_DAY) == endCal.get(Calendar.HOUR_OF_DAY) && startCal.get(Calendar.MINUTE) >= endCal.get(Calendar.MINUTE)) {
|
||||
dayDiff++
|
||||
}
|
||||
|
||||
@ -143,12 +129,8 @@ class TheWidget : AppWidgetProvider() {
|
||||
views.setViewVisibility(R.id.calendar_layout, View.VISIBLE)
|
||||
|
||||
|
||||
val uri = ContentUris.withAppendedId(Events.CONTENT_URI, e.id.toLong())
|
||||
val intent = Intent(Intent.ACTION_VIEW)
|
||||
.setData(uri)
|
||||
intent.putExtra("beginTime", e.startDate);
|
||||
intent.putExtra("endTime", e.endDate);
|
||||
val pIntent = PendingIntent.getActivity(context, widgetID, intent, 0)
|
||||
|
||||
val pIntent = PendingIntent.getActivity(context, widgetID, Util.getEventIntent(context, e), 0)
|
||||
views.setOnClickPendingIntent(R.id.main_layout, pIntent)
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ import android.util.TypedValue
|
||||
import android.content.Intent
|
||||
import android.content.ComponentName
|
||||
import android.preference.PreferenceManager
|
||||
import android.provider.CalendarContract
|
||||
import android.provider.Settings
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
@ -35,6 +36,9 @@ import android.view.animation.Transformation
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.Toast
|
||||
import com.tommasoberlose.anotherwidget.`object`.Constants
|
||||
import com.tommasoberlose.anotherwidget.`object`.Event
|
||||
import org.joda.time.DateTime
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
|
||||
/**
|
||||
@ -236,6 +240,32 @@ object Util {
|
||||
}
|
||||
}
|
||||
|
||||
fun getEventIntent(context: Context, e: Event): Intent {
|
||||
val SP = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
if (SP.getString(Constants.PREF_EVENT_APP_PACKAGE, "").equals("")) {
|
||||
val uri = ContentUris.withAppendedId(CalendarContract.Events.CONTENT_URI, e.id.toLong())
|
||||
val intent = Intent(Intent.ACTION_VIEW)
|
||||
.setData(uri)
|
||||
intent.putExtra("beginTime", e.startDate);
|
||||
intent.putExtra("endTime", e.endDate);
|
||||
return intent
|
||||
} else {
|
||||
val pm: PackageManager = context.packageManager
|
||||
return try {
|
||||
val intent: Intent = pm.getLaunchIntentForPackage(SP.getString(Constants.PREF_CALENDAR_APP_PACKAGE, ""))
|
||||
intent.addCategory(Intent.CATEGORY_LAUNCHER)
|
||||
intent
|
||||
} catch (ex: Exception) {
|
||||
val uri = ContentUris.withAppendedId(CalendarContract.Events.CONTENT_URI, e.id.toLong())
|
||||
val intent = Intent(Intent.ACTION_VIEW)
|
||||
.setData(uri)
|
||||
intent.putExtra("beginTime", e.startDate);
|
||||
intent.putExtra("endTime", e.endDate);
|
||||
intent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun getCapWordString(text: String): String {
|
||||
return try {
|
||||
val ar = text.split(" ")
|
||||
@ -360,4 +390,48 @@ object Util {
|
||||
fun getEmojiByUnicode(unicode: Int): String {
|
||||
return String(Character.toChars(unicode))
|
||||
}
|
||||
|
||||
fun getDifferenceText(context: Context, title: String, now: Long, start: Long): String {
|
||||
val nowDate = DateTime(now)
|
||||
val eventDate = DateTime(start)
|
||||
|
||||
val difference = start - now
|
||||
|
||||
if (difference < 0) {
|
||||
return String.format("%s", title)
|
||||
} else if (difference < 1000 * 60) {
|
||||
val minutes = TimeUnit.MILLISECONDS.toMinutes(difference)
|
||||
var time = ""
|
||||
if (minutes > 0) {
|
||||
time += "" + minutes + context.getString(R.string.min_code)
|
||||
}
|
||||
|
||||
return String.format("%s %s %s", title, context.getString(R.string.in_code), time)
|
||||
} else if (difference < 1000 * 60 * 6) {
|
||||
val hour = TimeUnit.MILLISECONDS.toHours(difference)
|
||||
var time = ""
|
||||
if (hour > 0) {
|
||||
time = if (hour > 1) {
|
||||
hour.toString() + context.getString(R.string.hs_code) + " "
|
||||
} else {
|
||||
hour.toString() + context.getString(R.string.h_code) + " "
|
||||
}
|
||||
}
|
||||
val minutes = TimeUnit.MILLISECONDS.toMinutes(difference - hour * 3600 * 1000)
|
||||
if (minutes > 0) {
|
||||
time += "" + minutes + context.getString(R.string.min_code)
|
||||
}
|
||||
|
||||
return String.format("%s %s %s", title, context.getString(R.string.in_code), time)
|
||||
} else if (eventDate.dayOfYear == nowDate.plusDays(1).dayOfYear) {
|
||||
return String.format("%s %s", title, context.getString(R.string.tomorrow))
|
||||
} else if (eventDate.dayOfYear == nowDate.dayOfYear) {
|
||||
return String.format("%s %s", title, context.getString(R.string.today))
|
||||
} else {
|
||||
val days = TimeUnit.MILLISECONDS.toDays(difference)
|
||||
return String.format("%s %s %s%s", title, context.getString(R.string.in_code), days, context.getString(R.string.day_char))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -21,6 +21,11 @@ import android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS
|
||||
import android.content.Intent
|
||||
import android.location.LocationManager
|
||||
import android.util.Log
|
||||
import com.google.android.gms.awareness.Awareness
|
||||
import com.google.android.gms.awareness.snapshot.WeatherResponse
|
||||
import com.google.android.gms.awareness.state.Weather
|
||||
import com.google.android.gms.tasks.OnFailureListener
|
||||
import com.google.android.gms.tasks.OnSuccessListener
|
||||
|
||||
|
||||
/**
|
||||
@ -32,8 +37,12 @@ object WeatherUtil {
|
||||
fun updateWeather(context: Context) {
|
||||
Util.showLocationNotification(context, false)
|
||||
val SP: SharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
|
||||
if (SP.getString(Constants.PREF_CUSTOM_LOCATION_ADD, "").equals("") || SP.getString(Constants.PREF_CUSTOM_LOCATION_LAT, "").equals("") || SP.getString(Constants.PREF_CUSTOM_LOCATION_LON, "").equals("")) {
|
||||
|
||||
newWeatherProvider(context)
|
||||
return
|
||||
/*
|
||||
if (!Util.checkGrantedPermission(context, Manifest.permission.ACCESS_FINE_LOCATION)) {
|
||||
return
|
||||
}
|
||||
@ -50,56 +59,44 @@ object WeatherUtil {
|
||||
} catch (ex: Exception) {
|
||||
}
|
||||
|
||||
if (!gpsEnabled && !networkEnabled) {
|
||||
if (!gpsEnabled && !networkEnabled && SP.getBoolean(Constants.PREF_SHOW_WEATHER, true)) {
|
||||
Util.showLocationNotification(context, true)
|
||||
} else {
|
||||
if (gpsEnabled) {
|
||||
getCurrentWeather(context, locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER))
|
||||
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0f, object : LocationListener {
|
||||
override fun onLocationChanged(location: Location) {
|
||||
locationManager.removeUpdates(this)
|
||||
getCurrentWeather(context, location)
|
||||
}
|
||||
|
||||
@SuppressLint("ApplySharedPref")
|
||||
override fun onProviderDisabled(p0: String?) {
|
||||
}
|
||||
|
||||
@SuppressLint("ApplySharedPref")
|
||||
override fun onProviderEnabled(p0: String?) {
|
||||
}
|
||||
|
||||
override fun onStatusChanged(p0: String?, p1: Int, p2: Bundle?) {
|
||||
}
|
||||
})
|
||||
val gpsLocation = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER)
|
||||
if (gpsLocation != null) {
|
||||
getCurrentWeather(context, gpsLocation)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (networkEnabled) {
|
||||
getCurrentWeather(context, locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER))
|
||||
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0f, object : LocationListener {
|
||||
override fun onLocationChanged(location: Location) {
|
||||
locationManager.removeUpdates(this)
|
||||
getCurrentWeather(context, location)
|
||||
}
|
||||
|
||||
@SuppressLint("ApplySharedPref")
|
||||
override fun onProviderDisabled(p0: String?) {
|
||||
}
|
||||
|
||||
@SuppressLint("ApplySharedPref")
|
||||
override fun onProviderEnabled(p0: String?) {
|
||||
}
|
||||
|
||||
override fun onStatusChanged(p0: String?, p1: Int, p2: Bundle?) {
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}*/
|
||||
} else {
|
||||
weatherNetworkRequest(context, SP.getString(Constants.PREF_CUSTOM_LOCATION_LAT, "").toDouble(), SP.getString(Constants.PREF_CUSTOM_LOCATION_LON, "").toDouble())
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("ApplySharedPref")
|
||||
fun newWeatherProvider(context: Context) {
|
||||
if (!Util.checkGrantedPermission(context, Manifest.permission.ACCESS_FINE_LOCATION)) {
|
||||
return
|
||||
}
|
||||
Awareness.getSnapshotClient(context).weather
|
||||
.addOnSuccessListener { weatherResponse ->
|
||||
val weather = weatherResponse.weather
|
||||
val SP: SharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
SP.edit()
|
||||
.putFloat(Constants.PREF_WEATHER_TEMP, weather.getTemperature(if (SP.getString(Constants.PREF_WEATHER_TEMP_UNIT, "F").equals("F")) Weather.FAHRENHEIT else Weather.CELSIUS))
|
||||
.putString(Constants.PREF_WEATHER_ICON, weather.conditions[0].toString())
|
||||
.putString(Constants.PREF_WEATHER_REAL_TEMP_UNIT, SP.getString(Constants.PREF_WEATHER_TEMP_UNIT, "F"))
|
||||
.commit()
|
||||
Util.updateWidget(context)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("ApplySharedPref")
|
||||
fun getCurrentWeather(context: Context, location: Location?) {
|
||||
if (location != null) {
|
||||
|
@ -69,7 +69,7 @@
|
||||
android:contentDescription="@string/custom_location_gps"
|
||||
android:id="@+id/action_default"
|
||||
android:src="@drawable/ic_action_reset"
|
||||
android:tint="@android:color/primary_text_light"/>
|
||||
android:tint="@android:color/black"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -67,7 +67,7 @@
|
||||
android:contentDescription="@string/custom_location_gps"
|
||||
android:id="@+id/action_geolocation"
|
||||
android:src="@drawable/ic_action_gps"
|
||||
android:tint="@android:color/primary_text_light"/>
|
||||
android:tint="@android:color/black"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -249,6 +249,30 @@
|
||||
android:id="@+id/calendar_app_label"
|
||||
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:paddingLeft="32dp"
|
||||
android:paddingRight="32dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/action_event_app"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/AnotherWidget.Settings.Title"
|
||||
android:text="@string/settings_event_app_title"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/event_app_label"
|
||||
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -73,7 +73,7 @@
|
||||
android:padding="12dp"
|
||||
android:id="@+id/action_paste"
|
||||
android:src="@drawable/ic_action_paste"
|
||||
android:tint="@android:color/primary_text_light"/>
|
||||
android:tint="@android:color/black"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -121,12 +121,12 @@
|
||||
android:gravity="start"
|
||||
style="@style/AnotherWidget.Main.Title"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@android:color/primary_text_light"/>
|
||||
android:textColor="@android:color/black"/>
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:id="@+id/action_open_info_text"
|
||||
android:tint="@android:color/primary_text_light"
|
||||
android:tint="@android:color/black"
|
||||
android:src="@drawable/ic_action_info"/>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
@ -140,7 +140,7 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/primary_text_light"
|
||||
android:textColor="@android:color/black"
|
||||
style="@style/AnotherWidget.Main.Subtitle"
|
||||
android:textSize="16sp"
|
||||
android:gravity="start"
|
||||
@ -164,7 +164,7 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/primary_text_light"
|
||||
android:textColor="@android:color/black"
|
||||
style="@style/AnotherWidget.Main.Subtitle"
|
||||
android:textSize="16sp"
|
||||
android:gravity="start"
|
||||
@ -180,7 +180,7 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/primary_text_light"
|
||||
android:textColor="@android:color/black"
|
||||
style="@style/AnotherWidget.Main.Subtitle"
|
||||
android:textSize="16sp"
|
||||
android:gravity="start"
|
||||
|
@ -19,6 +19,6 @@
|
||||
android:layout_weight="2"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="@android:color/primary_text_light"
|
||||
android:textColor="@android:color/black"
|
||||
style="@style/AnotherWidget.Settings.Title"/>
|
||||
</LinearLayout>
|
@ -5,5 +5,5 @@
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="16dp"
|
||||
android:textColor="@android:color/primary_text_light"
|
||||
android:textColor="@android:color/black"
|
||||
style="@style/AnotherWidget.Settings.Title"/>
|
@ -11,11 +11,11 @@
|
||||
android:id="@+id/title"
|
||||
style="@style/AnotherWidget.Main.Title"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@android:color/primary_text_light"/>
|
||||
android:textColor="@android:color/black"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/primary_text_light"
|
||||
android:textColor="@android:color/black"
|
||||
style="@style/AnotherWidget.Main.Subtitle"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginTop="16dp"
|
||||
|
@ -24,7 +24,7 @@
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:tint="@android:color/primary_text_light"
|
||||
android:tint="@android:color/black"
|
||||
android:src="@drawable/ic_action_refresh"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
@ -34,7 +34,7 @@
|
||||
android:background="@android:color/transparent"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:textColor="@android:color/primary_text_light" />
|
||||
android:textColor="@android:color/black" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -52,7 +52,7 @@
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:tint="@android:color/primary_text_light"
|
||||
android:tint="@android:color/black"
|
||||
android:src="@drawable/ic_action_rate"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
@ -61,7 +61,7 @@
|
||||
style="@style/AnotherWidget.Settings.Title"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:textColor="@android:color/primary_text_light"/>
|
||||
android:textColor="@android:color/black"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -78,7 +78,7 @@
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:tint="@android:color/primary_text_light"
|
||||
android:tint="@android:color/black"
|
||||
android:src="@drawable/ic_action_sms"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
@ -87,7 +87,7 @@
|
||||
style="@style/AnotherWidget.Settings.Title"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:textColor="@android:color/primary_text_light"/>
|
||||
android:textColor="@android:color/black"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -104,7 +104,7 @@
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:tint="@android:color/primary_text_light"
|
||||
android:tint="@android:color/black"
|
||||
android:src="@drawable/ic_action_share"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
@ -113,7 +113,7 @@
|
||||
style="@style/AnotherWidget.Settings.Title"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:textColor="@android:color/primary_text_light"/>
|
||||
android:textColor="@android:color/black"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -11,11 +11,11 @@
|
||||
android:gravity="start"
|
||||
style="@style/AnotherWidget.Main.Title"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@android:color/primary_text_light"/>
|
||||
android:textColor="@android:color/black"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/primary_text_light"
|
||||
android:textColor="@android:color/black"
|
||||
style="@style/AnotherWidget.Main.Subtitle"
|
||||
android:textSize="18sp"
|
||||
android:gravity="start"
|
||||
|
@ -18,7 +18,7 @@
|
||||
<string name="description_permission_location">Concedi l\'accesso alla tua posizione per vedere il meteo.</string>
|
||||
<string name="all_set_subtitle">Hai completato la configurazione! Rimani aggiornato.</string>
|
||||
<string name="action_about">Info</string>
|
||||
<string name="h_code">" ore"</string>
|
||||
<string name="h_code">" ora"</string>
|
||||
<string name="min_code">" min"</string>
|
||||
<string name="in_code">tra</string>
|
||||
<string name="action_project">Progetto</string>
|
||||
@ -94,4 +94,6 @@
|
||||
<string name="api_key_info_text"><![CDATA[Another widget è e rimarrà gratuita e senza banner pubblicitari.<BR /><BR />Però a causa del successo dell\'applicazione, sicuramente oltre ogni mia aspettativa, il provider del meteo non riesce a supportare il numero di richieste che arrivano (a causa dell\'utilizzo di un account gratuito).<BR /><BR />Sono costretto a chiedervi di registrarvi su OpenWeather.com; l\'operazione richiederà solo alcuni minuti e dopo non avrete più problemi con la fruizione delle informazioni sul meteo!<BR /><BR />Mi dispiace per l\'inconveniente ma continuate a supportarmi!!]]></string>
|
||||
<string name="well_done">Ben Fatto!</string>
|
||||
<string name="api_key_info_all_set"><![CDATA[Posso essere necessari fino a <b>dieci minuti</b> prima che la tua chiave sia attivata.<BR /><BR />Quindi <i>rilassati</i>! Il meteo verrà aggiornato non appena sarà disponibile!]]></string>
|
||||
<string name="hs_code">" ore"</string>
|
||||
<string name="tomorrow">domani</string>
|
||||
</resources>
|
@ -96,4 +96,8 @@
|
||||
<string name="action_open_provider">Go to OpenWeather.com</string>
|
||||
<string name="api_key_info_all_set"><![CDATA[It may take up to <b>ten minutes</b> before your API key is activated.<BR /><BR />So <i>relax</i>! The weather will be updated as soon as it is available!!]]></string>
|
||||
<string name="well_done">Well Done!</string>
|
||||
<string name="hs_code">h</string>
|
||||
<string name="tomorrow">tomorrow</string>
|
||||
<string name="today">oggi</string>
|
||||
<string name="settings_event_app_title">Tap on event opens</string>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user