mirror of
https://github.com/hmalik144/Weather-apps.git
synced 2026-03-18 15:36:04 +00:00
Lint fixes (#19)
- Code inspection - Redundant resources removed - Resources moved the corresponding flavours - Deprecated dependencies upgraded - lint changes - circleci updated to capture screenshot
This commit is contained in:
@@ -12,11 +12,12 @@
|
||||
android:theme="@style/AppTheme"
|
||||
tools:node="merge">
|
||||
|
||||
<activity android:name=".ui.MainActivity"
|
||||
<activity
|
||||
android:name=".ui.MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:exported="true">
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
@@ -24,12 +25,14 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<receiver
|
||||
android:name=".notification.NotificationReceiver"
|
||||
android:parentActivityName=".MainActivity"
|
||||
android:exported="true"/>
|
||||
android:exported="true"
|
||||
android:parentActivityName=".MainActivity" />
|
||||
|
||||
<receiver android:name=".widget.NewAppWidget"
|
||||
<receiver
|
||||
android:name=".widget.NewAppWidget"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
|
||||
@@ -3,6 +3,6 @@ package com.appttude.h_mal.atlas_weather.notification
|
||||
import android.graphics.Bitmap
|
||||
|
||||
data class NotificationData(
|
||||
val temp: String,
|
||||
val icon: Bitmap
|
||||
val temp: String,
|
||||
val icon: Bitmap
|
||||
)
|
||||
@@ -34,7 +34,11 @@ class NotificationReceiver : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
kodein.baseKodein = (context.applicationContext as KodeinAware).kodein
|
||||
|
||||
if (ActivityCompat.checkSelfPermission(context, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
if (ActivityCompat.checkSelfPermission(
|
||||
context,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION
|
||||
) != PackageManager.PERMISSION_GRANTED
|
||||
) {
|
||||
context.displayToast("Please enable location permissions")
|
||||
return
|
||||
}
|
||||
@@ -52,22 +56,17 @@ class NotificationReceiver : BroadcastReceiver() {
|
||||
|
||||
val pendingIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT)
|
||||
|
||||
val builder = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
Notification.Builder(context, NOTIFICATION_CHANNEL_ID)
|
||||
} else {
|
||||
Notification.Builder(context)
|
||||
}
|
||||
val builder = Notification.Builder(context, NOTIFICATION_CHANNEL_ID)
|
||||
|
||||
val notification = builder.setContentTitle("Weather App")
|
||||
.setContentText(weather.current?.main + "°C")
|
||||
.setSmallIcon(R.mipmap.ic_notif) //change icon
|
||||
.setContentText(weather.current?.main + "°C")
|
||||
.setSmallIcon(R.mipmap.ic_notif) //change icon
|
||||
// .setLargeIcon(Icon.createWithResource(context, getImageResource(forecastItem.getCurrentForecast().getIconURL(), context)))
|
||||
.setAutoCancel(true)
|
||||
.setContentIntent(pendingIntent).build()
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
builder.setChannelId(NOTIFICATION_CHANNEL_ID)
|
||||
}
|
||||
val notificationManager = context!!.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
.setAutoCancel(true)
|
||||
.setContentIntent(pendingIntent).build()
|
||||
builder.setChannelId(NOTIFICATION_CHANNEL_ID)
|
||||
val notificationManager =
|
||||
context!!.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
notificationManager.notify(0, notification)
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package com.appttude.h_mal.atlas_weather.ui
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
abstract class BaseActivity : AppCompatActivity(){
|
||||
abstract class BaseActivity : AppCompatActivity() {
|
||||
|
||||
|
||||
}
|
||||
@@ -21,8 +21,10 @@ class WorldItemFragment : Fragment() {
|
||||
param1 = WorldItemFragmentArgs.fromBundle(requireArguments()).weatherDisplay
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?): View? {
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_home, container, false)
|
||||
}
|
||||
@@ -32,7 +34,7 @@ class WorldItemFragment : Fragment() {
|
||||
|
||||
val recyclerAdapter = WeatherRecyclerAdapter {
|
||||
val directions =
|
||||
WorldItemFragmentDirections.actionWorldItemFragmentToFurtherDetailsFragment(it)
|
||||
WorldItemFragmentDirections.actionWorldItemFragmentToFurtherDetailsFragment(it)
|
||||
navigateTo(directions)
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import kotlinx.android.synthetic.main.activity_further_info.*
|
||||
|
||||
|
||||
private const val WEATHER = "param1"
|
||||
|
||||
/**
|
||||
* A simple [Fragment] subclass.
|
||||
* Use the [FurtherInfoFragment.newInstance] factory method to
|
||||
@@ -24,7 +25,11 @@ class FurtherInfoFragment : Fragment() {
|
||||
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.activity_further_info, container, false)
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import androidx.annotation.RequiresApi
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.core.content.ContextCompat
|
||||
|
||||
interface DeclarationBuilder{
|
||||
interface DeclarationBuilder {
|
||||
val link: String
|
||||
val message: String
|
||||
|
||||
|
||||
@@ -10,10 +10,11 @@ import androidx.appcompat.app.AlertDialog
|
||||
class PermissionsDeclarationDialog(context: Context) : BaseDeclarationDialog(context) {
|
||||
|
||||
override val link: String = "https://sites.google.com/view/hmaldev/home/monochrome"
|
||||
override val message: String = "Hi, thank you for downloading my app. Google play isn't letting me upload my app to the Playstore until I have a privacy declaration :(. My app is basically used to demonstrate my code=ing to potential employers and others. I do NOT store or process any information. The location permission in the app is there just to provide the end user with weather data."
|
||||
override val message: String =
|
||||
"Hi, thank you for downloading my app. Google play isn't letting me upload my app to the Playstore until I have a privacy declaration :(. My app is basically used to demonstrate my code=ing to potential employers and others. I do NOT store or process any information. The location permission in the app is there just to provide the end user with weather data."
|
||||
}
|
||||
|
||||
abstract class BaseDeclarationDialog(val context: Context): DeclarationBuilder {
|
||||
abstract class BaseDeclarationDialog(val context: Context) : DeclarationBuilder {
|
||||
abstract override val link: String
|
||||
abstract override val message: String
|
||||
|
||||
@@ -23,14 +24,14 @@ abstract class BaseDeclarationDialog(val context: Context): DeclarationBuilder {
|
||||
val myMessage = buildMessage()
|
||||
|
||||
val builder = AlertDialog.Builder(context)
|
||||
.setPositiveButton("agree") { _, _ ->
|
||||
agreeCallback()
|
||||
}
|
||||
.setNegativeButton("disagree") { _, _ ->
|
||||
disagreeCallback()
|
||||
}
|
||||
.setMessage(myMessage)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("agree") { _, _ ->
|
||||
agreeCallback()
|
||||
}
|
||||
.setNegativeButton("disagree") { _, _ ->
|
||||
disagreeCallback()
|
||||
}
|
||||
.setMessage(myMessage)
|
||||
.setCancelable(false)
|
||||
|
||||
dialog = builder.create()
|
||||
dialog.show()
|
||||
|
||||
@@ -3,4 +3,4 @@ package com.appttude.h_mal.atlas_weather.ui.home.adapter
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
class EmptyViewHolder(itemView: View): RecyclerView.ViewHolder(itemView)
|
||||
class EmptyViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
|
||||
@@ -16,7 +16,7 @@ class ViewHolderCurrent(listItemView: View) : RecyclerView.ViewHolder(listItemVi
|
||||
var avgTempTV: TextView = listItemView.findViewById(R.id.temp_main_4)
|
||||
var tempUnit: TextView = listItemView.findViewById(R.id.temp_unit_4)
|
||||
|
||||
fun bindData(weather: WeatherDisplay?){
|
||||
fun bindData(weather: WeatherDisplay?) {
|
||||
locationTV.text = weather?.displayName
|
||||
conditionTV.text = weather?.description
|
||||
weatherIV.loadImage(weather?.iconURL)
|
||||
|
||||
@@ -14,7 +14,7 @@ internal class ViewHolderFurtherDetails(itemView: View) : RecyclerView.ViewHolde
|
||||
var humidity: TextView = itemView.findViewById(R.id.humidity_)
|
||||
var clouds: TextView = itemView.findViewById(R.id.clouds_)
|
||||
|
||||
fun bindData(weather: WeatherDisplay?){
|
||||
fun bindData(weather: WeatherDisplay?) {
|
||||
windSpeed.text = weather?.windSpeed
|
||||
windDirection.text = weather?.windDirection
|
||||
precipitation.text = weather?.precipitation
|
||||
|
||||
@@ -10,30 +10,33 @@ import com.appttude.h_mal.atlas_weather.model.forecast.WeatherDisplay
|
||||
import com.appttude.h_mal.atlas_weather.utils.generateView
|
||||
|
||||
class WeatherRecyclerAdapter(
|
||||
val itemClick: (Forecast) -> Unit
|
||||
val itemClick: (Forecast) -> Unit
|
||||
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
var weather: WeatherDisplay? = null
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
fun addCurrent(current: WeatherDisplay){
|
||||
fun addCurrent(current: WeatherDisplay) {
|
||||
weather = current
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
return when (getDataType(viewType)){
|
||||
return when (getDataType(viewType)) {
|
||||
is ViewType.Empty -> {
|
||||
val emptyViewHolder = View(parent.context)
|
||||
EmptyViewHolder(emptyViewHolder)
|
||||
}
|
||||
|
||||
is ViewType.Current -> {
|
||||
val viewCurrent = parent.generateView(R.layout.list_item_current)
|
||||
ViewHolderCurrent(viewCurrent)
|
||||
}
|
||||
|
||||
is ViewType.Forecast -> {
|
||||
val viewForecast = parent.generateView(R.layout.list_item_forecast)
|
||||
ViewHolderForecast(viewForecast)
|
||||
}
|
||||
|
||||
is ViewType.Further -> {
|
||||
val viewFurther = parent.generateView(R.layout.list_item_further)
|
||||
ViewHolderFurtherDetails(viewFurther)
|
||||
@@ -41,7 +44,7 @@ class WeatherRecyclerAdapter(
|
||||
}
|
||||
}
|
||||
|
||||
sealed class ViewType{
|
||||
sealed class ViewType {
|
||||
object Empty : ViewType()
|
||||
object Current : ViewType()
|
||||
object Forecast : ViewType()
|
||||
@@ -49,7 +52,7 @@ class WeatherRecyclerAdapter(
|
||||
}
|
||||
|
||||
private fun getDataType(type: Int): ViewType {
|
||||
return when (type){
|
||||
return when (type) {
|
||||
0 -> ViewType.Empty
|
||||
1 -> ViewType.Current
|
||||
2 -> ViewType.Forecast
|
||||
@@ -61,23 +64,25 @@ class WeatherRecyclerAdapter(
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if (weather == null) return 0
|
||||
|
||||
return when(position){
|
||||
return when (position) {
|
||||
0 -> 1
|
||||
in 1 until itemCount -2 -> 2
|
||||
in 1 until itemCount - 2 -> 2
|
||||
itemCount - 1 -> 3
|
||||
else -> 0
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
when (getDataType(getItemViewType(position))){
|
||||
when (getDataType(getItemViewType(position))) {
|
||||
is ViewType.Empty -> {
|
||||
holder as EmptyViewHolder
|
||||
}
|
||||
|
||||
is ViewType.Current -> {
|
||||
val viewHolderCurrent = holder as ViewHolderCurrent
|
||||
viewHolderCurrent.bindData(weather)
|
||||
}
|
||||
|
||||
is ViewType.Forecast -> {
|
||||
val viewHolderForecast = holder as ViewHolderForecast
|
||||
|
||||
@@ -88,6 +93,7 @@ class WeatherRecyclerAdapter(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
is ViewType.Further -> {
|
||||
val viewHolderCurrent = holder as ViewHolderFurtherDetails
|
||||
viewHolderCurrent.bindData(weather)
|
||||
@@ -98,7 +104,7 @@ class WeatherRecyclerAdapter(
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
if (weather == null) return 0
|
||||
return 2 + (weather?.forecast?.size?: 0)
|
||||
return 2 + (weather?.forecast?.size ?: 0)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,11 +34,16 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||
setupNotificationBroadcaster(requireContext())
|
||||
}
|
||||
|
||||
if (key == "widget_black_background"){
|
||||
if (key == "widget_black_background") {
|
||||
val intent = Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE)
|
||||
val widgetManager = AppWidgetManager.getInstance(requireContext())
|
||||
val ids =
|
||||
widgetManager.getAppWidgetIds(ComponentName(requireContext(), NewAppWidget::class.java))
|
||||
widgetManager.getAppWidgetIds(
|
||||
ComponentName(
|
||||
requireContext(),
|
||||
NewAppWidget::class.java
|
||||
)
|
||||
)
|
||||
AppWidgetManager.getInstance(requireContext())
|
||||
.notifyAppWidgetViewDataChanged(ids, R.id.whole_widget_view)
|
||||
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, ids)
|
||||
@@ -50,12 +55,19 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||
fun setupNotificationBroadcaster(context: Context) {
|
||||
val alarmManager = context.getSystemService(Context.ALARM_SERVICE) as AlarmManager
|
||||
val notificationIntent = Intent(context, NotificationReceiver::class.java)
|
||||
val broadcast = PendingIntent.getBroadcast(context, 100, notificationIntent,
|
||||
PendingIntent.FLAG_UPDATE_CURRENT)
|
||||
val broadcast = PendingIntent.getBroadcast(
|
||||
context, 100, notificationIntent,
|
||||
PendingIntent.FLAG_UPDATE_CURRENT
|
||||
)
|
||||
val cal: Calendar = Calendar.getInstance()
|
||||
cal.set(Calendar.HOUR_OF_DAY, 6)
|
||||
cal.set(Calendar.MINUTE, 8)
|
||||
cal.set(Calendar.SECOND, 5)
|
||||
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, cal.timeInMillis, AlarmManager.INTERVAL_DAY, broadcast)
|
||||
alarmManager.setRepeating(
|
||||
AlarmManager.RTC_WAKEUP,
|
||||
cal.timeInMillis,
|
||||
AlarmManager.INTERVAL_DAY,
|
||||
broadcast
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ class AddLocationFragment : BaseFragment(R.layout.activity_add_forecast) {
|
||||
|
||||
submit.setOnClickListener {
|
||||
val locationName = location_name_tv.text?.trim()?.toString()
|
||||
if (locationName.isNullOrBlank()){
|
||||
if (locationName.isNullOrBlank()) {
|
||||
submit.error = "Location cannot be blank"
|
||||
return@setOnClickListener
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class AddLocationFragment : BaseFragment(R.layout.activity_add_forecast) {
|
||||
viewModel.operationError.observe(viewLifecycleOwner, errorObserver())
|
||||
|
||||
viewModel.operationComplete.observe(viewLifecycleOwner) {
|
||||
it?.getContentIfNotHandled()?.let {message ->
|
||||
it?.getContentIfNotHandled()?.let { message ->
|
||||
displayToast(message)
|
||||
}
|
||||
goBack()
|
||||
|
||||
@@ -1,22 +1,17 @@
|
||||
package com.appttude.h_mal.atlas_weather.ui.world
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.lifecycle.observe
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.appttude.h_mal.atlas_weather.R
|
||||
import com.appttude.h_mal.atlas_weather.utils.navigateTo
|
||||
import com.appttude.h_mal.atlas_weather.viewmodel.ApplicationViewModelFactory
|
||||
import com.appttude.h_mal.atlas_weather.viewmodel.WorldViewModel
|
||||
import com.appttude.h_mal.monoWeather.ui.BaseFragment
|
||||
import kotlinx.android.synthetic.main.fragment_add_location.*
|
||||
import org.kodein.di.KodeinAware
|
||||
import org.kodein.di.android.x.kodein
|
||||
import org.kodein.di.generic.instance
|
||||
import kotlinx.android.synthetic.atlasWeather.fragment_add_location.floatingActionButton
|
||||
import kotlinx.android.synthetic.atlasWeather.fragment_add_location.progressBar2
|
||||
import kotlinx.android.synthetic.atlasWeather.fragment_add_location.world_recycler
|
||||
|
||||
|
||||
/**
|
||||
@@ -29,9 +24,9 @@ class WorldFragment : BaseFragment(R.layout.fragment_add_location) {
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
val recyclerAdapter = WorldRecyclerAdapter{
|
||||
val recyclerAdapter = WorldRecyclerAdapter {
|
||||
val direction =
|
||||
WorldFragmentDirections.actionWorldFragmentToWorldItemFragment(it)
|
||||
WorldFragmentDirections.actionWorldFragmentToWorldItemFragment(it)
|
||||
navigateTo(direction)
|
||||
}
|
||||
|
||||
@@ -44,7 +39,7 @@ class WorldFragment : BaseFragment(R.layout.fragment_add_location) {
|
||||
recyclerAdapter.addCurrent(it)
|
||||
}
|
||||
|
||||
floatingActionButton.setOnClickListener{
|
||||
floatingActionButton.setOnClickListener {
|
||||
navigateTo(R.id.action_worldFragment_to_addLocationFragment)
|
||||
}
|
||||
|
||||
|
||||
@@ -11,22 +11,23 @@ import com.appttude.h_mal.atlas_weather.utils.generateView
|
||||
import com.appttude.h_mal.atlas_weather.utils.loadImage
|
||||
|
||||
class WorldRecyclerAdapter(
|
||||
val itemClick: (WeatherDisplay) -> Unit
|
||||
val itemClick: (WeatherDisplay) -> Unit
|
||||
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
var weather: MutableList<WeatherDisplay> = mutableListOf()
|
||||
|
||||
fun addCurrent(current: List<WeatherDisplay>){
|
||||
fun addCurrent(current: List<WeatherDisplay>) {
|
||||
weather.clear()
|
||||
weather.addAll(current)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
return when (getDataType(viewType)){
|
||||
return when (getDataType(viewType)) {
|
||||
is ViewType.Empty -> {
|
||||
val emptyViewHolder = View(parent.context)
|
||||
EmptyViewHolder(emptyViewHolder)
|
||||
}
|
||||
|
||||
is ViewType.Current -> {
|
||||
val viewCurrent = parent.generateView(R.layout.db_list_item)
|
||||
WorldHolderCurrent(viewCurrent)
|
||||
@@ -34,13 +35,13 @@ class WorldRecyclerAdapter(
|
||||
}
|
||||
}
|
||||
|
||||
sealed class ViewType{
|
||||
sealed class ViewType {
|
||||
object Empty : ViewType()
|
||||
object Current : ViewType()
|
||||
}
|
||||
|
||||
private fun getDataType(type: Int): ViewType{
|
||||
return when (type){
|
||||
private fun getDataType(type: Int): ViewType {
|
||||
return when (type) {
|
||||
0 -> ViewType.Empty
|
||||
1 -> ViewType.Current
|
||||
else -> ViewType.Empty
|
||||
@@ -52,11 +53,12 @@ class WorldRecyclerAdapter(
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
when (getDataType(getItemViewType(position))){
|
||||
when (getDataType(getItemViewType(position))) {
|
||||
is ViewType.Empty -> {
|
||||
holder as EmptyViewHolder
|
||||
|
||||
}
|
||||
|
||||
is ViewType.Current -> {
|
||||
val viewHolderCurrent = holder as WorldHolderCurrent
|
||||
viewHolderCurrent.bindData(weather[position])
|
||||
@@ -79,7 +81,7 @@ class WorldRecyclerAdapter(
|
||||
var avgTempTV: TextView = listItemView.findViewById(R.id.db_main_temp)
|
||||
// var tempUnit: TextView = listItemView.findViewById(R.id.db_minor_temp)
|
||||
|
||||
fun bindData(weather: WeatherDisplay?){
|
||||
fun bindData(weather: WeatherDisplay?) {
|
||||
locationTV.text = weather?.location
|
||||
conditionTV.text = weather?.description
|
||||
weatherIV.loadImage(weather?.iconURL)
|
||||
@@ -90,7 +92,6 @@ class WorldRecyclerAdapter(
|
||||
}
|
||||
|
||||
|
||||
|
||||
internal class EmptyViewHolder(itemView: View): RecyclerView.ViewHolder(itemView)
|
||||
internal class EmptyViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
|
||||
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:startColor="@color/colour_two"
|
||||
android:centerColor="@color/colour_three"
|
||||
android:endColor="@color/colour_four"
|
||||
android:type="linear"
|
||||
android:angle="45"/>
|
||||
<gradient
|
||||
android:angle="45"
|
||||
android:centerColor="@color/colour_three"
|
||||
android:endColor="@color/colour_four"
|
||||
android:startColor="@color/colour_two"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
|
||||
16
app/src/atlasWeather/res/drawable/ic_launcher_foreground.xml
Normal file
16
app/src/atlasWeather/res/drawable/ic_launcher_foreground.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<group
|
||||
android:scaleX="2.61"
|
||||
android:scaleY="2.61"
|
||||
android:translateX="22.68"
|
||||
android:translateY="22.68">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM11,19.93c-3.95,-0.49 -7,-3.85 -7,-7.93 0,-0.62 0.08,-1.21 0.21,-1.79L9,15v1c0,1.1 0.9,2 2,2v1.93zM17.9,17.39c-0.26,-0.81 -1,-1.39 -1.9,-1.39h-1v-3c0,-0.55 -0.45,-1 -1,-1L8,12v-2h2c0.55,0 1,-0.45 1,-1L11,7h2c1.1,0 2,-0.9 2,-2v-0.41c2.93,1.19 5,4.06 5,7.41 0,2.08 -0.8,3.97 -2.1,5.39z" />
|
||||
</group>
|
||||
</vector>
|
||||
55
app/src/atlasWeather/res/layout/activity_add_forecast.xml
Normal file
55
app/src/atlasWeather/res/layout/activity_add_forecast.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_margin="24dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/location_name_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="2"
|
||||
android:ems="10"
|
||||
android:hint="@string/location_name"
|
||||
android:inputType="textPersonName"
|
||||
android:maxLines="2"
|
||||
tools:text="Greater London" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/submit"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:text="@string/submit"
|
||||
android:textColor="#ffffff"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/black"
|
||||
android:visibility="gone">
|
||||
|
||||
<ProgressBar
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -3,11 +3,13 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -20,13 +22,15 @@
|
||||
android:layout_weight="2">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/somethingnew"
|
||||
style="@style/icon_style__further_deatils" />
|
||||
style="@style/icon_style__further_details"
|
||||
android:src="@drawable/somethingnew" />
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -55,6 +59,7 @@
|
||||
android:layout_weight="3"
|
||||
tools:text="11" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
@@ -72,6 +77,7 @@
|
||||
android:layout_weight="3"
|
||||
tools:text="11" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
@@ -96,6 +102,7 @@
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
@@ -107,13 +114,14 @@
|
||||
android:layout_weight="2">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/breeze"
|
||||
style="@style/icon_style__further_deatils" />
|
||||
style="@style/icon_style__further_details"
|
||||
android:src="@drawable/breeze" />
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_weight="2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -137,12 +145,12 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="7mph"
|
||||
/>
|
||||
android:text="7mph" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
@@ -154,13 +162,15 @@
|
||||
android:layout_weight="2">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/water_drop"
|
||||
style="@style/icon_style__further_deatils" />
|
||||
style="@style/icon_style__further_details"
|
||||
android:src="@drawable/water_drop" />
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_weight="2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -187,27 +197,26 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="85%"
|
||||
/>
|
||||
android:text="85%" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:text="Precip: " />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/preciptext"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="11mm"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:text="Precip: " />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/preciptext"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="11mm" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -215,6 +224,7 @@
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
@@ -226,13 +236,15 @@
|
||||
android:layout_weight="2">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/sunrise"
|
||||
style="@style/icon_style__further_deatils" />
|
||||
style="@style/icon_style__further_details"
|
||||
android:src="@drawable/sunrise" />
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_weight="2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -245,22 +257,21 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:text="UV: " />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:text="UV: " />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/uvtext"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="7"
|
||||
/>
|
||||
android:id="@+id/uvtext"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="7" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -278,9 +289,9 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="05:30am"
|
||||
/>
|
||||
android:text="05:30am" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
@@ -296,8 +307,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="06:12pm"
|
||||
/>
|
||||
android:text="06:12pm" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main_content"
|
||||
@@ -17,19 +16,19 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay"
|
||||
tools:title="Atlas Weather"/>
|
||||
tools:title="Atlas Weather" />
|
||||
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
app:backgroundTint="@android:color/transparent"
|
||||
app:elevation="0dp"
|
||||
app:itemIconTint="@android:color/background_light"
|
||||
app:itemTextColor="@android:color/background_light"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:backgroundTint="@android:color/transparent"
|
||||
app:elevation="0dp"
|
||||
app:menu="@menu/tabs_menu" />
|
||||
|
||||
<fragment
|
||||
@@ -42,7 +41,7 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar"
|
||||
tools:layout="@layout/fragment_home"/>
|
||||
tools:layout="@layout/fragment_home" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_circular"
|
||||
|
||||
45
app/src/atlasWeather/res/layout/fragment_add_location.xml
Normal file
45
app/src/atlasWeather/res/layout/fragment_add_location.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.appttude.h_mal.atlas_weather.ui.world.AddLocationFragment">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/world_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="@null"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/floatingActionButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginBottom="36dp"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/image_string"
|
||||
android:focusable="true"
|
||||
android:tint="@android:color/white"
|
||||
app:elevation="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:srcCompat="@android:drawable/ic_input_add" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar2"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -20,8 +20,8 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="6dp"
|
||||
android:tint="@color/colorAccent"
|
||||
android:src="@drawable/location_flag" />
|
||||
android:src="@drawable/location_flag"
|
||||
android:tint="@color/colorAccent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/location_main_4"
|
||||
@@ -58,9 +58,9 @@
|
||||
android:textSize="30sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_below="@id/location_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/location_holder"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
@@ -84,8 +84,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_weight="6"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/condition_main_4"
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
app:cardElevation="0dp"
|
||||
card_view:cardPreventCornerOverlap="false"
|
||||
card_view:cardUseCompatPadding="true">
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
android:layout_weight="2">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/breeze"
|
||||
style="@style/icon_style__further_deatils" />
|
||||
style="@style/icon_style__further_details"
|
||||
android:src="@drawable/breeze" />
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -50,8 +50,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="11kmp"
|
||||
/>
|
||||
android:text="11kmp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -70,8 +69,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="SW"
|
||||
/>
|
||||
android:text="SW" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -92,7 +90,7 @@
|
||||
android:layout_weight="2">
|
||||
|
||||
<ImageView
|
||||
style="@style/icon_style__further_deatils"
|
||||
style="@style/icon_style__further_details"
|
||||
android:src="@drawable/water_drop" />
|
||||
</FrameLayout>
|
||||
|
||||
@@ -126,8 +124,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="85%"
|
||||
/>
|
||||
android:text="85%" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -145,8 +142,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="11mm"
|
||||
/>
|
||||
android:text="11mm" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -167,7 +163,7 @@
|
||||
android:layout_weight="2">
|
||||
|
||||
<ImageView
|
||||
style="@style/icon_style__further_deatils"
|
||||
style="@style/icon_style__further_details"
|
||||
android:src="@drawable/cloud_symbol" />
|
||||
</FrameLayout>
|
||||
|
||||
@@ -202,8 +198,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="85%"
|
||||
/>
|
||||
android:text="85%" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
@@ -76,11 +76,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_current_location"
|
||||
style="@style/widget_light_home_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:maxWidth="180dp"
|
||||
android:maxLines="1"
|
||||
style="@style/widget_light_home_text"
|
||||
tools:text="Hammersmith Bridge" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
BIN
app/src/atlasWeather/res/mipmap-hdpi/ic_notif.png
Normal file
BIN
app/src/atlasWeather/res/mipmap-hdpi/ic_notif.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 671 B |
BIN
app/src/atlasWeather/res/mipmap-mdpi/ic_notif.png
Normal file
BIN
app/src/atlasWeather/res/mipmap-mdpi/ic_notif.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 881 B |
BIN
app/src/atlasWeather/res/mipmap-xhdpi/ic_notif.png
Normal file
BIN
app/src/atlasWeather/res/mipmap-xhdpi/ic_notif.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/atlasWeather/res/mipmap-xxhdpi/ic_notif.png
Normal file
BIN
app/src/atlasWeather/res/mipmap-xxhdpi/ic_notif.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
app/src/atlasWeather/res/mipmap-xxxhdpi/ic_notif.png
Normal file
BIN
app/src/atlasWeather/res/mipmap-xxxhdpi/ic_notif.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
@@ -32,7 +32,7 @@
|
||||
tools:layout="@layout/fragment__two">
|
||||
<action
|
||||
android:id="@+id/action_worldFragment_to_addLocationFragment"
|
||||
app:destination="@id/addLocationFragment"/>
|
||||
app:destination="@id/addLocationFragment" />
|
||||
<action
|
||||
android:id="@+id/action_worldFragment_to_worldItemFragment"
|
||||
app:destination="@id/worldItemFragment" />
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<resources>
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
<string name="min">Min:</string>
|
||||
<string name="max">Max:</string>
|
||||
<string name="average">Average:</string>
|
||||
<string name="floating_action_button">Floating Action Button</string>
|
||||
<string name="_11mm">11mm</string>
|
||||
</resources>
|
||||
@@ -3,13 +3,13 @@
|
||||
android:configure="com.appttude.h_mal.atlas_weather.ui.widget.WidgetLocationPermissionActivity"
|
||||
android:initialKeyguardLayout="@layout/weather_app_widget"
|
||||
android:initialLayout="@layout/weather_app_widget"
|
||||
android:minHeight="110.0dp"
|
||||
android:minWidth="320.0dp"
|
||||
android:minHeight="110.0dp"
|
||||
android:minResizeWidth="320.0dp"
|
||||
android:minResizeHeight="110.0dp"
|
||||
android:previewImage="@drawable/widget_screenshot"
|
||||
android:updatePeriodMillis="1800000"
|
||||
android:resizeMode="vertical"
|
||||
android:updatePeriodMillis="1800000"
|
||||
android:widgetCategory="home_screen">
|
||||
|
||||
</appwidget-provider>
|
||||
@@ -1,32 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- <PreferenceCategory android:title="Units">-->
|
||||
<!-- <ListPreference-->
|
||||
<!-- android:defaultValue="°C"-->
|
||||
<!-- android:entries="@array/list_preference_temp"-->
|
||||
<!-- android:entryValues="@array/list_preference_temp"-->
|
||||
<!-- android:key="temp_units"-->
|
||||
<!-- android:title="Temperature Units" />-->
|
||||
<!-- <ListPreference-->
|
||||
<!-- android:defaultValue="kph"-->
|
||||
<!-- android:entries="@array/list_preference_wind"-->
|
||||
<!-- android:entryValues="@array/list_preference_wind_values"-->
|
||||
<!-- android:key="wind_units"-->
|
||||
<!-- android:title="Wind Units" />-->
|
||||
<!-- <ListPreference-->
|
||||
<!-- android:defaultValue="mm"-->
|
||||
<!-- android:entries="@array/list_preference_precip"-->
|
||||
<!-- android:entryValues="@array/list_preference_precip_values"-->
|
||||
<!-- android:key="precip_units"-->
|
||||
<!-- android:title="Precipitation Units" />-->
|
||||
<!-- <ListPreference-->
|
||||
<!-- android:defaultValue="km"-->
|
||||
<!-- android:entries="@array/list_preference_vis"-->
|
||||
<!-- android:entryValues="@array/list_preference_vis_values"-->
|
||||
<!-- android:key="vis_units"-->
|
||||
<!-- android:title="Visibility Units" />-->
|
||||
<!-- </PreferenceCategory>-->
|
||||
<!-- <PreferenceCategory android:title="Units">-->
|
||||
<!-- <ListPreference-->
|
||||
<!-- android:defaultValue="°C"-->
|
||||
<!-- android:entries="@array/list_preference_temp"-->
|
||||
<!-- android:entryValues="@array/list_preference_temp"-->
|
||||
<!-- android:key="temp_units"-->
|
||||
<!-- android:title="Temperature Units" />-->
|
||||
<!-- <ListPreference-->
|
||||
<!-- android:defaultValue="kph"-->
|
||||
<!-- android:entries="@array/list_preference_wind"-->
|
||||
<!-- android:entryValues="@array/list_preference_wind_values"-->
|
||||
<!-- android:key="wind_units"-->
|
||||
<!-- android:title="Wind Units" />-->
|
||||
<!-- <ListPreference-->
|
||||
<!-- android:defaultValue="mm"-->
|
||||
<!-- android:entries="@array/list_preference_precip"-->
|
||||
<!-- android:entryValues="@array/list_preference_precip_values"-->
|
||||
<!-- android:key="precip_units"-->
|
||||
<!-- android:title="Precipitation Units" />-->
|
||||
<!-- <ListPreference-->
|
||||
<!-- android:defaultValue="km"-->
|
||||
<!-- android:entries="@array/list_preference_vis"-->
|
||||
<!-- android:entryValues="@array/list_preference_vis_values"-->
|
||||
<!-- android:key="vis_units"-->
|
||||
<!-- android:title="Visibility Units" />-->
|
||||
<!-- </PreferenceCategory>-->
|
||||
<PreferenceCategory android:title="Notification Settings">
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
|
||||
Reference in New Issue
Block a user