Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
352941098f | ||
|
|
e132e9cd32 | ||
|
|
4e0078846c | ||
|
|
54bd77e090 | ||
|
|
b4b4eec430 | ||
|
|
e338fd6c47 | ||
|
|
66550094c8 | ||
|
|
1e9d00279f | ||
|
|
6bb03cd52a | ||
|
|
dde7331fd4 | ||
|
|
54a4b3ba49 | ||
|
|
fa828ad7ed | ||
|
|
e27823545c | ||
|
|
342df70b38 | ||
|
|
077d4ac9ed | ||
|
|
c56a24b18c | ||
|
|
57ac21c2e8 | ||
|
|
de0bb9e9c6 | ||
|
|
51e728ddfe | ||
|
|
aa8988bd9c | ||
|
|
252ee01ca0 | ||
|
|
1ee872e668 | ||
|
|
5f6f9380e6 | ||
|
|
951c149b6b | ||
|
|
e36909dc06 | ||
|
|
b3f6ff816b | ||
|
|
3ab92847f5 | ||
|
|
6025a0333c | ||
|
|
37877642da | ||
|
|
9ce2f9aa27 | ||
|
|
db788a36eb | ||
|
|
f8339a36f7 | ||
|
|
f26355de41 | ||
|
|
11d8066a07 | ||
|
|
36b5fc7957 | ||
|
|
8aa383a002 | ||
|
|
1d3c8335c7 | ||
|
|
aeee482128 | ||
|
|
6bf3663c81 | ||
|
|
48519aefa5 | ||
|
|
0d05a03f6e | ||
|
|
4bff009cfc | ||
|
|
ba1b5ab29a | ||
|
|
8bfce31f2e | ||
|
|
bca818e734 | ||
|
|
c95015c234 |
+4
-1
@@ -17,7 +17,7 @@ target/
|
||||
.factorypath
|
||||
|
||||
# netbeans
|
||||
nbproject/private/
|
||||
Bnbproject/private/
|
||||
|
||||
# intellij
|
||||
.idea/
|
||||
@@ -52,3 +52,6 @@ Package.resolved
|
||||
#xcode
|
||||
xcuserdata/
|
||||
/temp/
|
||||
|
||||
#tools
|
||||
service-tool/dwd-data/
|
||||
|
||||
Vendored
+1
-1
@@ -49,7 +49,7 @@ node {
|
||||
echo "Deploying to production server ..."
|
||||
withCredentials([sshUserPrivateKey(credentialsId: "mowesta-server-key", keyFileVariable: "KEYFILE")]) {
|
||||
sh 'scp -i $KEYFILE site-ear/build/libs/site-ear-' + version + '.ear wildfly@apps-pro.nes.uni-due.de:/opt/wildfly-21-mowesta/standalone/deployments/mowesta.ear'
|
||||
sh 'scp -i $KEYFILE android-app/build/outputs/apk/release/*.apk wildfly@apps-pro.nes.uni-due.de:/opt/android/mowesta/'
|
||||
sh 'scp -i $KEYFILE android-app/build/outputs/apk/prod/release/*.apk wildfly@apps-pro.nes.uni-due.de:/opt/android/mowesta/'
|
||||
}
|
||||
} else if (env.BRANCH_NAME == "master" || env.BRANCH_NAME == "feat/auth") {
|
||||
echo "Deploying to beta server ..."
|
||||
|
||||
@@ -89,7 +89,7 @@ android {
|
||||
applicationId "com.mowesta.android.app"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 29
|
||||
versionCode 12
|
||||
versionCode 15
|
||||
versionName "${version}"
|
||||
buildConfigField "long", "BUILD_TIME", System.currentTimeMillis() + "L"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
@@ -120,7 +120,19 @@ android {
|
||||
debug {
|
||||
applicationIdSuffix ".debug"
|
||||
versionNameSuffix "-dbg"
|
||||
resValue "string", "application_long", "MoWeSta (Debug)"
|
||||
}
|
||||
}
|
||||
flavorDimensions "backend"
|
||||
productFlavors {
|
||||
beta {
|
||||
dimension "backend"
|
||||
applicationIdSuffix ".beta"
|
||||
resValue "string", "mowesta_url_default", "https://beta.mowesta.com/api"
|
||||
resValue "string", "application_long", "MoWeSta Beta"
|
||||
}
|
||||
prod {
|
||||
dimension "backend"
|
||||
resValue "string", "mowesta_url_default", "https://www.mowesta.com/api"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,20 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".widget.ForecastWidgetActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".widget.MeasureWidgetActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<receiver android:name=".MowestaReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED"/>
|
||||
@@ -46,6 +60,31 @@
|
||||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver
|
||||
android:name=".widget.ForecastWidgetProvider"
|
||||
android:label="@string/widget_forecast_name">
|
||||
<intent-filter>
|
||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.appwidget.provider"
|
||||
android:resource="@xml/widget_forecast" />
|
||||
</receiver>
|
||||
<receiver
|
||||
android:name=".widget.MeasureWidgetProvider"
|
||||
android:label="@string/widget_measure_name">
|
||||
<intent-filter>
|
||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.appwidget.provider"
|
||||
android:resource="@xml/widget_measure" />
|
||||
</receiver>
|
||||
<receiver
|
||||
android:name=".widget.WidgetReceiver"
|
||||
android:exported="true"/>
|
||||
<service android:name=".MowestaService" />
|
||||
<service
|
||||
android:name=".widget.WidgetService"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE"
|
||||
android:exported="true"/>
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.mowesta.android.app.repository.ClientFactory;
|
||||
import com.mowesta.android.app.repository.DeviceRepository;
|
||||
import com.mowesta.android.app.repository.FavoriteRepository;
|
||||
import com.mowesta.android.app.repository.UserRepository;
|
||||
import com.mowesta.android.app.repository.WidgetRepository;
|
||||
|
||||
/**
|
||||
* An interface for the application context used
|
||||
@@ -44,6 +45,13 @@ public interface IApp {
|
||||
*/
|
||||
FavoriteRepository getFavoriteRepository();
|
||||
|
||||
/**
|
||||
* Returns a reference to the widget repository.
|
||||
*
|
||||
* @return The widget repository.
|
||||
*/
|
||||
WidgetRepository getWidgetRepository();
|
||||
|
||||
/**
|
||||
* Returns a reference to the http client factory.
|
||||
*
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.mowesta.android.app.task.DatabaseTask;
|
||||
import com.mowesta.android.app.task.RefreshTask;
|
||||
import com.mowesta.android.app.task.SyncTask;
|
||||
import com.mowesta.android.app.util.PermissionUtil;
|
||||
import com.mowesta.android.feign.api.DefaultApi;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -44,7 +45,7 @@ public class MowestaActivity extends AppCompatActivity {
|
||||
/**
|
||||
* One hour in milliseconds.
|
||||
*/
|
||||
private static final int ONE_HOUR = 60*60*1000;
|
||||
private static final int DELAY_REFRESH = 15 * 60 * 1000;
|
||||
|
||||
/**
|
||||
* The code used to request the permissions.
|
||||
@@ -68,12 +69,18 @@ public class MowestaActivity extends AppCompatActivity {
|
||||
protected DatabaseTask<FavoriteDatabase, Void, Long> favoriteTask = new DatabaseTask<>(
|
||||
(input, database) -> database.getAccessor().getUpdateTime(),
|
||||
(input, result) -> {
|
||||
if (result != null && result < System.currentTimeMillis() - ONE_HOUR) {
|
||||
FavoriteDatabase db = app.getFavoriteRepository().getDatabase();
|
||||
if (result != null && result < System.currentTimeMillis() - DELAY_REFRESH) {
|
||||
Log.d(TAG, "Starting automatic favorite synchronization.");
|
||||
UserCredentials c = app.getUserRepository().getCredentials().getValue();
|
||||
FavoriteDatabase db = app.getFavoriteRepository().getDatabase();
|
||||
if (c != null) new SyncTask(db, null).execute(app.getClientFactory().createClient(c));
|
||||
new RefreshTask(db, null).execute(app.getClientFactory().createClient());
|
||||
DefaultApi client = app.getClientFactory().createClient(c);
|
||||
if (c != null) {
|
||||
new SyncTask(db, (success)-> {
|
||||
new RefreshTask(db, null).execute(client);
|
||||
}).execute(client);
|
||||
} else {
|
||||
new RefreshTask(db, null).execute(app.getClientFactory().createClient());
|
||||
}
|
||||
} else {
|
||||
Log.d(TAG, "Ignoring request for favorite synchronization since data is up-to-date.");
|
||||
}
|
||||
|
||||
@@ -3,16 +3,23 @@ package com.mowesta.android.app;
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.StrictMode;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import com.google.android.exoplayer2.database.ExoDatabaseProvider;
|
||||
import com.google.android.exoplayer2.upstream.cache.Cache;
|
||||
import com.google.android.exoplayer2.upstream.cache.LeastRecentlyUsedCacheEvictor;
|
||||
import com.google.android.exoplayer2.upstream.cache.SimpleCache;
|
||||
import com.mowesta.android.app.database.Widget;
|
||||
import com.mowesta.android.app.repository.ClientFactory;
|
||||
import com.mowesta.android.app.repository.DeviceRepository;
|
||||
import com.mowesta.android.app.repository.FavoriteRepository;
|
||||
import com.mowesta.android.app.repository.UserRepository;
|
||||
import com.mowesta.android.app.repository.WidgetRepository;
|
||||
import com.mowesta.android.app.widget.WidgetReceiver;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -40,6 +47,11 @@ public class MowestaApp extends Application implements IApp {
|
||||
*/
|
||||
protected FavoriteRepository favoriteRepository;
|
||||
|
||||
/**
|
||||
* The database for the widgets.
|
||||
*/
|
||||
protected WidgetRepository widgetRepository;
|
||||
|
||||
/**
|
||||
* The application settings.
|
||||
*/
|
||||
@@ -58,9 +70,19 @@ public class MowestaApp extends Application implements IApp {
|
||||
userRepository = new UserRepository.Builder().setTrace(false).build(this);
|
||||
deviceRepository = new DeviceRepository.Builder().setTrace(false).build(this);
|
||||
favoriteRepository = new FavoriteRepository(this);
|
||||
widgetRepository = new WidgetRepository(this);
|
||||
MowestaService.startService(this);
|
||||
WidgetReceiver.updateWidgets(this);
|
||||
WidgetReceiver.scheduleUpdates(this);
|
||||
//if(BuildConfig.DEBUG)
|
||||
// StrictMode.enableDefaults();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
WidgetReceiver.updateWidgets(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Context getContext() {
|
||||
@@ -80,6 +102,9 @@ public class MowestaApp extends Application implements IApp {
|
||||
@Override
|
||||
public FavoriteRepository getFavoriteRepository() { return favoriteRepository; }
|
||||
|
||||
@Override
|
||||
public WidgetRepository getWidgetRepository() { return widgetRepository; }
|
||||
|
||||
@Override
|
||||
public ClientFactory getClientFactory() {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.mowesta.android.app.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.databinding.ViewCityEntryBinding;
|
||||
import com.mowesta.android.feign.model.City;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* An adapter for a recycler view.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class CityEntryListAdapter extends RecyclerView.Adapter<CityEntryViewHolder> {
|
||||
|
||||
/**
|
||||
* The listener.
|
||||
*/
|
||||
private @NonNull
|
||||
CityEntryViewHolder.OnCitySelectedListener onCitySelectedListener;
|
||||
|
||||
/**
|
||||
* The owner.
|
||||
*/
|
||||
private @NonNull
|
||||
LifecycleOwner lifecycleOwner;
|
||||
|
||||
/**
|
||||
* The cities to observe for updates.
|
||||
*/
|
||||
private @NonNull
|
||||
LiveData<List<City>> cities;
|
||||
|
||||
/**
|
||||
* The current selection.
|
||||
*/
|
||||
private @NonNull
|
||||
LiveData<City> selection;
|
||||
|
||||
/**
|
||||
* Creates a new adapter.
|
||||
*
|
||||
* @param lifecycleOwner The lifecycle owner.
|
||||
* @param onCitySelectedListener The city selection listener.
|
||||
*
|
||||
*/
|
||||
public CityEntryListAdapter(@NonNull LifecycleOwner lifecycleOwner, @NonNull CityEntryViewHolder.OnCitySelectedListener onCitySelectedListener, LiveData<List<City>> cities, LiveData<City> selection) {
|
||||
this.setHasStableIds(true);
|
||||
this.lifecycleOwner = lifecycleOwner;
|
||||
this.onCitySelectedListener = onCitySelectedListener;
|
||||
this.cities = cities;
|
||||
this.selection = selection;
|
||||
cities.observe(lifecycleOwner, (v)-> notifyDataSetChanged());
|
||||
selection.observe(lifecycleOwner, (v)-> notifyDataSetChanged());
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public CityEntryViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ViewCityEntryBinding binding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.view_city_entry, parent, false);
|
||||
binding.setLifecycleOwner(lifecycleOwner);
|
||||
binding.setListener(onCitySelectedListener);
|
||||
return new CityEntryViewHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull CityEntryViewHolder holder, int position) {
|
||||
City city = getItem(position);
|
||||
holder.setModel(city);
|
||||
holder.setSelected(city != null && selection.getValue() != null && city.getId() != null && city.getId().equals(selection.getValue().getId()));
|
||||
}
|
||||
|
||||
private City getItem(int position) {
|
||||
List<City> c = cities.getValue();
|
||||
return (c == null || position >= c.size()) ? null : c.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
List<City> c = cities.getValue();
|
||||
return c == null ? 0: c.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
City c = getItem(position);
|
||||
if (c == null || c.getId() == null)
|
||||
return super.getItemId(position);
|
||||
else return c.getId();
|
||||
}
|
||||
}
|
||||
+5
-16
@@ -22,28 +22,17 @@ import java.util.zip.Inflater;
|
||||
*/
|
||||
public class CityEntryPagedListAdapter extends PagedListAdapter<City, CityEntryViewHolder> {
|
||||
|
||||
/**
|
||||
* A listener that is informed when a city is selected.
|
||||
*/
|
||||
public interface OnCitySelectedListener {
|
||||
|
||||
/**
|
||||
* Called when a city is selected.
|
||||
*
|
||||
* @param city The selected city.
|
||||
*/
|
||||
void onCitySelected(City city);
|
||||
}
|
||||
|
||||
/**
|
||||
* The listener.
|
||||
*/
|
||||
private @NonNull OnCitySelectedListener onCitySelectedListener;
|
||||
private @NonNull
|
||||
CityEntryViewHolder.OnCitySelectedListener onCitySelectedListener;
|
||||
|
||||
/**
|
||||
* The owner.
|
||||
*/
|
||||
private @NonNull LifecycleOwner lifecycleOwner;
|
||||
private @NonNull
|
||||
LifecycleOwner lifecycleOwner;
|
||||
|
||||
/**
|
||||
* Creates a new adapter.
|
||||
@@ -51,7 +40,7 @@ public class CityEntryPagedListAdapter extends PagedListAdapter<City, CityEntryV
|
||||
* @param lifecycleOwner The lifecycle owner.
|
||||
* @param onCitySelectedListener The city selection listener.
|
||||
*/
|
||||
public CityEntryPagedListAdapter(@NonNull LifecycleOwner lifecycleOwner, @NonNull OnCitySelectedListener onCitySelectedListener) {
|
||||
public CityEntryPagedListAdapter(@NonNull LifecycleOwner lifecycleOwner, @NonNull CityEntryViewHolder.OnCitySelectedListener onCitySelectedListener) {
|
||||
super(new Callback());
|
||||
this.lifecycleOwner = lifecycleOwner;
|
||||
this.onCitySelectedListener = onCitySelectedListener;
|
||||
|
||||
@@ -14,6 +14,20 @@ import com.mowesta.android.feign.model.City;
|
||||
*/
|
||||
public class CityEntryViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
/**
|
||||
* A listener that is informed when a city is selected.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public interface OnCitySelectedListener {
|
||||
|
||||
/**
|
||||
* Called when a city is selected.
|
||||
*
|
||||
* @param city The selected city.
|
||||
*/
|
||||
void onCitySelected(City city);
|
||||
}
|
||||
|
||||
/**
|
||||
* The binding to update the contents.
|
||||
@@ -38,4 +52,13 @@ public class CityEntryViewHolder extends RecyclerView.ViewHolder {
|
||||
public void setModel(City city) {
|
||||
this.binding.setModel(city);
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the city as selected.
|
||||
*
|
||||
* @param selected True to select.
|
||||
*/
|
||||
public void setSelected(boolean selected) {
|
||||
this.binding.setSelected(selected);
|
||||
}
|
||||
}
|
||||
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
package com.mowesta.android.app.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.paging.PagedListAdapter;
|
||||
import androidx.recyclerview.widget.DiffUtil;
|
||||
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.databinding.ViewDeviceEntryBinding;
|
||||
import com.mowesta.android.app.fragment.DevicesFragment;
|
||||
import com.mowesta.android.app.model.DevicesViewModel;
|
||||
import com.mowesta.android.feign.model.City;
|
||||
import com.mowesta.android.feign.model.Device;
|
||||
|
||||
/**
|
||||
* A list adapter to display the list of devices.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class DeviceEntryPagedListAdapter extends PagedListAdapter<Device, DeviceEntryViewHolder> {
|
||||
|
||||
/**
|
||||
* The lifecycle owner.
|
||||
*/
|
||||
private @NonNull
|
||||
LifecycleOwner owner;
|
||||
|
||||
/**
|
||||
* The click listener.
|
||||
*/
|
||||
private @NonNull
|
||||
DeviceEntryViewHolder.OnDeviceSelectedListener listener;
|
||||
|
||||
/**
|
||||
* The selected item.
|
||||
*/
|
||||
private @NonNull
|
||||
LiveData<Device> selection;
|
||||
|
||||
/**
|
||||
* Creates a new paged list adapter that will inform
|
||||
* the listener about click events.
|
||||
*
|
||||
* @param owner The lifecycle owner.
|
||||
* @param listener The listener.
|
||||
*/
|
||||
public DeviceEntryPagedListAdapter(@NonNull LifecycleOwner owner, @NonNull DeviceEntryViewHolder.OnDeviceSelectedListener listener) {
|
||||
this(owner, listener, new MutableLiveData<>(null));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new paged list adapter that will inform
|
||||
* the listener about click events and used the specified
|
||||
* live data to color selections.
|
||||
*
|
||||
* @param owner The lifecycle owner.
|
||||
* @param listener The listener.
|
||||
* @param selection The current selection.
|
||||
*/
|
||||
public DeviceEntryPagedListAdapter(@NonNull LifecycleOwner owner, @NonNull DeviceEntryViewHolder.OnDeviceSelectedListener listener, @NonNull LiveData<Device> selection) {
|
||||
super(new DeviceCallback());
|
||||
this.owner = owner;
|
||||
this.listener = listener;
|
||||
this.selection = selection;
|
||||
selection.observe(owner, (s) -> notifyDataSetChanged());
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public DeviceEntryViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ViewDeviceEntryBinding binding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.view_device_entry, parent, false);
|
||||
DeviceEntryViewHolder holder = new DeviceEntryViewHolder(binding);
|
||||
binding.setListener(listener);
|
||||
binding.setLifecycleOwner(owner);
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull DeviceEntryViewHolder holder, int position) {
|
||||
Device device = getItem(position);
|
||||
holder.setModel(device);
|
||||
holder.setSelected(device != null && selection.getValue() != null && device.getId() != null && device.getId().equals(selection.getValue().getId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* A callback to determine whether two devices are the same.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public static class DeviceCallback extends DiffUtil.ItemCallback<Device> {
|
||||
|
||||
@Override
|
||||
public boolean areItemsTheSame(@NonNull Device oldItem, @NonNull Device newItem) {
|
||||
return oldItem.getId() != null && oldItem.getId().equals(newItem.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean areContentsTheSame(@NonNull Device oldItem, @NonNull Device newItem) {
|
||||
return oldItem.getId() != null && oldItem.getId().equals(newItem.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.mowesta.android.app.adapter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mowesta.android.app.databinding.ViewDeviceEntryBinding;
|
||||
import com.mowesta.android.feign.model.Device;
|
||||
|
||||
/**
|
||||
* The view holder for the list of devices
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class DeviceEntryViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
/**
|
||||
* A listener that is informed when a device is selected.
|
||||
*/
|
||||
public interface OnDeviceSelectedListener {
|
||||
|
||||
/**
|
||||
* Called when a device is selected.
|
||||
*
|
||||
* @param device The selected device.
|
||||
*/
|
||||
void onDeviceSelected(Device device);
|
||||
}
|
||||
|
||||
/**
|
||||
* The binding with the device view.
|
||||
*/
|
||||
private ViewDeviceEntryBinding binding;
|
||||
|
||||
/**
|
||||
* Creates a new view holder for the binding.
|
||||
*
|
||||
* @param binding The binding.
|
||||
*/
|
||||
public DeviceEntryViewHolder(@NonNull ViewDeviceEntryBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the model.
|
||||
*
|
||||
* @param device The device.
|
||||
*/
|
||||
public void setModel(Device device) {
|
||||
this.binding.setModel(device);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Marks the city as selected.
|
||||
*
|
||||
* @param selected True to select.
|
||||
*/
|
||||
public void setSelected(boolean selected) {
|
||||
this.binding.setSelected(selected);
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -11,7 +11,7 @@ import androidx.recyclerview.widget.DiffUtil;
|
||||
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.databinding.ViewDiagramEntryBinding;
|
||||
import com.mowesta.android.app.model.DiagramEntry;
|
||||
import com.mowesta.android.app.binding.DiagramEntry;
|
||||
|
||||
/**
|
||||
* A paged list adapter for diagram entries.
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.mowesta.android.app.adapter;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mowesta.android.app.databinding.ViewDiagramEntryBinding;
|
||||
import com.mowesta.android.app.model.DiagramEntry;
|
||||
import com.mowesta.android.app.binding.DiagramEntry;
|
||||
|
||||
/**
|
||||
* A view holder for recycler views that contain diagram entries.
|
||||
|
||||
+15
-15
@@ -1,9 +1,7 @@
|
||||
package com.mowesta.android.app.model;
|
||||
package com.mowesta.android.app.binding;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.text.Html;
|
||||
import android.text.Spanned;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
@@ -12,16 +10,14 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.TooltipCompat;
|
||||
import androidx.constraintlayout.widget.Guideline;
|
||||
import androidx.core.text.HtmlCompat;
|
||||
import androidx.databinding.BindingAdapter;
|
||||
|
||||
import com.google.android.material.textfield.TextInputLayout;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.database.Favorite;
|
||||
import com.mowesta.android.app.model.FormStatus;
|
||||
import com.mowesta.android.app.util.DateFormatter;
|
||||
import com.mowesta.android.app.util.UnitUtils;
|
||||
import com.mowesta.android.app.view.WeatherIcon;
|
||||
import com.mowesta.android.app.view.WeatherView;
|
||||
import com.mowesta.android.feign.model.City;
|
||||
import com.mowesta.android.feign.model.Country;
|
||||
import com.mowesta.android.feign.model.Device;
|
||||
@@ -478,15 +474,19 @@ public class BindingAdapters {
|
||||
* @param condition The weather condition.
|
||||
*/
|
||||
@BindingAdapter("weatherIcon")
|
||||
public static void setWeatherIcon(WeatherView view, @Nullable WeatherCondition condition) {
|
||||
if (condition == null || condition.getType() == null) {
|
||||
view.setText("");
|
||||
public static void setWeatherIcon(ImageView view, @Nullable WeatherCondition condition) {
|
||||
Integer resource = null;
|
||||
if (condition != null && condition.getType() != null) {
|
||||
resource = BindingTransforms.getIcon(condition.getType(), false);
|
||||
}
|
||||
if (resource == null) {
|
||||
view.setImageResource(android.R.color.transparent);
|
||||
view.setContentDescription(null);
|
||||
TooltipCompat.setTooltipText(view, null);
|
||||
} else {
|
||||
int res = BindingTransforms.getText(condition.getType());
|
||||
String str = view.getContext().getString(res);
|
||||
view.setType(BindingTransforms.getIcon(condition.getType(), false));
|
||||
view.setImageResource(resource);
|
||||
view.setContentDescription(str);
|
||||
TooltipCompat.setTooltipText(view, str);
|
||||
}
|
||||
@@ -499,16 +499,16 @@ public class BindingAdapters {
|
||||
* @param condition The weather condition.
|
||||
*/
|
||||
@BindingAdapter("directionIcon")
|
||||
public static void setDirectionIcon(WeatherView view, @Nullable WeatherCondition condition) {
|
||||
public static void setDirectionIcon(ImageView view, @Nullable WeatherCondition condition) {
|
||||
if (condition == null || condition.getWindDirection() == null) {
|
||||
view.setType(null);
|
||||
view.setImageResource(android.R.color.transparent);
|
||||
view.setRotation(0);
|
||||
view.setContentDescription(null);
|
||||
TooltipCompat.setTooltipText(view, null);
|
||||
} else {
|
||||
int res = BindingTransforms.getText(condition.getWindDirection());
|
||||
String str = view.getContext().getString(res);
|
||||
view.setType(WeatherIcon.WIND_DIRECTION);
|
||||
view.setImageResource(R.drawable.ic_wind_deg_normal_24);
|
||||
view.setRotation(BindingTransforms.getRotation(condition.getWindDirection()));
|
||||
view.setContentDescription(str);
|
||||
TooltipCompat.setTooltipText(view, str);
|
||||
@@ -817,7 +817,7 @@ public class BindingAdapters {
|
||||
|
||||
|
||||
@BindingAdapter("measurementValue")
|
||||
public static void setMeasurementValue(TextView view, @Nullable MeasurementViewModel.MeasurementValue value) {
|
||||
public static void setMeasurementValue(TextView view, @Nullable MeasurementValue value) {
|
||||
Resources r = view.getContext().getResources();
|
||||
if (value == null || !value.hasValue()) {
|
||||
view.setText(null);
|
||||
@@ -868,7 +868,7 @@ public class BindingAdapters {
|
||||
}
|
||||
|
||||
@BindingAdapter("measurementVisibility")
|
||||
public static void setMeasurementVisibility(View view, @Nullable MeasurementViewModel.MeasurementValue value) {
|
||||
public static void setMeasurementVisibility(View view, @Nullable MeasurementValue value) {
|
||||
if (value == null || !value.hasValue()) {
|
||||
view.setVisibility(View.GONE);
|
||||
} else {
|
||||
+23
-56
@@ -1,4 +1,4 @@
|
||||
package com.mowesta.android.app.model;
|
||||
package com.mowesta.android.app.binding;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
@@ -6,8 +6,6 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.view.JamIcon;
|
||||
import com.mowesta.android.app.view.WeatherIcon;
|
||||
import com.mowesta.android.feign.model.Device;
|
||||
import com.mowesta.android.feign.model.WeatherCondition;
|
||||
import com.mowesta.android.feign.model.WeatherVideo;
|
||||
@@ -235,56 +233,56 @@ public class BindingTransforms {
|
||||
* to return the regular (day) representation.
|
||||
* @return The weather icon, which may be null.
|
||||
*/
|
||||
public static @Nullable WeatherIcon getIcon(@Nullable WeatherCondition.TypeEnum value, boolean alternate) {
|
||||
public static @Nullable Integer getIcon(@Nullable WeatherCondition.TypeEnum value, boolean alternate) {
|
||||
if (value == null) return null;
|
||||
switch (value) {
|
||||
case UNKNOWN:
|
||||
break;
|
||||
case CLEAR_SKY:
|
||||
case MAINLY_CLEAR:
|
||||
return alternate ? WeatherIcon.NIGHT_CLEAR : WeatherIcon.DAY_SUNNY;
|
||||
return alternate ? R.drawable.ic_night_clear_normal_24 : R.drawable.ic_day_sunny_normal_24;
|
||||
case PARTLY_CLOUDY:
|
||||
return alternate ? WeatherIcon.NIGHT_CLOUDY : WeatherIcon.DAY_CLOUDY;
|
||||
return alternate ? R.drawable.ic_night_cloudy_normal_24 : R.drawable.ic_day_cloudy_normal_24;
|
||||
case CLOUDY:
|
||||
return WeatherIcon.CLOUDY;
|
||||
return R.drawable.ic_cloudy_normal_24;
|
||||
case FOG:
|
||||
case FOG_DEPOSITING_RIME:
|
||||
return alternate ? WeatherIcon.NIGHT_FOG : WeatherIcon.DAY_FOG;
|
||||
return alternate ? R.drawable.ic_night_fog_normal_24 : R.drawable.ic_day_fog_normal_24;
|
||||
case SLIGHT_DRIZZLE:
|
||||
case MODERATE_DRIZZLE:
|
||||
return alternate ? WeatherIcon.NIGHT_SPRINKLE : WeatherIcon.DAY_SPRINKLE;
|
||||
return alternate ? R.drawable.ic_night_sprinkle_normal_24 : R.drawable.ic_day_sprinkle_normal_24;
|
||||
case HEAVY_DRIZZLE:
|
||||
return WeatherIcon.SPRINKLE;
|
||||
return R.drawable.ic_sprinkle_normal_24;
|
||||
case DRIZZLE_FREEZING_SLIGHT:
|
||||
case RAIN_FREEZING_SLIGHT:
|
||||
case DRIZZLE_FREEZING_MODERATE_HEAVY:
|
||||
case RAIN_FREEZING_MODERATE_HEAVY:
|
||||
return WeatherIcon.SNOWFLAKE_COLD;
|
||||
return R.drawable.ic_snowflake_cold_normal_24;
|
||||
case SLIGHT_RAIN_NOT_FREEZING:
|
||||
case MODERATE_RAIN_NOT_FREEZING:
|
||||
return alternate ? WeatherIcon.NIGHT_RAIN : WeatherIcon.DAY_RAIN;
|
||||
return alternate ? R.drawable.ic_night_rain_normal_24 : R.drawable.ic_day_rain_normal_24;
|
||||
case HEAVY_RAIN_NOT_FREEZING:
|
||||
return WeatherIcon.RAIN;
|
||||
return R.drawable.ic_rain_normal_24;
|
||||
case SLIGHT_FALL_OF_SNOWFLAKES:
|
||||
case MODERATE_FALL_OF_SNOWFLAKES:
|
||||
return alternate ? WeatherIcon.NIGHT_SNOW : WeatherIcon.DAY_SNOW;
|
||||
return alternate ? R.drawable.ic_night_snow_normal_24 : R.drawable.ic_day_snow_normal_24;
|
||||
case HEAVY_FALL_OF_SNOWFLAKES:
|
||||
case SNOW_GRAINS:
|
||||
return WeatherIcon.SNOW;
|
||||
return R.drawable.ic_snow_normal_24;
|
||||
case RAIN_SHOWER_SLIGHT:
|
||||
return alternate ? WeatherIcon.NIGHT_SHOWERS : WeatherIcon.DAY_SHOWERS;
|
||||
return alternate ? R.drawable.ic_night_showers_normal_24 : R.drawable.ic_day_showers_normal_24;
|
||||
case RAIN_SHOWER_MODERATE_HEAVY:
|
||||
return WeatherIcon.SHOWERS;
|
||||
return R.drawable.ic_showers_normal_24;
|
||||
case RAIN_SHOWER_VIOLENT:
|
||||
return WeatherIcon.STORM_SHOWERS;
|
||||
return R.drawable.ic_storm_showers_normal_24;
|
||||
case SNOW_SHOWER_SLIGHT:
|
||||
return alternate ? WeatherIcon.NIGHT_RAIN_MIX : WeatherIcon.DAY_RAIN_MIX;
|
||||
return alternate ? R.drawable.ic_night_rain_mix_normal_24 : R.drawable.ic_day_rain_mix_normal_24;
|
||||
case SNOW_SHOWER_MODERATE_HEAVY:
|
||||
return WeatherIcon.RAIN_MIX;
|
||||
return R.drawable.ic_rain_mix_normal_24;
|
||||
case THUNDERSTORM_SLIGHT_MODERATE:
|
||||
return alternate ? WeatherIcon.NIGHT_THUNDERSTORM : WeatherIcon.DAY_THUNDERSTORM;
|
||||
return alternate ? R.drawable.ic_night_thunderstorm_normal_24 : R.drawable.ic_day_thunderstorm_normal_24;
|
||||
case THUNDERSTORM_HAIL_HEAVY:
|
||||
return WeatherIcon.THUNDERSTORM;
|
||||
return R.drawable.ic_thunderstorm_normal_24;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -296,6 +294,7 @@ public class BindingTransforms {
|
||||
* @return The label.
|
||||
*/
|
||||
public static int getOsLabel(Device.OsEnum os) {
|
||||
if (os == null) return 0;
|
||||
switch (os) {
|
||||
case IOS:
|
||||
return R.string.label_device_type_ios;
|
||||
@@ -314,6 +313,7 @@ public class BindingTransforms {
|
||||
* @return The icon.
|
||||
*/
|
||||
public static int getOsIcon(Device.OsEnum os) {
|
||||
if (os == null) return 0;
|
||||
switch (os) {
|
||||
case IOS:
|
||||
return R.drawable.ic_phone_iphone_normal_24;
|
||||
@@ -331,7 +331,7 @@ public class BindingTransforms {
|
||||
* @param type the type.
|
||||
* @return The label or 0 if the type is null.
|
||||
*/
|
||||
public static int getMeasurementTypeLabel(MeasurementViewModel.MeasurementType type) {
|
||||
public static int getMeasurementTypeLabel(MeasurementType type) {
|
||||
switch (type) {
|
||||
case CPU_FREQUENCY:
|
||||
return R.string.measurement_type_cpu_frequency;
|
||||
@@ -358,39 +358,6 @@ public class BindingTransforms {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the jam icon for the measurement type.
|
||||
*
|
||||
* @param type The measurement type.
|
||||
* @return The jam icon.
|
||||
*/
|
||||
public static JamIcon getMeasurementTypeIcon(MeasurementViewModel.MeasurementType type) {
|
||||
switch (type) {
|
||||
case CPU_FREQUENCY:
|
||||
return JamIcon.JAM_ACTIVITY;
|
||||
case SOLAR_VOLTAGE:
|
||||
return JamIcon.JAM_SUN;
|
||||
case SCREEN_ENABLED:
|
||||
return JamIcon.JAM_SCREEN;
|
||||
case BATTERY_VOLTAGE:
|
||||
return JamIcon.JAM_BATTERY_HALF_F;
|
||||
case CPU_TEMPERATURE:
|
||||
return JamIcon.JAM_PHONE;
|
||||
case SENSOR_HUMIDITY:
|
||||
return JamIcon.JAM_WATER_DROP;
|
||||
case SENSOR_PRESSURE:
|
||||
return JamIcon.JAM_DASHBOARD;
|
||||
case BATTERY_CHARGING:
|
||||
return JamIcon.JAM_BATTERY_CHARGING;
|
||||
case BATTERY_TEMPERATURE:
|
||||
return JamIcon.JAM_BATTERY;
|
||||
case SENSOR_TEMPERATURE:
|
||||
return JamIcon.JAM_TEMPERATURE;
|
||||
}
|
||||
return JamIcon.JAM_INFO;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.mowesta.android.app.model;
|
||||
package com.mowesta.android.app.binding;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.mowesta.android.app.binding;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The types of measurement context.
|
||||
*
|
||||
* @author Sebastian
|
||||
*/
|
||||
public enum MeasurementType {
|
||||
|
||||
/**
|
||||
* A boolean to identify whether the battery is charging.
|
||||
* e.g. true false
|
||||
*/
|
||||
BATTERY_CHARGING(Boolean.class),
|
||||
|
||||
/**
|
||||
* The temperature reading of the battery (double value in centigrade, can be read through ACTION_BATTERY_CHANGED).
|
||||
* e.g. 37.1, -1.3
|
||||
*/
|
||||
BATTERY_TEMPERATURE(Double.class),
|
||||
|
||||
/**
|
||||
* A temperature reading of a temperature sensor (double value in centigrade, TYPE_TEMERATURE on Android).
|
||||
* e.g. 37.1, -1.3
|
||||
*/
|
||||
SENSOR_TEMPERATURE(Double.class),
|
||||
|
||||
/**
|
||||
* A pressure reading of a barometer sensor (double value in hPa, TYPE_BAROMETER on Android).
|
||||
* e.g. 1000.0, 998.26127
|
||||
*/
|
||||
SENSOR_PRESSURE(Double.class),
|
||||
|
||||
/**
|
||||
* A humidity reading of a humidity sensor (double value as relative humidity in %, TYPE_RELATIVE_HUMIDITY on Android).
|
||||
* range: 0-1 (0->0%, 1->100%, 0.5->50%)
|
||||
*/
|
||||
SENSOR_HUMIDITY(Double.class),
|
||||
|
||||
/**
|
||||
* The temperature of the cpu (double value in centigrade, can be read by analyzing the proc file system).
|
||||
* e.g. 37.1 -1.3
|
||||
*/
|
||||
CPU_TEMPERATURE(Double.class),
|
||||
|
||||
/**
|
||||
* The current frequency of the cpu (double value in mhz, can be read by analyzing the proc file system).
|
||||
*/
|
||||
CPU_FREQUENCY(Double.class),
|
||||
|
||||
/**
|
||||
* A boolean to determine whether the screen is on (true) or off (false).
|
||||
*/
|
||||
SCREEN_ENABLED(Boolean.class),
|
||||
|
||||
/**
|
||||
* The voltage of the battery (used to monitor the battery of the weather station).
|
||||
* e.g. 3.77 -> 3.77 Volt
|
||||
*/
|
||||
BATTERY_VOLTAGE(Double.class),
|
||||
|
||||
/**
|
||||
* The voltage of the solar panel (used to estimate whether the weather station is located in the sun).
|
||||
* e.g. 3.77 -> 3.77 Volt
|
||||
*/
|
||||
SOLAR_VOLTAGE(Double.class);
|
||||
|
||||
/**
|
||||
* The data type.
|
||||
*/
|
||||
private Class<?> type;
|
||||
|
||||
/**
|
||||
* Creates a measurement type with the specified data type.
|
||||
*
|
||||
* @param type The data type expected for the measurement.
|
||||
*/
|
||||
private MeasurementType(Class<?> type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the data type.
|
||||
*
|
||||
* @return The data type.
|
||||
*/
|
||||
public Class<?> getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the data and returns a java array with the type
|
||||
* represented by this constant or an empty array, if the
|
||||
* data cannot be parsed.
|
||||
*
|
||||
* @param value The value to parse.
|
||||
* @return The java object.
|
||||
*/
|
||||
public Object[] getValues(String value) {
|
||||
List<Object> result = new ArrayList<>();
|
||||
if (value != null) {
|
||||
String[] substrings = value.split(",");
|
||||
if (type == Boolean.class) {
|
||||
for (String s : substrings) {
|
||||
Boolean b = (Boolean) parseValue(s);
|
||||
if (b != null) result.add(b);
|
||||
}
|
||||
} else if (type == Double.class) {
|
||||
for (String s : substrings) {
|
||||
Double d = (Double) parseValue(s);
|
||||
if (d != null) result.add(d);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toArray(new Object[result.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a single value.
|
||||
*
|
||||
* @param value The string value.
|
||||
* @return The parsed value.
|
||||
*/
|
||||
private Object parseValue(String value) {
|
||||
if (value == null) return null;
|
||||
value = value.trim();
|
||||
if (type == Boolean.class) {
|
||||
if ("true".equalsIgnoreCase(value)) return Boolean.TRUE;
|
||||
if ("false".equalsIgnoreCase(value)) return Boolean.FALSE;
|
||||
return null;
|
||||
} else if (type == Double.class) {
|
||||
try {
|
||||
return Double.valueOf(Double.parseDouble(value));
|
||||
} catch (NumberFormatException e) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.mowesta.android.app.binding;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a single measurement value.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class MeasurementValue {
|
||||
|
||||
/**
|
||||
* The log tag.
|
||||
*/
|
||||
private static final String TAG = "MeasurementValue";
|
||||
|
||||
/**
|
||||
* The measurement type.
|
||||
*/
|
||||
private @NonNull
|
||||
MeasurementType type;
|
||||
|
||||
/**
|
||||
* The measurement value.
|
||||
*/
|
||||
private @Nullable
|
||||
String value;
|
||||
|
||||
/**
|
||||
* The extracted values.
|
||||
*/
|
||||
private @NonNull
|
||||
Object[] values;
|
||||
|
||||
public MeasurementValue(@NonNull MeasurementType type, @Nullable String value) {
|
||||
this.type = type;
|
||||
this.value = value;
|
||||
this.values = parseValues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to parse the value based on the type.
|
||||
*
|
||||
* @return The values.
|
||||
*/
|
||||
private @NonNull
|
||||
Object[] parseValues() {
|
||||
try {
|
||||
return type.getValues(value);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to parse " + type.name() + " from '" + value + "'.", e);
|
||||
return new Object[0];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the type.
|
||||
*
|
||||
* @return The type.
|
||||
*/
|
||||
@NonNull
|
||||
public MeasurementType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value(s).
|
||||
*
|
||||
* @return The values.
|
||||
*/
|
||||
@NonNull
|
||||
public Object[] getValues() {
|
||||
return values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether this value has at
|
||||
* least one data item.
|
||||
*
|
||||
* @return True if the value has at least one data item..
|
||||
*/
|
||||
public boolean hasValue() {
|
||||
return values.length > 0;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import androidx.room.Ignore;
|
||||
import androidx.room.Index;
|
||||
import androidx.room.TypeConverters;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.MapperFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.mowesta.android.feign.model.City;
|
||||
@@ -48,7 +49,7 @@ public class Favorite {
|
||||
/**
|
||||
* The object mapper to serialize strings.
|
||||
*/
|
||||
private static final ObjectMapper MAPPER = new ObjectMapper();
|
||||
private static final ObjectMapper MAPPER = new ObjectMapper().configure(JsonGenerator.Feature.IGNORE_UNKNOWN, true);
|
||||
|
||||
/**
|
||||
* The type of the favorite.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mowesta.android.app.database;
|
||||
|
||||
import android.location.Location;
|
||||
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.Delete;
|
||||
@@ -23,10 +25,20 @@ public interface FavoriteAccessor {
|
||||
|
||||
/**
|
||||
* Returns a live data list of active favorites.
|
||||
*
|
||||
* @return The list of active favorites.
|
||||
*/
|
||||
@Query("select * from favorite where not deleted order by position")
|
||||
LiveData<List<Favorite>> getActive();
|
||||
|
||||
/**
|
||||
* Returns the active locations that exhibit a certain type.
|
||||
*
|
||||
* @param type The location type.
|
||||
* @return The list of active favorites.
|
||||
*/
|
||||
@Query("select * from favorite where not deleted and type=:type order by position")
|
||||
List<Favorite> getActive(int type);
|
||||
|
||||
/**
|
||||
* returns the oldest entry in the database to determine whether
|
||||
|
||||
@@ -0,0 +1,373 @@
|
||||
package com.mowesta.android.app.database;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.room.ColumnInfo;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.Index;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* A class to memorize the information about a widget.
|
||||
*/
|
||||
@Entity(tableName = "widget", indices = {
|
||||
@Index({"type", "ref"})
|
||||
})
|
||||
public class Widget {
|
||||
|
||||
/**
|
||||
* The log tag.
|
||||
*/
|
||||
private static final String TAG = "Widget";
|
||||
|
||||
/**
|
||||
* The object mapper to serialize strings.
|
||||
*/
|
||||
private static final ObjectMapper MAPPER = new ObjectMapper().configure(JsonGenerator.Feature.IGNORE_UNKNOWN, true);
|
||||
|
||||
/**
|
||||
* A constant to refer to an invalid type.
|
||||
*/
|
||||
public static final int TYPE_INVALID = 0;
|
||||
|
||||
/**
|
||||
* The widget type that shows a forecast. The data id will be a reference to a city.
|
||||
* The data will be the city and the content will be the forecast.
|
||||
*/
|
||||
public static final int TYPE_FORECAST = 1;
|
||||
|
||||
/**
|
||||
* The type that shows a measurement. The data id will be a reference to a device.
|
||||
* The data will be the device and the content will be the measurement.
|
||||
*/
|
||||
public static final int TYPE_MEASURE = 2;
|
||||
|
||||
/**
|
||||
* The type of the widget.
|
||||
*/
|
||||
@ColumnInfo(name = "type")
|
||||
@NonNull
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* The id of the state of the widget.
|
||||
*/
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
@ColumnInfo(name = "id")
|
||||
private long id;
|
||||
|
||||
/**
|
||||
* The reference id of the widget. This
|
||||
* is the id assigned by the widget host.
|
||||
*/
|
||||
@ColumnInfo(name = "ref")
|
||||
private int reference;
|
||||
|
||||
/**
|
||||
* The id pointing to some data in the
|
||||
* mowesta backend. The type depends
|
||||
* on the widget type.
|
||||
*/
|
||||
@ColumnInfo(name = "dataId")
|
||||
private long dataId;
|
||||
|
||||
/**
|
||||
* The update timestamp of the last
|
||||
* data update.
|
||||
*/
|
||||
@ColumnInfo(name = "dataTime")
|
||||
private long dataTime;
|
||||
|
||||
/**
|
||||
* The widget data which depends on
|
||||
* the type.
|
||||
*/
|
||||
@ColumnInfo(name = "dataValue")
|
||||
private String dataValue;
|
||||
|
||||
/**
|
||||
* The update timestamp of the last
|
||||
* content update.
|
||||
*/
|
||||
@ColumnInfo(name = "contentTime")
|
||||
private long contentTime;
|
||||
|
||||
/**
|
||||
* The widget content which depends on
|
||||
* the type.
|
||||
*/
|
||||
@ColumnInfo(name = "contentValue")
|
||||
private String contentValue;
|
||||
|
||||
/**
|
||||
* A flag to store a temperature unit. True for
|
||||
* degree celsius, false for Fahrenheit.
|
||||
*/
|
||||
@ColumnInfo(name = "celsius")
|
||||
private boolean celsius;
|
||||
|
||||
/**
|
||||
* A flag to store a unit system. True for si
|
||||
* false for imperial.
|
||||
*/
|
||||
@ColumnInfo(name = "si")
|
||||
private boolean si;
|
||||
|
||||
/**
|
||||
* Returns the widget type.
|
||||
*
|
||||
* @return The widget type.
|
||||
*/
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the widget type.
|
||||
*
|
||||
* @param type The type.
|
||||
*/
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the widget id.
|
||||
*
|
||||
* @return The id.
|
||||
*/
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the widget id.
|
||||
*
|
||||
* @param id The widget id.
|
||||
*/
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the widget reference assigned
|
||||
* by the widget host.
|
||||
*
|
||||
* @return The reference.
|
||||
*/
|
||||
public int getReference() {
|
||||
return reference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the widget reference assigned
|
||||
* by the host.
|
||||
*
|
||||
* @param reference The reference.
|
||||
*/
|
||||
public void setReference(int reference) {
|
||||
this.reference = reference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the data id pointing to the
|
||||
* server object.
|
||||
*
|
||||
* @return The data id.
|
||||
*/
|
||||
public long getDataId() {
|
||||
return dataId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the data id pointing to the server
|
||||
* object.
|
||||
*
|
||||
* @param dataId The data id.
|
||||
*/
|
||||
public void setDataId(long dataId) {
|
||||
this.dataId = dataId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the data time.
|
||||
*
|
||||
* @return The data time.
|
||||
*/
|
||||
public long getDataTime() {
|
||||
return dataTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the data time.
|
||||
*
|
||||
* @param dataTime The data time.
|
||||
*/
|
||||
public void setDataTime(long dataTime) {
|
||||
this.dataTime = dataTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the data value.
|
||||
*
|
||||
* @return The data value.
|
||||
*/
|
||||
public String getDataValue() {
|
||||
return dataValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the data value.
|
||||
*
|
||||
* @param dataValue The data value.
|
||||
*/
|
||||
public void setDataValue(String dataValue) {
|
||||
this.dataValue = dataValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the content time.
|
||||
*
|
||||
* @return The content time.
|
||||
*/
|
||||
public long getContentTime() {
|
||||
return contentTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the content time.
|
||||
*
|
||||
* @param contentTime The content time.
|
||||
*/
|
||||
public void setContentTime(long contentTime) {
|
||||
this.contentTime = contentTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the content value.
|
||||
*
|
||||
* @return The content value.
|
||||
*/
|
||||
public String getContentValue() {
|
||||
return contentValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the content value.
|
||||
*
|
||||
* @param contentValue The content value.
|
||||
*/
|
||||
public void setContentValue(String contentValue) {
|
||||
this.contentValue = contentValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes the content value as the specified type.
|
||||
*
|
||||
* @param type The type.
|
||||
* @param <T> The type.
|
||||
* @return The deserialized value or null, if deserialization fails.
|
||||
*/
|
||||
public <T> T getContent(Class<T> type) {
|
||||
try {
|
||||
String value = getContentValue();
|
||||
if (value == null) return null;
|
||||
else return MAPPER.readValue(value, type);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to deserialize widget content.", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the content value by serializing the content as string.
|
||||
*
|
||||
* @param content The content to set.
|
||||
* @param <T> The type.
|
||||
*/
|
||||
public <T> void setContent(T content) {
|
||||
try {
|
||||
if (content == null) setContentValue(null);
|
||||
else setContentValue(MAPPER.writeValueAsString(content));
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to serialize widget content.", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes the widget data from its string representation.
|
||||
*
|
||||
* @param type The type.
|
||||
* @param <T> The type.
|
||||
* @return The data or null, if something fails.
|
||||
*/
|
||||
public <T> T getData(Class<T> type) {
|
||||
try {
|
||||
String value = getDataValue();
|
||||
if (value == null) return null;
|
||||
else return MAPPER.readValue(value, type);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to deserialize widget data.", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the widget data value by serializing the data.
|
||||
*
|
||||
* @param data The data.
|
||||
* @param <T> The type.
|
||||
*/
|
||||
public <T> void setData(T data) {
|
||||
try {
|
||||
if (data == null) setDataValue(null);
|
||||
else setDataValue(MAPPER.writeValueAsString(data));
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "Failed to serialize widget data.", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the temperature is shown as celsius.
|
||||
*
|
||||
* @return True if celsius, false for fahrenheit.
|
||||
*/
|
||||
public boolean isCelsius() {
|
||||
return celsius;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the temperature is shown as celsius.
|
||||
*
|
||||
* @param celsius True if celsius, false for fahrenheit.
|
||||
*/
|
||||
public void setCelsius(boolean celsius) {
|
||||
this.celsius = celsius;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines the unit system. True for si, false
|
||||
* for imperial.
|
||||
*
|
||||
* @return True for si, false for imperial.
|
||||
*/
|
||||
public boolean isSi() {
|
||||
return si;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the unit system. True for si, false
|
||||
* for imperial.
|
||||
*
|
||||
* @param si True for si, false for imperial.
|
||||
*/
|
||||
public void setSi(boolean si) {
|
||||
this.si = si;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.mowesta.android.app.database;
|
||||
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.Insert;
|
||||
import androidx.room.Query;
|
||||
import androidx.room.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The widget access to manipulate the stored widget data.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
@Dao
|
||||
public interface WidgetAccessor {
|
||||
|
||||
/**
|
||||
* Returns the widget with the specified id.
|
||||
*
|
||||
* @param id The id.
|
||||
* @return The widget.
|
||||
*/
|
||||
@Query("select * from widget where id=:id")
|
||||
Widget get(long id);
|
||||
|
||||
/**
|
||||
* Returns all widgets with the specified type and reference.
|
||||
*
|
||||
* @param type The type.
|
||||
* @param reference The reference.
|
||||
* @return The widgets matching the type and reference. There
|
||||
* should be only zero or one.
|
||||
*/
|
||||
@Query("select * from widget where type=:type and ref=:reference")
|
||||
List<Widget> get(int type, int reference);
|
||||
|
||||
/**
|
||||
* Inserts a widget into the databases.
|
||||
*
|
||||
* @param widget The widget to insert.
|
||||
*/
|
||||
@Insert
|
||||
void add(Widget widget);
|
||||
|
||||
/**
|
||||
* Updates the widget, if it exists.
|
||||
*
|
||||
* @param widget The widget to update.
|
||||
*/
|
||||
@Update
|
||||
void update(Widget widget);
|
||||
|
||||
/**
|
||||
* Deletes all widgets with the specified type and reference
|
||||
* from the database.
|
||||
*/
|
||||
@Query("delete from widget where type=:type and ref=:reference")
|
||||
void delete(int type, int reference);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.mowesta.android.app.database;
|
||||
|
||||
import androidx.room.Database;
|
||||
import androidx.room.RoomDatabase;
|
||||
|
||||
/**
|
||||
* The database to store the widget information.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
@Database(entities = { Widget.class }, version = 3, exportSchema = false)
|
||||
public abstract class WidgetDatabase extends RoomDatabase {
|
||||
|
||||
/**
|
||||
* Returns the widget accessor.
|
||||
*
|
||||
* @return The widget accessor.
|
||||
*/
|
||||
public abstract WidgetAccessor getAccessor();
|
||||
}
|
||||
@@ -25,7 +25,7 @@ import com.locoslab.android.leafless.MapView;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.databinding.FragmentCityBinding;
|
||||
import com.mowesta.android.app.model.AbstractPlaceViewModel;
|
||||
import com.mowesta.android.app.model.BindingTransforms;
|
||||
import com.mowesta.android.app.binding.BindingTransforms;
|
||||
import com.mowesta.android.app.model.CityViewModel;
|
||||
import com.mowesta.android.app.util.MapViewUtil;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import com.locoslab.android.leafless.MapView;
|
||||
import com.locoslab.android.leafless.polyline.Polyline;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.databinding.FragmentCityInfoBinding;
|
||||
import com.mowesta.android.app.model.BindingTransforms;
|
||||
import com.mowesta.android.app.binding.BindingTransforms;
|
||||
import com.mowesta.android.app.model.CityViewModel;
|
||||
import com.mowesta.android.app.model.ConditionViewModel;
|
||||
import com.mowesta.android.app.util.MapViewUtil;
|
||||
|
||||
@@ -11,7 +11,6 @@ import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.NavController;
|
||||
import androidx.navigation.NavOptions;
|
||||
@@ -27,14 +26,11 @@ import com.locoslab.android.leafless.polyline.Polyline;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.adapter.CityEntryPagedListAdapter;
|
||||
import com.mowesta.android.app.databinding.FragmentCountryBinding;
|
||||
import com.mowesta.android.app.databinding.FragmentStateBinding;
|
||||
import com.mowesta.android.app.model.AbstractPlaceViewModel;
|
||||
import com.mowesta.android.app.model.BindingTransforms;
|
||||
import com.mowesta.android.app.binding.BindingTransforms;
|
||||
import com.mowesta.android.app.model.CountryViewModel;
|
||||
import com.mowesta.android.app.model.StateViewModel;
|
||||
import com.mowesta.android.app.util.MapViewUtil;
|
||||
import com.mowesta.android.feign.model.Country;
|
||||
import com.mowesta.android.feign.model.State;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -11,20 +11,18 @@ import android.view.ViewGroup;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.NavController;
|
||||
import androidx.navigation.NavOptions;
|
||||
import androidx.navigation.Navigation;
|
||||
import androidx.paging.PagedListAdapter;
|
||||
import androidx.recyclerview.widget.DiffUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
||||
import com.mowesta.android.app.IApp;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.adapter.DeviceEntryPagedListAdapter;
|
||||
import com.mowesta.android.app.databinding.FragmentDevicesBinding;
|
||||
import com.mowesta.android.app.databinding.ViewDeviceEntryBinding;
|
||||
import com.mowesta.android.app.model.AbstractNetworkViewModel;
|
||||
import com.mowesta.android.app.model.DevicesViewModel;
|
||||
import com.mowesta.android.feign.model.Device;
|
||||
@@ -103,103 +101,4 @@ public class DevicesFragment extends AbstractNetworkFragment {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The view holder for the list of devices
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
private static class DeviceEntryViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
/**
|
||||
* The binding with the device view.
|
||||
*/
|
||||
private ViewDeviceEntryBinding binding;
|
||||
|
||||
/**
|
||||
* Creates a new view holder for the binding.
|
||||
*
|
||||
* @param binding The binding.
|
||||
*/
|
||||
public DeviceEntryViewHolder(@NonNull ViewDeviceEntryBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the model.
|
||||
*
|
||||
* @param device The device.
|
||||
*/
|
||||
public void setModel(Device device) {
|
||||
this.binding.setModel(device);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A callback to determine whether two devices are the same.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
private static class DeviceCallback extends DiffUtil.ItemCallback<Device> {
|
||||
|
||||
@Override
|
||||
public boolean areItemsTheSame(@NonNull Device oldItem, @NonNull Device newItem) {
|
||||
return oldItem.getId() != null && oldItem.getId().equals(newItem.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean areContentsTheSame(@NonNull Device oldItem, @NonNull Device newItem) {
|
||||
return oldItem.getId() != null && oldItem.getId().equals(newItem.getId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A list adapter to display the list of devices.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
private static class DeviceEntryPagedListAdapter extends PagedListAdapter<Device, DeviceEntryViewHolder> {
|
||||
|
||||
/**
|
||||
* The lifecycle owner.
|
||||
*/
|
||||
private @NonNull
|
||||
LifecycleOwner owner;
|
||||
|
||||
/**
|
||||
* The click listener.
|
||||
*/
|
||||
private @NonNull
|
||||
DevicesViewModel.OnDeviceSelectedListener listener;
|
||||
|
||||
/**
|
||||
* Creates a new paged list adapter that will inform
|
||||
* the listener about click events.
|
||||
*
|
||||
* @param owner The lifecycle owner.
|
||||
* @param listener The listener.
|
||||
*/
|
||||
public DeviceEntryPagedListAdapter(@NonNull LifecycleOwner owner, @NonNull DevicesViewModel.OnDeviceSelectedListener listener) {
|
||||
super(new DeviceCallback());
|
||||
this.owner = owner;
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public DeviceEntryViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ViewDeviceEntryBinding binding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.view_device_entry, parent, false);
|
||||
DeviceEntryViewHolder holder = new DeviceEntryViewHolder(binding);
|
||||
binding.setListener(listener);
|
||||
binding.setLifecycleOwner(owner);
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull DeviceEntryViewHolder holder, int position) {
|
||||
holder.setModel(getItem(position));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -85,10 +85,20 @@ public class DrawerFragment extends AbstractNetworkFragment {
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
// navigate to settings, if user pressed notification
|
||||
preventSplashScreen();
|
||||
handleNotificationIntent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent going back to the splash screen if opened through deep link.
|
||||
*/
|
||||
private void preventSplashScreen() {
|
||||
NavController nav = Navigation.findNavController(getActivity().findViewById(R.id.navigation_app));
|
||||
if (nav.getGraph().getId() != R.id.navigation_core) {
|
||||
nav.setGraph(R.navigation.navigation_core);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the intent was generated by the background service and
|
||||
* opens the settings screen, if this is the case
|
||||
@@ -114,7 +124,6 @@ public class DrawerFragment extends AbstractNetworkFragment {
|
||||
return view;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) {
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
|
||||
@@ -17,6 +17,7 @@ import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.NavController;
|
||||
import androidx.navigation.NavOptions;
|
||||
import androidx.navigation.Navigation;
|
||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
||||
@@ -26,8 +27,10 @@ import com.mowesta.android.app.databinding.ViewFavoriteEntryBinding;
|
||||
import com.mowesta.android.app.model.CustomizeViewModel;
|
||||
import com.mowesta.android.app.model.FavoritesViewModel;
|
||||
import com.mowesta.android.app.model.FavoritesViewModel.OnFavoriteSelectedListener;
|
||||
import com.mowesta.android.app.task.DatabaseTask;
|
||||
import com.mowesta.android.app.util.TabletUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -79,6 +82,52 @@ public class FavoritesFragment extends Fragment {
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
ItemTouchHelper touchHelper = new ItemTouchHelper(new ItemTouchHelper.Callback() {
|
||||
private int selection;
|
||||
private int target;
|
||||
private List<Favorite> favorites;
|
||||
|
||||
@Override
|
||||
public int getMovementFlags(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) {
|
||||
return makeMovementFlags(ItemTouchHelper.UP | ItemTouchHelper.DOWN, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onMove(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, @NonNull RecyclerView.ViewHolder target) {
|
||||
int fromPosition = viewHolder.getAdapterPosition();
|
||||
int toPosition = target.getAdapterPosition();
|
||||
this.target = toPosition;
|
||||
recyclerView.getAdapter().notifyItemMoved(fromPosition, toPosition);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) {
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSelectedChanged(@Nullable RecyclerView.ViewHolder viewHolder, int actionState) {
|
||||
super.onSelectedChanged(viewHolder, actionState);
|
||||
swipeRefreshLayout.setEnabled(actionState == ItemTouchHelper.ACTION_STATE_IDLE);
|
||||
if (actionState == ItemTouchHelper.ACTION_STATE_IDLE) {
|
||||
List<Favorite> current = model.getFavorites().getValue();
|
||||
if (selection != -1 && target != -1 && current == favorites) {
|
||||
favorites.add(target, favorites.remove(selection));
|
||||
model.updateFavorites(favorites);
|
||||
}
|
||||
selection = -1;
|
||||
target = -1;
|
||||
favorites = null;
|
||||
} else if (actionState == ItemTouchHelper.ACTION_STATE_DRAG) {
|
||||
favorites = model.getFavorites().getValue();
|
||||
selection = viewHolder.getAdapterPosition();
|
||||
target = -1;
|
||||
}
|
||||
}
|
||||
});
|
||||
touchHelper.attachToRecyclerView(recyclerView);
|
||||
CustomizeViewModel customize = new ViewModelProvider(getActivity()).get(CustomizeViewModel.class);
|
||||
customize.getUnitSystem().observe(getViewLifecycleOwner(), (v) -> recyclerView.getAdapter().notifyDataSetChanged());
|
||||
customize.getTemperatureUnit().observe(getViewLifecycleOwner(), (v) -> recyclerView.getAdapter().notifyDataSetChanged());
|
||||
@@ -126,6 +175,7 @@ public class FavoritesFragment extends Fragment {
|
||||
*/
|
||||
private @NonNull ViewFavoriteEntryBinding binding;
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new view holder.
|
||||
*
|
||||
@@ -144,6 +194,16 @@ public class FavoritesFragment extends Fragment {
|
||||
*/
|
||||
public void setModel(Favorite favorite) {
|
||||
this.binding.setModel(favorite);
|
||||
binding.getRoot().setVisibility(favorite == null || favorite.getCity() == null ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the favorite which may be null.
|
||||
*
|
||||
* @return The favorite.
|
||||
*/
|
||||
public Favorite getModel() {
|
||||
return binding.getModel();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -206,6 +266,7 @@ public class FavoritesFragment extends Fragment {
|
||||
public int getItemCount() {
|
||||
return (liveData.getValue() == null)?0: liveData.getValue().size();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
package com.mowesta.android.app.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.appwidget.AppWidgetManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.renderscript.ScriptGroup;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mowesta.android.app.IApp;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.adapter.CityEntryListAdapter;
|
||||
import com.mowesta.android.app.database.Widget;
|
||||
import com.mowesta.android.app.database.WidgetDatabase;
|
||||
import com.mowesta.android.app.databinding.FragmentForecastWidgetBinding;
|
||||
import com.mowesta.android.app.model.AbstractNetworkViewModel;
|
||||
import com.mowesta.android.app.model.ForecastWidgetViewModel;
|
||||
import com.mowesta.android.app.task.DatabaseTask;
|
||||
import com.mowesta.android.app.widget.ForecastWidgetProvider;
|
||||
import com.mowesta.android.app.widget.WidgetReceiver;
|
||||
import com.mowesta.android.app.widget.WidgetService;
|
||||
import com.mowesta.android.feign.model.City;
|
||||
|
||||
/**
|
||||
* A fragment to configure the forecast widget.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class ForecastWidgetFragment extends AbstractNetworkFragment {
|
||||
|
||||
/**
|
||||
* The bundle extra to store the widget id.
|
||||
*/
|
||||
private static final String EXTRA_WIDGET_ID = "widget_id";
|
||||
|
||||
@Override
|
||||
protected AbstractNetworkViewModel getNetworkViewModel() {
|
||||
return new ViewModelProvider(this).get(ForecastWidgetViewModel.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the widget id that is currently configured.
|
||||
*
|
||||
* @return The widget id that is currently configured.
|
||||
*/
|
||||
public int getWidgetId() {
|
||||
return getArguments().getInt(EXTRA_WIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with the widget id.
|
||||
*
|
||||
* @param widgetId The widget id.
|
||||
* @return The instance.
|
||||
*/
|
||||
public static ForecastWidgetFragment newInstance(int widgetId) {
|
||||
Bundle b = new Bundle();
|
||||
b.putInt(EXTRA_WIDGET_ID, widgetId);
|
||||
ForecastWidgetFragment fragment = new ForecastWidgetFragment();
|
||||
fragment.setArguments(b);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected View getErrorAnchorView() {
|
||||
return getView().findViewById(R.id.layout_coordinator);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
FragmentForecastWidgetBinding binding = DataBindingUtil.inflate(inflater, R.layout.fragment_forecast_widget, container, false);
|
||||
ForecastWidgetViewModel model = new ViewModelProvider(this).get(ForecastWidgetViewModel.class);
|
||||
binding.setLifecycleOwner(getViewLifecycleOwner());
|
||||
binding.setModel(model);
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
ForecastWidgetViewModel model = new ViewModelProvider(this).get(ForecastWidgetViewModel.class);
|
||||
RecyclerView recyclerView = view.findViewById(R.id.recycler);
|
||||
recyclerView.setAdapter(new CityEntryListAdapter(
|
||||
getViewLifecycleOwner(),
|
||||
(selection)-> model.getSelection().setValue(selection),
|
||||
model.getCities(),
|
||||
model.getSelection()));
|
||||
model.getFinished().observe(getViewLifecycleOwner(), (c) -> {
|
||||
if (c != null) finish(c, model.getCelsius().getValue());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Finishes the the configuration and stores the widget configuration in the database.
|
||||
*
|
||||
* @param city The city.
|
||||
* @param celsius A flag to indicate whether the widget uses celsius or fahrenheit.
|
||||
*/
|
||||
public void finish(City city, boolean celsius) {
|
||||
Activity activity = getActivity();
|
||||
Context app = activity.getApplicationContext();
|
||||
DatabaseTask<WidgetDatabase, Integer, Widget> task = new DatabaseTask<>((input, database)-> {
|
||||
long now = System.currentTimeMillis();
|
||||
Widget w = new Widget();
|
||||
w.setReference(input);
|
||||
w.setType(Widget.TYPE_FORECAST);
|
||||
w.setCelsius(celsius);
|
||||
w.setDataId(city.getId());
|
||||
w.setData(city);
|
||||
w.setDataTime(now);
|
||||
database.getAccessor().add(w);
|
||||
return w;
|
||||
}, (input, result) -> {
|
||||
ForecastWidgetProvider provider = new ForecastWidgetProvider();
|
||||
provider.triggerUpdate(app, input);
|
||||
if (!activity.isDestroyed()) {
|
||||
activity.finish();
|
||||
}
|
||||
});
|
||||
WidgetReceiver.scheduleUpdates(app);
|
||||
int id = getWidgetId();
|
||||
task.execute(id, ((IApp)activity.getApplicationContext()).getWidgetRepository().getDatabase());
|
||||
Intent resultValue = new Intent();
|
||||
resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, id);
|
||||
activity.setResult(Activity.RESULT_OK, resultValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+215
@@ -0,0 +1,215 @@
|
||||
package com.mowesta.android.app.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Application;
|
||||
import android.appwidget.AppWidgetManager;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.NavDeepLinkBuilder;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
||||
import com.mowesta.android.app.IApp;
|
||||
import com.mowesta.android.app.MowestaActivity;
|
||||
import com.mowesta.android.app.MowestaSettings;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.adapter.DeviceEntryPagedListAdapter;
|
||||
import com.mowesta.android.app.database.Widget;
|
||||
import com.mowesta.android.app.database.WidgetDatabase;
|
||||
import com.mowesta.android.app.databinding.FragmentMeasureWidgetBinding;
|
||||
import com.mowesta.android.app.model.AbstractNetworkViewModel;
|
||||
import com.mowesta.android.app.model.MeasureWidgetViewModel;
|
||||
import com.mowesta.android.app.task.DatabaseTask;
|
||||
import com.mowesta.android.app.widget.MeasureWidgetProvider;
|
||||
import com.mowesta.android.app.widget.WidgetReceiver;
|
||||
import com.mowesta.android.feign.model.Device;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A fragment to configure the measure widget.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class MeasureWidgetFragment extends AbstractNetworkFragment {
|
||||
|
||||
/**
|
||||
* The bundle extra to store the widget id.
|
||||
*/
|
||||
private static final String EXTRA_WIDGET_ID = "widget_id";
|
||||
|
||||
@Override
|
||||
protected AbstractNetworkViewModel getNetworkViewModel() {
|
||||
return new ViewModelProvider(this).get(MeasureWidgetViewModel.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the widget id that is currently configured.
|
||||
*
|
||||
* @return The widget id that is currently configured.
|
||||
*/
|
||||
public int getWidgetId() {
|
||||
return getArguments().getInt(EXTRA_WIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with the widget id.
|
||||
*
|
||||
* @param widgetId The widget id.
|
||||
* @return The instance.
|
||||
*/
|
||||
public static MeasureWidgetFragment newInstance(int widgetId) {
|
||||
Bundle b = new Bundle();
|
||||
b.putInt(EXTRA_WIDGET_ID, widgetId);
|
||||
MeasureWidgetFragment fragment = new MeasureWidgetFragment();
|
||||
fragment.setArguments(b);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected View getErrorAnchorView() {
|
||||
return getView().findViewById(R.id.layout_coordinator);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
FragmentMeasureWidgetBinding binding = DataBindingUtil.inflate(inflater, R.layout.fragment_measure_widget, container, false);
|
||||
MeasureWidgetViewModel model = new ViewModelProvider(this).get(MeasureWidgetViewModel.class);
|
||||
binding.setLifecycleOwner(getViewLifecycleOwner());
|
||||
binding.setModel(model);
|
||||
List<String> systems = getSystemEntries();
|
||||
binding.customizeSystem.setAdapter(createAdapter(systems));
|
||||
List<String> temperatures = getTemperatureEntries();
|
||||
binding.customizeTemperature.setAdapter(createAdapter(temperatures));
|
||||
model.getSi().observe(getViewLifecycleOwner(), (value) -> {
|
||||
binding.customizeSystem.setText(systems.get(value?0:1), false);
|
||||
});
|
||||
model.getCelsius().observe(getViewLifecycleOwner(), (value) -> {
|
||||
binding.customizeTemperature.setText(temperatures.get(value?0:1), false);
|
||||
});
|
||||
binding.customizeSystem.setOnItemClickListener((parent, view, position, id) -> {
|
||||
model.getSi().setValue(position == 0);
|
||||
});
|
||||
binding.customizeTemperature.setOnItemClickListener((parent, view, position, id) -> {
|
||||
model.getCelsius().setValue(position == 0);
|
||||
});
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
MeasureWidgetViewModel model = new ViewModelProvider(this).get(MeasureWidgetViewModel.class);
|
||||
RecyclerView recyclerView = view.findViewById(R.id.recycler);
|
||||
DeviceEntryPagedListAdapter adapter = new DeviceEntryPagedListAdapter(getViewLifecycleOwner(), (device) -> {
|
||||
model.getSelection().setValue(device);
|
||||
}, model.getSelection());
|
||||
IApp app = (IApp)getContext().getApplicationContext();
|
||||
app.getUserRepository().getCredentials().observe(getViewLifecycleOwner(), (c) -> model.setUserCredentials(c));
|
||||
SwipeRefreshLayout swipeRefreshLayout = view.findViewById(R.id.swipe_refresh);
|
||||
model.getDevices().observe(getViewLifecycleOwner(), (list) -> {
|
||||
adapter.submitList(list);
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
});
|
||||
recyclerView.setAdapter(adapter);
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> model.reload());
|
||||
model.getFinished().observe(getViewLifecycleOwner(), (c) -> {
|
||||
if (c != null) finish(c, model.getCelsius().getValue(), model.getSi().getValue());
|
||||
});
|
||||
model.getLogin().observe(getViewLifecycleOwner(), (v) -> {
|
||||
if (v) {
|
||||
startActivity(new Intent(getContext(), MowestaActivity.class));
|
||||
getActivity().finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array adapter using the customize view entry.
|
||||
*
|
||||
* @param strings The strings.
|
||||
* @return The array adapter.
|
||||
*/
|
||||
private ArrayAdapter<String> createAdapter(List<String> strings) {
|
||||
return new ArrayAdapter<>(getContext(), R.layout.view_customize_entry, strings);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the strings in the system combobox.
|
||||
*
|
||||
* @return The strings.
|
||||
*/
|
||||
private List<String> getSystemEntries() {
|
||||
List<String> result = new ArrayList<>(3);
|
||||
result.add(getString(R.string.customize_system_standard));
|
||||
result.add(getString(R.string.customize_system_imperial));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the strings in the temperature combobx.
|
||||
*
|
||||
* @return The strings.
|
||||
*/
|
||||
private List<String> getTemperatureEntries() {
|
||||
List<String> result = new ArrayList<>(3);
|
||||
result.add(getString(R.string.customize_temperature_celsius));
|
||||
result.add(getString(R.string.customize_temperature_fahrenheit));
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finishes the the configuration and stores the widget configuration in the database.
|
||||
*
|
||||
* @param device The device.
|
||||
* @param celsius A flag to indicate whether the widget uses celsius or fahrenheit.
|
||||
* @param si A flag to indicate which measurement unit system.
|
||||
*/
|
||||
public void finish(Device device, boolean celsius, boolean si) {
|
||||
Activity activity = getActivity();
|
||||
Context app = activity.getApplicationContext();
|
||||
DatabaseTask<WidgetDatabase, Integer, Widget> task = new DatabaseTask<>((input, database)-> {
|
||||
long now = System.currentTimeMillis();
|
||||
Widget w = new Widget();
|
||||
w.setReference(input);
|
||||
w.setType(Widget.TYPE_MEASURE);
|
||||
w.setCelsius(celsius);
|
||||
w.setSi(si);
|
||||
w.setDataId(device.getId());
|
||||
w.setData(device);
|
||||
w.setDataTime(now);
|
||||
database.getAccessor().add(w);
|
||||
return w;
|
||||
}, (input, result) -> {
|
||||
MeasureWidgetProvider provider = new MeasureWidgetProvider();
|
||||
provider.triggerUpdate(app, input);
|
||||
if (!activity.isDestroyed()) {
|
||||
activity.finish();
|
||||
}
|
||||
});
|
||||
WidgetReceiver.scheduleUpdates(app);
|
||||
int id = getWidgetId();
|
||||
task.execute(id, ((IApp)activity.getApplicationContext()).getWidgetRepository().getDatabase());
|
||||
Intent resultValue = new Intent();
|
||||
resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, id);
|
||||
activity.setResult(Activity.RESULT_OK, resultValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mowesta.android.app.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -12,7 +11,6 @@ import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.NavController;
|
||||
import androidx.navigation.NavOptions;
|
||||
@@ -29,7 +27,7 @@ import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.adapter.CityEntryPagedListAdapter;
|
||||
import com.mowesta.android.app.databinding.FragmentStateBinding;
|
||||
import com.mowesta.android.app.model.AbstractPlaceViewModel;
|
||||
import com.mowesta.android.app.model.BindingTransforms;
|
||||
import com.mowesta.android.app.binding.BindingTransforms;
|
||||
import com.mowesta.android.app.model.StateViewModel;
|
||||
import com.mowesta.android.app.util.MapViewUtil;
|
||||
import com.mowesta.android.feign.model.State;
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
package com.mowesta.android.app.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
@@ -15,7 +11,6 @@ import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.NavController;
|
||||
import androidx.navigation.Navigation;
|
||||
@@ -29,20 +24,12 @@ import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
import com.locoslab.android.leafless.MapView;
|
||||
import com.locoslab.android.leafless.marker.Marker;
|
||||
import com.locoslab.library.geometry.wgs.Coordinate;
|
||||
import com.mowesta.android.app.MowestaSettings;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.adapter.CityEntryPagedListAdapter;
|
||||
import com.mowesta.android.app.adapter.DiagramEntryPagedListAdapter;
|
||||
import com.mowesta.android.app.databinding.FragmentStateBinding;
|
||||
import com.mowesta.android.app.databinding.FragmentStationBinding;
|
||||
import com.mowesta.android.app.model.AbstractNetworkViewModel;
|
||||
import com.mowesta.android.app.model.BindingTransforms;
|
||||
import com.mowesta.android.app.model.DiagramEntry;
|
||||
import com.mowesta.android.app.model.StateViewModel;
|
||||
import com.mowesta.android.app.model.StationViewModel;
|
||||
import com.mowesta.android.app.model.StationsViewModel;
|
||||
import com.mowesta.android.app.util.MapViewUtil;
|
||||
import com.mowesta.android.feign.model.State;
|
||||
import com.mowesta.android.feign.model.WeatherReport;
|
||||
import com.mowesta.android.feign.model.WeatherStation;
|
||||
|
||||
|
||||
+3
-3
@@ -87,8 +87,8 @@ public abstract class AbstractNetworkViewModel extends AndroidViewModel {
|
||||
*/
|
||||
public AbstractNetworkViewModel(@NonNull Application application) {
|
||||
super(application);
|
||||
this.requests.observeForever((v) -> printState());
|
||||
this.error.observeForever((v) -> printState());
|
||||
//this.requests.observeForever((v) -> printState());
|
||||
//this.error.observeForever((v) -> printState());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -181,7 +181,7 @@ public abstract class AbstractNetworkViewModel extends AndroidViewModel {
|
||||
this.requests.setValue(0);
|
||||
this.error.setValue(Boolean.FALSE);
|
||||
requestCode += 1;
|
||||
printState();
|
||||
//printState();
|
||||
return requestCode;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.mowesta.android.app.task.ApiTask;
|
||||
import com.mowesta.android.app.task.DatabaseTask;
|
||||
import com.mowesta.android.app.util.DateFormatter;
|
||||
import com.mowesta.android.app.util.TimeUtils;
|
||||
import com.mowesta.android.app.util.WeatherAggregate;
|
||||
import com.mowesta.android.feign.api.DefaultApi;
|
||||
import com.mowesta.android.feign.model.City;
|
||||
import org.geojson.Geometry;
|
||||
@@ -254,8 +255,6 @@ public class CityViewModel extends AbstractPlaceViewModel {
|
||||
forecast.observeForever((c)-> updateConditions());
|
||||
city.observeForever((c)-> { updateConditions(); updateVideos(); updateLinks(); } );
|
||||
videos.observeForever((c) -> updateVideos());
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -444,86 +443,10 @@ public class CityViewModel extends AbstractPlaceViewModel {
|
||||
day.setValue(null);
|
||||
time.setValue(null);
|
||||
} else {
|
||||
DateFormatter df = new DateFormatter(getApplication());
|
||||
long now = System.currentTimeMillis();
|
||||
String tz = city.getValue().getTimezone();
|
||||
TimeUtils d = new TimeUtils(now, tz);
|
||||
List<WeatherCondition> wc = new ArrayList<>(forecast.getValue().getConditions());
|
||||
Collections.sort(wc, (a, b) -> (int)(a.getTime() - b.getTime()));
|
||||
List<ConditionViewModel> hours = new ArrayList<>();
|
||||
List<List<WeatherCondition>> days = new ArrayList<>();
|
||||
List<List<WeatherCondition>> times = new ArrayList<>();
|
||||
List<WeatherCondition> currentDay = null;
|
||||
List<WeatherCondition> currentTime = null;
|
||||
for (WeatherCondition c: wc) {
|
||||
long end = d.getEnd(c);
|
||||
ConditionViewModel vm = new ConditionViewModel(getApplication());
|
||||
long time = c.getTime();
|
||||
String title = d.getDayName(getApplication(), time);
|
||||
String subtitle = getApplication().getString(R.string.format_two_parts, df.asTime(time, tz), df.asDate(time, tz));
|
||||
vm.setData(title, subtitle, c, tz);
|
||||
hours.add(vm);
|
||||
if (currentDay == null) {
|
||||
currentDay = new ArrayList<>();
|
||||
currentDay.add(c);
|
||||
} else {
|
||||
if (d.isSameDay(d.getTime(currentDay), c.getTime())) {
|
||||
currentDay.add(c);
|
||||
} else {
|
||||
days.add(currentDay);
|
||||
currentDay = new ArrayList<>();
|
||||
currentDay.add(c);
|
||||
}
|
||||
}
|
||||
if (!d.isSameDay(d.getTime(currentDay), end)) {
|
||||
days.add(currentDay);
|
||||
currentDay = new ArrayList<>();
|
||||
currentDay.add(c);
|
||||
}
|
||||
if (currentTime == null) {
|
||||
currentTime = new ArrayList<>();
|
||||
currentTime.add(c);
|
||||
} else {
|
||||
if (d.isSameSlot(d.getTime(currentTime), c.getTime())) {
|
||||
currentTime.add(c);
|
||||
} else {
|
||||
times.add(currentTime);
|
||||
currentTime = new ArrayList<>();
|
||||
currentTime.add(c);
|
||||
}
|
||||
}
|
||||
if (!d.isSameSlot(d.getTime(currentTime), end)) {
|
||||
times.add(currentTime);
|
||||
currentTime = new ArrayList<>();
|
||||
currentTime.add(c);
|
||||
}
|
||||
}
|
||||
if (currentDay != null) days.add(currentDay);
|
||||
if (currentTime != null) times.add(currentTime);
|
||||
List<SummaryViewModel> models = new ArrayList<>();
|
||||
for (List<WeatherCondition> ds: days) {
|
||||
long time = d.getTime(ds);
|
||||
String title = d.getDayName(getApplication(), time);
|
||||
SummaryViewModel summary = new SummaryViewModel(getApplication());
|
||||
WeatherCondition[] data = new WeatherCondition[ds.size()];
|
||||
data = ds.toArray(data);
|
||||
summary.setData(title, getApplication().getString(R.string.label_full_day), data, tz);
|
||||
models.add(summary);
|
||||
}
|
||||
day.setValue(models);
|
||||
models = new ArrayList<>();
|
||||
for (List<WeatherCondition> ts: times) {
|
||||
long time = d.getTime(ts);
|
||||
String title = d.getDayName(getApplication(), time);
|
||||
int slot = d.getSlotName(time);
|
||||
SummaryViewModel summary = new SummaryViewModel(getApplication());
|
||||
WeatherCondition[] data = new WeatherCondition[ts.size()];
|
||||
data = ts.toArray(data);
|
||||
summary.setData(title, getApplication().getString(slot), data, tz);
|
||||
models.add(summary);
|
||||
}
|
||||
time.setValue(models);
|
||||
hour.setValue(hours);
|
||||
WeatherAggregate a = WeatherAggregate.getAggregate(getApplication(), city.getValue().getTimezone(), forecast.getValue().getConditions());
|
||||
hour.setValue(a.getHours());
|
||||
day.setValue(a.getDays());
|
||||
time.setValue(a.getTimes());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mowesta.android.app.model;
|
||||
|
||||
import android.app.Application;
|
||||
import android.icu.util.Measure;
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -12,6 +11,7 @@ import androidx.paging.LivePagedListBuilder;
|
||||
import androidx.paging.PagedList;
|
||||
import androidx.paging.PositionalDataSource;
|
||||
|
||||
import com.mowesta.android.app.binding.DiagramEntry;
|
||||
import com.mowesta.android.app.repository.UserCredentials;
|
||||
import com.mowesta.android.app.task.ApiTask;
|
||||
import com.mowesta.android.feign.model.Device;
|
||||
|
||||
@@ -28,18 +28,6 @@ import java.util.ArrayList;
|
||||
*/
|
||||
public class DevicesViewModel extends AbstractNetworkViewModel {
|
||||
|
||||
/**
|
||||
* A listener that is informed when a device is selected.
|
||||
*/
|
||||
public interface OnDeviceSelectedListener {
|
||||
|
||||
/**
|
||||
* Called when a device is selected.
|
||||
*
|
||||
* @param device The selected device.
|
||||
*/
|
||||
void onDeviceSelected(Device device);
|
||||
}
|
||||
|
||||
/**
|
||||
* The list with the user's devices.
|
||||
@@ -78,7 +66,7 @@ public class DevicesViewModel extends AbstractNetworkViewModel {
|
||||
}, config);
|
||||
builder.setFetchExecutor((r) -> handler.post(r));
|
||||
devices = builder.build();
|
||||
credentials.removeObserver((c) -> {
|
||||
credentials.observeForever((c) -> {
|
||||
reload();
|
||||
});
|
||||
}
|
||||
@@ -94,6 +82,7 @@ public class DevicesViewModel extends AbstractNetworkViewModel {
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
error.setValue(false);
|
||||
PagedList<Device> list = devices.getValue();
|
||||
if (list != null) {
|
||||
list.getDataSource().invalidate();
|
||||
@@ -108,6 +97,14 @@ public class DevicesViewModel extends AbstractNetworkViewModel {
|
||||
return devices;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a live data object to access the credentials.
|
||||
*
|
||||
* @return The credentials.
|
||||
*/
|
||||
public LiveData<UserCredentials> getCredentials() {
|
||||
return credentials;
|
||||
}
|
||||
|
||||
/**
|
||||
* A data source for the paging framework that loads the
|
||||
|
||||
@@ -12,9 +12,15 @@ import com.mowesta.android.app.database.Favorite;
|
||||
import com.mowesta.android.app.database.FavoriteDatabase;
|
||||
import com.mowesta.android.app.repository.UserCredentials;
|
||||
import com.mowesta.android.app.repository.UserRepository;
|
||||
import com.mowesta.android.app.task.ApiTask;
|
||||
import com.mowesta.android.app.task.DatabaseTask;
|
||||
import com.mowesta.android.app.task.RefreshTask;
|
||||
import com.mowesta.android.app.task.SyncTask;
|
||||
import com.mowesta.android.feign.api.DefaultApi;
|
||||
import com.mowesta.android.feign.model.LocationReference;
|
||||
import com.mowesta.android.feign.model.Settings;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -38,6 +44,55 @@ public class FavoritesViewModel extends AndroidViewModel {
|
||||
void onFavoriteSelected(Favorite favorite);
|
||||
}
|
||||
|
||||
/**
|
||||
*The task that applies reorderings to the backend.
|
||||
*/
|
||||
private ApiTask<List<Favorite>, Void> remoteReorderTask = new ApiTask<>((input, client)->{
|
||||
Settings settings = client.getCurrentUserSettings();
|
||||
List<LocationReference> oldReferences = settings.getLocations();
|
||||
List<LocationReference> newReferences = new ArrayList<>();
|
||||
for (Favorite f: input) {
|
||||
search: for (int i = 0; i < oldReferences.size(); i++) {
|
||||
LocationReference r = oldReferences.get(i);
|
||||
if (r.getType() == f.getType() && r.getId() != null && r.getId().equals(f.getId())) {
|
||||
newReferences.add(r);
|
||||
oldReferences.remove(i);
|
||||
break search;
|
||||
}
|
||||
}
|
||||
}
|
||||
newReferences.addAll(oldReferences);
|
||||
settings.setLocations(newReferences);
|
||||
client.setCurrentUserSettings(settings);
|
||||
return null;
|
||||
},(input, output)->{
|
||||
// nothing to do
|
||||
}, (input, status)->{
|
||||
// ignore for now
|
||||
});
|
||||
|
||||
/**
|
||||
* The tasks that performs a local reordering in the database.
|
||||
*/
|
||||
private DatabaseTask<FavoriteDatabase, List<Favorite>, Void> localReoderTask = new DatabaseTask<>(
|
||||
(list, database) -> {
|
||||
database.runInTransaction(() -> {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
Favorite input = list.get(i);
|
||||
Favorite target = database.getAccessor().findById(input.getType(), input.getId());
|
||||
if (target != null && !target.isDeleted()) {
|
||||
target.setPosition(i);
|
||||
database.getAccessor().update(target);
|
||||
}
|
||||
}
|
||||
});
|
||||
return null;
|
||||
}, (input, output) -> {
|
||||
updateRemote(input);
|
||||
});
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The live data list of favorites from the database.
|
||||
*/
|
||||
@@ -130,4 +185,26 @@ public class FavoritesViewModel extends AndroidViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Updates the order of the favorites locally and remotely.
|
||||
*
|
||||
* @param favorites The favorites.
|
||||
*/
|
||||
public void updateFavorites(List<Favorite> favorites) {
|
||||
localReoderTask.execute(favorites, getFavoriteDatabase());
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the favorites remotely.
|
||||
*
|
||||
* @param favorites The favorites.
|
||||
*/
|
||||
private void updateRemote(List<Favorite> favorites) {
|
||||
UserCredentials c = getUserRepository().getCredentials().getValue();
|
||||
if (c != null) {
|
||||
remoteReorderTask.execute(favorites, getApp().getClientFactory().createClient(c));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
package com.mowesta.android.app.model;
|
||||
|
||||
import android.app.Application;
|
||||
import android.location.Location;
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.mowesta.android.app.IApp;
|
||||
import com.mowesta.android.app.MowestaSettings;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.database.Favorite;
|
||||
import com.mowesta.android.app.database.FavoriteDatabase;
|
||||
import com.mowesta.android.app.model.AbstractNetworkViewModel;
|
||||
import com.mowesta.android.app.repository.ClientFactory;
|
||||
import com.mowesta.android.app.task.ApiTask;
|
||||
import com.mowesta.android.app.task.DatabaseTask;
|
||||
import com.mowesta.android.feign.model.City;
|
||||
import com.mowesta.android.feign.model.CityPage;
|
||||
import com.mowesta.android.feign.model.LocationHierarchy;
|
||||
import com.mowesta.android.feign.model.LocationHierarchyPage;
|
||||
import com.mowesta.android.feign.model.LocationReference;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A view model for a forecast widget. It provides possibilities to search for cities with a term
|
||||
* and a list of favorites.
|
||||
*
|
||||
* @author Johannes
|
||||
*/
|
||||
public class ForecastWidgetViewModel extends AbstractNetworkViewModel {
|
||||
|
||||
/**
|
||||
* The log tag.
|
||||
*/
|
||||
private static final String TAG = "ForecastWidgetViewModel";
|
||||
|
||||
/**
|
||||
* A handler to post updates.
|
||||
*/
|
||||
private final Handler handler = new Handler();
|
||||
|
||||
/** A flag to indicate whether the submit button can be pressed. */
|
||||
private final MutableLiveData<Boolean> valid = new MutableLiveData<>(Boolean.FALSE);
|
||||
|
||||
/** The selected city, once the submit button has been pressed. */
|
||||
private final MutableLiveData<City> finished = new MutableLiveData<>(null);
|
||||
|
||||
/** The search term. */
|
||||
private final MutableLiveData<String> term = new MutableLiveData<>("");
|
||||
|
||||
/** The currently selected city. */
|
||||
private final MutableLiveData<City> selection = new MutableLiveData<>(null);
|
||||
|
||||
/** The cities that are displayed in the list. */
|
||||
private final MutableLiveData<List<City>> cities = new MutableLiveData<>(new ArrayList<>());
|
||||
|
||||
/** A boolean to indicate the temperature scale. */
|
||||
private final MutableLiveData<Boolean> celsius = new MutableLiveData<>(Boolean.TRUE);
|
||||
|
||||
/** The favorites of the user that are displayed, if there is no search term. */
|
||||
private final MutableLiveData<List<City>> favorites = new MutableLiveData<>(new ArrayList<>());
|
||||
|
||||
private ApiTask<RequestParameter<String>, CityPage> searchTask = new ApiTask<>(
|
||||
(input, client) -> {
|
||||
CityPage cities = client.searchCities(getApplication().getString(R.string.language_code), input.getValue(), 0, 20, null);
|
||||
return cities;
|
||||
},
|
||||
(input, result) -> {
|
||||
completeRequest(input, () -> cities.setValue(result.getElements()));
|
||||
},
|
||||
(input, status) -> {
|
||||
finishRequest(input, true);
|
||||
});
|
||||
|
||||
private DatabaseTask<FavoriteDatabase, Void, List<City>> favoritesTask = new DatabaseTask<>((input, database)-> {
|
||||
List<Favorite> fs = database.getAccessor().getActive(LocationReference.TypeEnum.CITY.ordinal());
|
||||
List<City> rs = new ArrayList<>();
|
||||
for (Favorite f: fs) {
|
||||
City c = f.getCity();
|
||||
if (c != null) rs.add(c);
|
||||
}
|
||||
return rs;
|
||||
}, (input, output) -> {
|
||||
favorites.setValue(output);
|
||||
if (term.getValue().length() == 0) {
|
||||
cities.setValue(output);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Creates a new view model.
|
||||
*
|
||||
* @param application The application.
|
||||
*/
|
||||
public ForecastWidgetViewModel(@NonNull Application application) {
|
||||
super(application);
|
||||
term.observeForever(v -> executeSearch(v));
|
||||
selection.observeForever(v -> valid.setValue(v != null));
|
||||
favoritesTask.execute(null, getApp().getFavoriteRepository().getDatabase());
|
||||
}
|
||||
|
||||
/*
|
||||
public LiveData<LocationHierarchyPage> getResults() {
|
||||
return results;
|
||||
}*/
|
||||
|
||||
public MutableLiveData<String> getTerm() {
|
||||
return term;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
this.term.setValue(term.getValue());
|
||||
}
|
||||
|
||||
private void executeSearch(final String term) {
|
||||
long code = newRequestCode();
|
||||
selection.setValue(null);
|
||||
if (term.length() == 0) {
|
||||
cities.setValue(favorites.getValue());
|
||||
} else if (term.length() < 3) {
|
||||
cities.setValue(new ArrayList<>());
|
||||
} else {
|
||||
cities.setValue(new ArrayList<>());
|
||||
startRequest(code);
|
||||
handler.postDelayed(() -> {
|
||||
if (isCurrentRequest(code)) {
|
||||
searchTask.execute(new RequestParameter<>(code, term), getClientFactory().createClient());
|
||||
}
|
||||
}, 250);
|
||||
}
|
||||
}
|
||||
|
||||
public MutableLiveData<List<City>> getCities() {
|
||||
return cities;
|
||||
}
|
||||
|
||||
public MutableLiveData<Boolean> getValid() {
|
||||
return valid;
|
||||
}
|
||||
|
||||
public MutableLiveData<Boolean> getCelsius() {
|
||||
return celsius;
|
||||
}
|
||||
|
||||
public MutableLiveData<City> getFinished() {
|
||||
return finished;
|
||||
}
|
||||
|
||||
public MutableLiveData<City> getSelection() {
|
||||
return selection;
|
||||
}
|
||||
|
||||
public void setCelsius(boolean value) {
|
||||
this.celsius.setValue(value);
|
||||
}
|
||||
|
||||
public void onSave() {
|
||||
City c = selection.getValue();
|
||||
if (c != null) {
|
||||
finished.setValue(c);
|
||||
}
|
||||
}
|
||||
|
||||
private static CityPage emptyPage() {
|
||||
CityPage result = new CityPage();
|
||||
result.setElements(Collections.emptyList());
|
||||
result.setTotal(0);
|
||||
result.setOffset(0);
|
||||
result.setSize(20);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.mowesta.android.app.model;
|
||||
|
||||
import android.app.Application;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.AndroidViewModel;
|
||||
@@ -10,11 +11,15 @@ import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.mowesta.android.app.IApp;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.database.FavoriteDatabase;
|
||||
import com.mowesta.android.app.repository.ClientFactory;
|
||||
import com.mowesta.android.app.repository.DeviceRepository;
|
||||
import com.mowesta.android.app.repository.UserCredentials;
|
||||
import com.mowesta.android.app.repository.UserRepository;
|
||||
import com.mowesta.android.app.task.ApiTask;
|
||||
import com.mowesta.android.app.task.RefreshTask;
|
||||
import com.mowesta.android.app.task.SyncTask;
|
||||
import com.mowesta.android.feign.ApiClient;
|
||||
import com.mowesta.android.feign.api.DefaultApi;
|
||||
import com.mowesta.android.feign.model.Device;
|
||||
import com.mowesta.android.feign.model.DeviceHandle;
|
||||
@@ -114,8 +119,11 @@ public class LoginViewModel extends AndroidViewModel {
|
||||
info.setOs(DeviceInfo.OsEnum.ANDROID);
|
||||
return client.createDevice(info);
|
||||
}, (input, result) -> {
|
||||
if (input != null) getUserRepository().setCredentials(input);
|
||||
getDeviceRepository().setDevice(result);
|
||||
if (input != null) {
|
||||
getUserRepository().setCredentials(input);
|
||||
syncFavorites();
|
||||
}
|
||||
destination.setValue(Destination.COLLECTION);
|
||||
}, (input, status) -> {
|
||||
checking.setValue(false);
|
||||
@@ -135,6 +143,7 @@ public class LoginViewModel extends AndroidViewModel {
|
||||
getUserRepository().setCredentials((UserCredentials)input[0]);
|
||||
getDeviceRepository().setDevice(result);
|
||||
destination.setValue(Destination.DEVICES);
|
||||
syncFavorites();
|
||||
}, (input, status) -> {
|
||||
checking.setValue(false);
|
||||
if (status == 403) {
|
||||
@@ -154,6 +163,7 @@ public class LoginViewModel extends AndroidViewModel {
|
||||
(input, result)-> {
|
||||
getUserRepository().setCredentials(input);
|
||||
destination.setValue(Destination.DEVICES);
|
||||
syncFavorites();
|
||||
}, (input, status) -> {
|
||||
checking.setValue(false);
|
||||
if (status == 403) {
|
||||
@@ -448,5 +458,27 @@ public class LoginViewModel extends AndroidViewModel {
|
||||
}
|
||||
|
||||
|
||||
private FavoriteDatabase getFavoriteDatabase() {
|
||||
return ((IApp)getApplication()).getFavoriteRepository().getDatabase();
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers the synchronization of the favorites.
|
||||
*/
|
||||
private void syncFavorites() {
|
||||
Log.d("LoginViewModel", "Syncing favorites.");
|
||||
UserCredentials credentials = getUserRepository().getCredentials().getValue();
|
||||
DefaultApi api = getClientFactory().createClient(credentials);
|
||||
RefreshTask refreshTask = new RefreshTask(getFavoriteDatabase(), (success)-> {
|
||||
Log.d("LoginViewModel", "Refresh complete: " + success);
|
||||
});
|
||||
SyncTask syncTask = new SyncTask(getFavoriteDatabase(), (success)-> {
|
||||
Log.d("LoginViewModel", "Sync complete: " + success);
|
||||
refreshTask.execute(api);
|
||||
});
|
||||
syncTask.execute(api);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.mowesta.android.app.model;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.paging.PagedList;
|
||||
|
||||
import com.mowesta.android.feign.model.City;
|
||||
import com.mowesta.android.feign.model.Device;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The view model to fingure a measure widget.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class MeasureWidgetViewModel extends DevicesViewModel {
|
||||
|
||||
|
||||
/** A flag to indicate whether the submit button can be pressed. */
|
||||
private final MutableLiveData<Boolean> valid = new MutableLiveData<>(Boolean.FALSE);
|
||||
|
||||
/** The selected device, once the submit button has been pressed. */
|
||||
private final MutableLiveData<Device> finished = new MutableLiveData<>(null);
|
||||
|
||||
/** A flag to indicate that the user pressed the login button. */
|
||||
private final MutableLiveData<Boolean> login = new MutableLiveData<>(Boolean.FALSE);
|
||||
|
||||
/** The currently selected device. */
|
||||
private final MutableLiveData<Device> selection = new MutableLiveData<>(null);
|
||||
|
||||
/** A boolean to indicate the temperature scale. */
|
||||
private final MutableLiveData<Boolean> celsius = new MutableLiveData<>(Boolean.TRUE);
|
||||
|
||||
/** A boolean to indicate the temperature scale. */
|
||||
private final MutableLiveData<Boolean> si = new MutableLiveData<>(Boolean.TRUE);
|
||||
|
||||
/**
|
||||
* Creates the view model.
|
||||
*
|
||||
* @param application The application.
|
||||
*/
|
||||
public MeasureWidgetViewModel(@NonNull Application application) {
|
||||
super(application);
|
||||
selection.observeForever(v -> valid.setValue(v != null));
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the user presses the save button.
|
||||
*/
|
||||
public void onSave() {
|
||||
Device d = selection.getValue();
|
||||
if (d != null) {
|
||||
finished.setValue(d);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called if the user pressed the login button.
|
||||
*/
|
||||
public void onLogin() {
|
||||
login.setValue(Boolean.TRUE);
|
||||
}
|
||||
|
||||
public void setCelsius(boolean value) {
|
||||
this.celsius.setValue(value);
|
||||
}
|
||||
|
||||
public void setSi(boolean value) {
|
||||
this.si.setValue(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the live data with the unit system.
|
||||
*
|
||||
* @return The live data.
|
||||
*/
|
||||
public MutableLiveData<Boolean> getSi() {
|
||||
return si;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the live data with the temperature unit.
|
||||
*
|
||||
* @return The live data.
|
||||
*/
|
||||
public MutableLiveData<Boolean> getCelsius() {
|
||||
return celsius;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the live data with the model validity.
|
||||
*
|
||||
* @return The live data.
|
||||
*/
|
||||
public MutableLiveData<Boolean> getValid() {
|
||||
return valid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the live data with the selected device.
|
||||
*
|
||||
* @return The live data.
|
||||
*/
|
||||
public MutableLiveData<Device> getSelection() {
|
||||
return selection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the live data with the final selection.
|
||||
*
|
||||
* @return The live data.
|
||||
*/
|
||||
public MutableLiveData<Device> getFinished() {
|
||||
return finished;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the live data with the final selection.
|
||||
*
|
||||
* @return The live data.
|
||||
*/
|
||||
public MutableLiveData<Boolean> getLogin() { return login; }
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mowesta.android.app.model;
|
||||
|
||||
import android.app.Application;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -9,11 +8,11 @@ import androidx.lifecycle.AndroidViewModel;
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.mowesta.android.app.binding.MeasurementType;
|
||||
import com.mowesta.android.app.binding.MeasurementValue;
|
||||
import com.mowesta.android.feign.model.Measurement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -25,228 +24,6 @@ import java.util.Map;
|
||||
public class MeasurementViewModel extends AndroidViewModel {
|
||||
|
||||
|
||||
/**
|
||||
* The types of measurement context.
|
||||
*
|
||||
* @author Sebastian
|
||||
*/
|
||||
public enum MeasurementType {
|
||||
|
||||
/**
|
||||
* A boolean to identify whether the battery is charging.
|
||||
* e.g. true false
|
||||
*/
|
||||
BATTERY_CHARGING(Boolean.class),
|
||||
|
||||
/**
|
||||
* The temperature reading of the battery (double value in centigrade, can be read through ACTION_BATTERY_CHANGED).
|
||||
* e.g. 37.1, -1.3
|
||||
*/
|
||||
BATTERY_TEMPERATURE(Double.class),
|
||||
|
||||
/**
|
||||
* A temperature reading of a temperature sensor (double value in centigrade, TYPE_TEMERATURE on Android).
|
||||
* e.g. 37.1, -1.3
|
||||
*/
|
||||
SENSOR_TEMPERATURE(Double.class),
|
||||
|
||||
/**
|
||||
* A pressure reading of a barometer sensor (double value in hPa, TYPE_BAROMETER on Android).
|
||||
* e.g. 1000.0, 998.26127
|
||||
*/
|
||||
SENSOR_PRESSURE(Double.class),
|
||||
|
||||
/**
|
||||
* A humidity reading of a humidity sensor (double value as relative humidity in %, TYPE_RELATIVE_HUMIDITY on Android).
|
||||
* range: 0-1 (0->0%, 1->100%, 0.5->50%)
|
||||
*/
|
||||
SENSOR_HUMIDITY(Double.class),
|
||||
|
||||
/**
|
||||
* The temperature of the cpu (double value in centigrade, can be read by analyzing the proc file system).
|
||||
* e.g. 37.1 -1.3
|
||||
*/
|
||||
CPU_TEMPERATURE(Double.class),
|
||||
|
||||
/**
|
||||
* The current frequency of the cpu (double value in mhz, can be read by analyzing the proc file system).
|
||||
*/
|
||||
CPU_FREQUENCY(Double.class),
|
||||
|
||||
/**
|
||||
* A boolean to determine whether the screen is on (true) or off (false).
|
||||
*/
|
||||
SCREEN_ENABLED(Boolean.class),
|
||||
|
||||
/**
|
||||
* The voltage of the battery (used to monitor the battery of the weather station).
|
||||
* e.g. 3.77 -> 3.77 Volt
|
||||
*/
|
||||
BATTERY_VOLTAGE(Double.class),
|
||||
|
||||
/**
|
||||
* The voltage of the solar panel (used to estimate whether the weather station is located in the sun).
|
||||
* e.g. 3.77 -> 3.77 Volt
|
||||
*/
|
||||
SOLAR_VOLTAGE(Double.class);
|
||||
|
||||
/**
|
||||
* The data type.
|
||||
*/
|
||||
private Class<?> type;
|
||||
|
||||
/**
|
||||
* Creates a measurement type with the specified data type.
|
||||
*
|
||||
* @param type The data type expected for the measurement.
|
||||
*/
|
||||
private MeasurementType(Class<?> type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the data type.
|
||||
*
|
||||
* @return The data type.
|
||||
*/
|
||||
public Class<?> getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the data and returns a java array with the type
|
||||
* represented by this constant or an empty array, if the
|
||||
* data cannot be parsed.
|
||||
*
|
||||
* @param value The value to parse.
|
||||
* @return The java object.
|
||||
*/
|
||||
public Object[] getValues(String value) {
|
||||
List<Object> result = new ArrayList<>();
|
||||
if (value != null) {
|
||||
String[] substrings = value.split(",");
|
||||
if (type == Boolean.class) {
|
||||
for (String s: substrings) {
|
||||
Boolean b = (Boolean)parseValue(s);
|
||||
if (b != null) result.add(b);
|
||||
}
|
||||
} else if (type == Double.class) {
|
||||
for (String s: substrings) {
|
||||
Double d = (Double)parseValue(s);
|
||||
if (d != null) result.add(d);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toArray(new Object[result.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a single value.
|
||||
*
|
||||
* @param value The string value.
|
||||
* @return The parsed value.
|
||||
*/
|
||||
private Object parseValue(String value) {
|
||||
if (value == null) return null;
|
||||
value = value.trim();
|
||||
if (type == Boolean.class) {
|
||||
if ("true".equalsIgnoreCase(value)) return Boolean.TRUE;
|
||||
if ("false".equalsIgnoreCase(value)) return Boolean.FALSE;
|
||||
return null;
|
||||
} else if (type == Double.class) {
|
||||
try {
|
||||
return Double.valueOf(Double.parseDouble(value));
|
||||
} catch (NumberFormatException e) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Represents a single measurement value.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public static class MeasurementValue {
|
||||
|
||||
/**
|
||||
* The log tag.
|
||||
*/
|
||||
private static final String TAG = "MeasurementValue";
|
||||
|
||||
/**
|
||||
* The measurement type.
|
||||
*/
|
||||
private @NonNull MeasurementType type;
|
||||
|
||||
/**
|
||||
* The measurement value.
|
||||
*/
|
||||
private @Nullable String value;
|
||||
|
||||
/**
|
||||
* The extracted values.
|
||||
*/
|
||||
private @NonNull Object[] values;
|
||||
|
||||
public MeasurementValue(@NonNull MeasurementType type, @Nullable String value) {
|
||||
this.type = type;
|
||||
this.value = value;
|
||||
this.values = parseValues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to parse the value based on the type.
|
||||
*
|
||||
* @return The values.
|
||||
*/
|
||||
private @NonNull Object[] parseValues() {
|
||||
try {
|
||||
return type.getValues(value);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to parse " + type.name() + " from '" + value + "'.", e);
|
||||
return new Object[0];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the type.
|
||||
*
|
||||
* @return The type.
|
||||
*/
|
||||
@NonNull
|
||||
public MeasurementType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value(s).
|
||||
*
|
||||
* @return The values.
|
||||
*/
|
||||
@NonNull
|
||||
public Object[] getValues() {
|
||||
return values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether this value has at
|
||||
* least one data item.
|
||||
*
|
||||
* @return True if the value has at least one data item..
|
||||
*/
|
||||
public boolean hasValue() {
|
||||
return values.length > 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The measurement.
|
||||
*/
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package com.mowesta.android.app.model;
|
||||
|
||||
import android.app.Application;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.lifecycle.AndroidViewModel;
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.paging.DataSource;
|
||||
@@ -14,8 +12,7 @@ import androidx.paging.LivePagedListBuilder;
|
||||
import androidx.paging.PagedList;
|
||||
import androidx.paging.PositionalDataSource;
|
||||
|
||||
import com.mowesta.android.app.IApp;
|
||||
import com.mowesta.android.app.repository.ClientFactory;
|
||||
import com.mowesta.android.app.binding.DiagramEntry;
|
||||
import com.mowesta.android.app.task.ApiTask;
|
||||
import com.mowesta.android.feign.model.WeatherReport;
|
||||
import com.mowesta.android.feign.model.WeatherReportPage;
|
||||
@@ -23,7 +20,6 @@ import com.mowesta.android.feign.model.WeatherStation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/**
|
||||
* The view model to show a page with the weather station and
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.mowesta.android.app.repository;
|
||||
|
||||
import androidx.room.Room;
|
||||
|
||||
import com.mowesta.android.app.IApp;
|
||||
import com.mowesta.android.app.database.FavoriteDatabase;
|
||||
import com.mowesta.android.app.database.WidgetDatabase;
|
||||
|
||||
/**
|
||||
* A repository to access the widget database.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class WidgetRepository extends Repository {
|
||||
|
||||
/**
|
||||
* The widget database.
|
||||
*/
|
||||
private WidgetDatabase database;
|
||||
|
||||
/**
|
||||
* Creates the repository.
|
||||
*
|
||||
* @param application The application.
|
||||
*/
|
||||
public WidgetRepository(IApp application) {
|
||||
super(application);
|
||||
database = Room.databaseBuilder(application.getContext(), WidgetDatabase .class, "widgets").fallbackToDestructiveMigration().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the database.
|
||||
*
|
||||
* @return The database.
|
||||
*/
|
||||
public WidgetDatabase getDatabase() {
|
||||
return database;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import android.annotation.SuppressLint;
|
||||
import android.os.AsyncTask;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mowesta.android.app.database.Favorite;
|
||||
import com.mowesta.android.feign.api.DefaultApi;
|
||||
|
||||
import feign.FeignException;
|
||||
@@ -102,12 +103,13 @@ public class ApiTask<I, O> {
|
||||
/**
|
||||
* Triggers the execution of the task in the background.
|
||||
*
|
||||
* @param client the api client.
|
||||
* @param input The input.
|
||||
* @param client the api client.
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
public void execute(final I input, final DefaultApi client) {
|
||||
public ApiTask<Favorite, Boolean> execute(final I input, final DefaultApi client) {
|
||||
new AsyncTask<I, Void, O>() {
|
||||
private Exception e;
|
||||
@Override
|
||||
@@ -136,6 +138,7 @@ public class ApiTask<I, O> {
|
||||
}
|
||||
}
|
||||
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, input);
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.mowesta.android.feign.api.DefaultApi;
|
||||
import com.mowesta.android.feign.model.City;
|
||||
import com.mowesta.android.feign.model.CityPage;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -80,6 +81,8 @@ public class RefreshTask {
|
||||
return null;
|
||||
}, (input, output) -> { });
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new refresh task.
|
||||
*
|
||||
@@ -103,19 +106,37 @@ public class RefreshTask {
|
||||
@Override
|
||||
protected Boolean doInBackground(Void... voids) {
|
||||
List<Favorite> favorites = database.getAccessor().getAll();
|
||||
List<Favorite> modified = new ArrayList<>();
|
||||
try {
|
||||
for (Favorite f: favorites) {
|
||||
if (! f.isDeleted() && refresh(client, f)) {
|
||||
modified.add(f);
|
||||
final List<Favorite> modified = new ArrayList<>();
|
||||
final List<Favorite> unmodified = new ArrayList<>();
|
||||
final boolean[] result = new boolean[] { true };
|
||||
for (Favorite f: favorites) {
|
||||
ApiTask<Favorite, Boolean> loadTask = new ApiTask<Favorite, Boolean>((input, client)-> {
|
||||
return (! f.isDeleted() && refresh(client, f));
|
||||
}, (favorite, updated)-> {
|
||||
synchronized (modified) {
|
||||
if (updated) modified.add(favorite);
|
||||
else unmodified.add(favorite);
|
||||
modified.notifyAll();;
|
||||
}
|
||||
}
|
||||
if (modified.size() > 0) updateTask.execute(modified, database);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
if (modified.size() > 0) updateTask.execute(modified, database);
|
||||
return false;
|
||||
}, (favorite, failure)-> {
|
||||
synchronized (modified) {
|
||||
unmodified.add(favorite);
|
||||
result[0] = false;
|
||||
modified.notifyAll();
|
||||
}
|
||||
}).execute(f, client);
|
||||
}
|
||||
synchronized (modified) {
|
||||
try {
|
||||
while (modified.size() + unmodified.size() < favorites.size()) {
|
||||
modified.wait();
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (modified.size() > 0) updateTask.execute(modified, database);
|
||||
return result[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -155,25 +155,42 @@ public class UnitUtils {
|
||||
* Returns the temperature as string.
|
||||
*
|
||||
* @param context The context.
|
||||
* @param celsisus The degree in celisus.
|
||||
* @param celsius The degree in celsius.
|
||||
* @return The formatted string as defined by the user's preferences.
|
||||
*/
|
||||
public static String getTemperature(@NonNull Context context, double celsisus) {
|
||||
public static String getTemperature(@NonNull Context context, double celsius) {
|
||||
MowestaSettings.TemperatureUnit unit = getSettings(context).getTemperatureUnit();
|
||||
return getTemperature(context, celsius, unit);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the temperature formated to a particular unit.
|
||||
*
|
||||
* @param context The context.
|
||||
* @param celsius The degrees celsius.
|
||||
* @param unit The unit.
|
||||
* @return The string.
|
||||
*/
|
||||
public static String getTemperature(@NonNull Context context, double celsius, @NonNull MowestaSettings.TemperatureUnit unit) {
|
||||
if (unit == MowestaSettings.TemperatureUnit.CELSIUS) {
|
||||
return context.getString(R.string.format_temperature_celsius, celsisus);
|
||||
return context.getString(R.string.format_temperature_celsius, celsius);
|
||||
} else {
|
||||
double fahrenheit = celsiusToFahrenheit(celsisus);
|
||||
double fahrenheit = celsiusToFahrenheit(celsius);
|
||||
if (unit == MowestaSettings.TemperatureUnit.FAHRENHEIT) {
|
||||
return context.getString(R.string.format_temperature_fahrenheit, fahrenheit);
|
||||
} else {
|
||||
return context.getString(R.string.format_temperature_both, celsisus, fahrenheit);
|
||||
return context.getString(R.string.format_temperature_both, celsius, fahrenheit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static String getPressure(@NonNull Context context, double hpa) {
|
||||
MowestaSettings.UnitSystem system = getSettings(context).getUnitSystem();
|
||||
return getPressure(context, hpa, system);
|
||||
}
|
||||
|
||||
public static String getPressure(@NonNull Context context, double hpa, MowestaSettings.UnitSystem system) {
|
||||
if (system == MowestaSettings.UnitSystem.STANDARD) {
|
||||
return context.getString(R.string.format_pressure_si, hpa);
|
||||
} else {
|
||||
@@ -201,6 +218,7 @@ public class UnitUtils {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static String getPrecipitation(@NonNull Context context, double mm) {
|
||||
MowestaSettings.UnitSystem system = getSettings(context).getUnitSystem();
|
||||
mm = Math.max(0, mm); // make sure this is positive
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
package com.mowesta.android.app.util;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.model.ConditionViewModel;
|
||||
import com.mowesta.android.app.model.SummaryViewModel;
|
||||
import com.mowesta.android.feign.model.WeatherCondition;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A utility class to aggregate the weather conditions based on a particular
|
||||
* time zone.
|
||||
*/
|
||||
public class WeatherAggregate {
|
||||
|
||||
/**
|
||||
* The days.
|
||||
*/
|
||||
private List<SummaryViewModel> days;
|
||||
/**
|
||||
* The times.
|
||||
*/
|
||||
private List<SummaryViewModel> times;
|
||||
/**
|
||||
* The hours.
|
||||
*/
|
||||
private List<ConditionViewModel> hours;
|
||||
|
||||
/**
|
||||
* Creates a new aggregate.
|
||||
*
|
||||
* @param days The day models.
|
||||
* @param times The time models.
|
||||
* @param hours The hour models.
|
||||
*/
|
||||
protected WeatherAggregate(@NonNull List<SummaryViewModel> days, @NonNull List<SummaryViewModel> times, @NonNull List<ConditionViewModel> hours) {
|
||||
this.days = days;
|
||||
this.hours = hours;
|
||||
this.times = times;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the hour models.
|
||||
*
|
||||
* @return The hour models.
|
||||
*/
|
||||
public List<ConditionViewModel> getHours() {
|
||||
return hours;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the day models.
|
||||
*
|
||||
* @return The day models.
|
||||
*/
|
||||
public List<SummaryViewModel> getDays() {
|
||||
return days;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the time-of-day models.
|
||||
*
|
||||
* @return The time of day models.
|
||||
*/
|
||||
public List<SummaryViewModel> getTimes() {
|
||||
return times;
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes and aggregates the forecasts using the timezone of the city.
|
||||
* This is pretty messy, but it is also not really simple.
|
||||
*
|
||||
* @param context The context.
|
||||
* @param tz The time zone.
|
||||
* @param wc The weather conditions to aggregate.
|
||||
* @return The aggregated conditions.
|
||||
*/
|
||||
public static WeatherAggregate getAggregate(@NonNull Context context, @NonNull String tz, @NonNull List<WeatherCondition> wc) {
|
||||
DateFormatter df = new DateFormatter(context);
|
||||
long now = System.currentTimeMillis();
|
||||
TimeUtils d = new TimeUtils(now, tz);
|
||||
Collections.sort(wc, (a, b) -> (int)(a.getTime() - b.getTime()));
|
||||
List<ConditionViewModel> hourModels = new ArrayList<>();
|
||||
List<List<WeatherCondition>> days = new ArrayList<>();
|
||||
List<List<WeatherCondition>> times = new ArrayList<>();
|
||||
List<WeatherCondition> currentDay = null;
|
||||
List<WeatherCondition> currentTime = null;
|
||||
for (WeatherCondition c: wc) {
|
||||
long end = d.getEnd(c);
|
||||
ConditionViewModel vm = new ConditionViewModel((Application) context.getApplicationContext());
|
||||
long time = c.getTime();
|
||||
String title = d.getDayName(context, time);
|
||||
String subtitle = context.getString(R.string.format_two_parts, df.asTime(time, tz), df.asDate(time, tz));
|
||||
vm.setData(title, subtitle, c, tz);
|
||||
hourModels.add(vm);
|
||||
if (currentDay == null) {
|
||||
currentDay = new ArrayList<>();
|
||||
currentDay.add(c);
|
||||
} else {
|
||||
if (d.isSameDay(d.getTime(currentDay), c.getTime())) {
|
||||
currentDay.add(c);
|
||||
} else {
|
||||
days.add(currentDay);
|
||||
currentDay = new ArrayList<>();
|
||||
currentDay.add(c);
|
||||
}
|
||||
}
|
||||
if (!d.isSameDay(d.getTime(currentDay), end)) {
|
||||
days.add(currentDay);
|
||||
currentDay = new ArrayList<>();
|
||||
currentDay.add(c);
|
||||
}
|
||||
if (currentTime == null) {
|
||||
currentTime = new ArrayList<>();
|
||||
currentTime.add(c);
|
||||
} else {
|
||||
if (d.isSameSlot(d.getTime(currentTime), c.getTime())) {
|
||||
currentTime.add(c);
|
||||
} else {
|
||||
times.add(currentTime);
|
||||
currentTime = new ArrayList<>();
|
||||
currentTime.add(c);
|
||||
}
|
||||
}
|
||||
if (!d.isSameSlot(d.getTime(currentTime), end)) {
|
||||
times.add(currentTime);
|
||||
currentTime = new ArrayList<>();
|
||||
currentTime.add(c);
|
||||
}
|
||||
}
|
||||
if (currentDay != null) days.add(currentDay);
|
||||
if (currentTime != null) times.add(currentTime);
|
||||
List<SummaryViewModel> dayModels = new ArrayList<>();
|
||||
for (List<WeatherCondition> ds: days) {
|
||||
long time = d.getTime(ds);
|
||||
String title = d.getDayName(context, time);
|
||||
SummaryViewModel summary = new SummaryViewModel((Application) context.getApplicationContext());
|
||||
WeatherCondition[] data = new WeatherCondition[ds.size()];
|
||||
data = ds.toArray(data);
|
||||
summary.setData(title, context.getString(R.string.label_full_day), data, tz);
|
||||
dayModels.add(summary);
|
||||
}
|
||||
List<SummaryViewModel> timeModels = new ArrayList<>();
|
||||
for (List<WeatherCondition> ts: times) {
|
||||
long time = d.getTime(ts);
|
||||
String title = d.getDayName(context, time);
|
||||
int slot = d.getSlotName(time);
|
||||
SummaryViewModel summary = new SummaryViewModel((Application) context.getApplicationContext());
|
||||
WeatherCondition[] data = new WeatherCondition[ts.size()];
|
||||
data = ts.toArray(data);
|
||||
summary.setData(title, context.getString(slot), data, tz);
|
||||
timeModels.add(summary);
|
||||
}
|
||||
return new WeatherAggregate(dayModels, timeModels, hourModels);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,931 +0,0 @@
|
||||
package com.mowesta.android.app.view;
|
||||
|
||||
/**
|
||||
* An enumeration with text constants to generate jam
|
||||
* icons with the jam font.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public enum JamIcon {
|
||||
|
||||
JAM_FIVE_HUNDRED_PX("\ue900"),
|
||||
JAM_ACTIVITY("\ue901"),
|
||||
JAM_AIRBNB("\ue902"),
|
||||
JAM_ALARM_CLOCK_F("\ue903"),
|
||||
JAM_ALARM_CLOCK("\ue904"),
|
||||
JAM_ALERT_F("\ue905"),
|
||||
JAM_ALERT("\ue906"),
|
||||
JAM_ALIEN_F("\ue907"),
|
||||
JAM_ALIEN("\ue908"),
|
||||
JAM_ALIGN_CENTER("\ue909"),
|
||||
JAM_ALIGN_JUSTIFY("\ue90a"),
|
||||
JAM_ALIGN_LEFT("\ue90b"),
|
||||
JAM_ALIGN_RIGHT("\ue90c"),
|
||||
JAM_AMAZON("\ue90d"),
|
||||
JAM_ANCHOR("\ue90e"),
|
||||
JAM_ANDROID_CIRCLE("\ue90f"),
|
||||
JAM_ANDROID_SQUARE("\ue910"),
|
||||
JAM_ANDROID("\ue911"),
|
||||
JAM_APERTURE("\ue912"),
|
||||
JAM_APPLE_CIRCLE("\ue913"),
|
||||
JAM_APPLE_SQUARE("\ue914"),
|
||||
JAM_APPLE("\ue915"),
|
||||
JAM_ARCHIVE_F("\ue916"),
|
||||
JAM_ARCHIVE("\ue917"),
|
||||
JAM_ARROW_CIRCLE_DOWN_F("\ue918"),
|
||||
JAM_ARROW_CIRCLE_DOWN_LEFT_F("\ue919"),
|
||||
JAM_ARROW_CIRCLE_DOWN_LEFT("\ue91a"),
|
||||
JAM_ARROW_CIRCLE_DOWN_RIGHT_F("\ue91b"),
|
||||
JAM_ARROW_CIRCLE_DOWN_RIGHT("\ue91c"),
|
||||
JAM_ARROW_CIRCLE_DOWN("\ue91d"),
|
||||
JAM_ARROW_CIRCLE_LEFT_F("\ue91e"),
|
||||
JAM_ARROW_CIRCLE_LEFT("\ue91f"),
|
||||
JAM_ARROW_CIRCLE_RIGHT_F("\ue920"),
|
||||
JAM_ARROW_CIRCLE_RIGHT("\ue921"),
|
||||
JAM_ARROW_CIRCLE_UP_F("\ue922"),
|
||||
JAM_ARROW_CIRCLE_UP_LEFT_F("\ue923"),
|
||||
JAM_ARROW_CIRCLE_UP_LEFT("\ue924"),
|
||||
JAM_ARROW_CIRCLE_UP_RIGHT_F("\ue925"),
|
||||
JAM_ARROW_CIRCLE_UP_RIGHT("\ue926"),
|
||||
JAM_ARROW_CIRCLE_UP("\ue927"),
|
||||
JAM_ARROW_DOWN_LEFT("\ue928"),
|
||||
JAM_ARROW_DOWN_RIGHT("\ue929"),
|
||||
JAM_ARROW_DOWN("\ue92a"),
|
||||
JAM_ARROW_LEFT("\ue92b"),
|
||||
JAM_ARROW_RIGHT("\ue92c"),
|
||||
JAM_ARROW_SQUARE_DOWN_F("\ue92d"),
|
||||
JAM_ARROW_SQUARE_DOWN_LEFT_F("\ue92e"),
|
||||
JAM_ARROW_SQUARE_DOWN_LEFT("\ue92f"),
|
||||
JAM_ARROW_SQUARE_DOWN_RIGHT_F("\ue930"),
|
||||
JAM_ARROW_SQUARE_DOWN_RIGHT("\ue931"),
|
||||
JAM_ARROW_SQUARE_DOWN("\ue932"),
|
||||
JAM_ARROW_SQUARE_LEFT_F("\ue933"),
|
||||
JAM_ARROW_SQUARE_LEFT("\ue934"),
|
||||
JAM_ARROW_SQUARE_RIGHT_F("\ue935"),
|
||||
JAM_ARROW_SQUARE_RIGHT("\ue936"),
|
||||
JAM_ARROW_SQUARE_UP_F("\ue937"),
|
||||
JAM_ARROW_SQUARE_UP_LEFT_F("\ue938"),
|
||||
JAM_ARROW_SQUARE_UP_LEFT("\ue939"),
|
||||
JAM_ARROW_SQUARE_UP_RIGHT_F("\ue93a"),
|
||||
JAM_ARROW_SQUARE_UP_RIGHT("\ue93b"),
|
||||
JAM_ARROW_SQUARE_UP("\ue93c"),
|
||||
JAM_ARROW_UP_LEFT("\ue93d"),
|
||||
JAM_ARROW_UP_RIGHT("\ue93e"),
|
||||
JAM_ARROW_UP("\ue93f"),
|
||||
JAM_ARROWS_CORNERS("\ue940"),
|
||||
JAM_ARROWS_FULLSCREEN("\ue941"),
|
||||
JAM_ARROWS_H("\ue942"),
|
||||
JAM_ARROWS_V("\ue943"),
|
||||
JAM_ATTACHMENT("\ue944"),
|
||||
JAM_BACKGROUND_COLOR("\ue945"),
|
||||
JAM_BACKPACK_F("\ue946"),
|
||||
JAM_BACKPACK("\ue947"),
|
||||
JAM_BACKWARD_CIRCLE_F("\ue948"),
|
||||
JAM_BACKWARD_CIRCLE("\ue949"),
|
||||
JAM_BACKWARD_SQUARE_F("\ue94a"),
|
||||
JAM_BACKWARD_SQUARE("\ue94b"),
|
||||
JAM_BACKWARD("\ue94c"),
|
||||
JAM_BAIDU_CIRCLE("\ue94d"),
|
||||
JAM_BAIDU_SQUARE("\ue94e"),
|
||||
JAM_BAIDU("\ue94f"),
|
||||
JAM_BANDAGE_F("\ue950"),
|
||||
JAM_BANDAGE("\ue951"),
|
||||
JAM_BAR_CHART("\ue952"),
|
||||
JAM_BASEBALL("\ue953"),
|
||||
JAM_BASKETBALL("\ue954"),
|
||||
JAM_BATHTUB_F("\ue955"),
|
||||
JAM_BATHTUB("\ue956"),
|
||||
JAM_BATTERY_CHARGING_F("\ue957"),
|
||||
JAM_BATTERY_CHARGING("\ue958"),
|
||||
JAM_BATTERY_F("\ue959"),
|
||||
JAM_BATTERY_HALF_F("\ue95a"),
|
||||
JAM_BATTERY_HALF("\ue95b"),
|
||||
JAM_BATTERY_ONE_QUARTER_F("\ue95c"),
|
||||
JAM_BATTERY_ONE_QUARTER("\ue95d"),
|
||||
JAM_BATTERY_THREE_QUARTERS_F("\ue95e"),
|
||||
JAM_BATTERY_THREE_QUARTERS("\ue95f"),
|
||||
JAM_BATTERY("\ue960"),
|
||||
JAM_BEATPORT_CIRCLE("\ue961"),
|
||||
JAM_BEATPORT_SQUARE("\ue962"),
|
||||
JAM_BEATPORT("\ue963"),
|
||||
JAM_BEER_F("\ue964"),
|
||||
JAM_BEER("\ue965"),
|
||||
JAM_BEHANCE_CIRCLE("\ue966"),
|
||||
JAM_BEHANCE_SQUARE("\ue967"),
|
||||
JAM_BEHANCE("\ue968"),
|
||||
JAM_BELL_F("\ue969"),
|
||||
JAM_BELL_OFF_F("\ue96a"),
|
||||
JAM_BELL_OFF("\ue96b"),
|
||||
JAM_BELL("\ue96c"),
|
||||
JAM_BING_CIRCLE("\ue96d"),
|
||||
JAM_BING_SQUARE("\ue96e"),
|
||||
JAM_BING("\ue96f"),
|
||||
JAM_BIRTHDAY_CAKE_F("\ue970"),
|
||||
JAM_BIRTHDAY_CAKE("\ue971"),
|
||||
JAM_BLOGGER_CIRCLE("\ue972"),
|
||||
JAM_BLOGGER_SQUARE("\ue973"),
|
||||
JAM_BLOGGER("\ue974"),
|
||||
JAM_BLUETOOTH("\ue975"),
|
||||
JAM_BOLD("\ue976"),
|
||||
JAM_BOOK_F("\ue977"),
|
||||
JAM_BOOK("\ue978"),
|
||||
JAM_BOOKMARK_F("\ue979"),
|
||||
JAM_BOOKMARK_MINUS_F("\ue97a"),
|
||||
JAM_BOOKMARK_MINUS("\ue97b"),
|
||||
JAM_BOOKMARK_PLUS_F("\ue97c"),
|
||||
JAM_BOOKMARK_PLUS("\ue97d"),
|
||||
JAM_BOOKMARK_REMOVE_F("\ue97e"),
|
||||
JAM_BOOKMARK_REMOVE("\ue97f"),
|
||||
JAM_BOOKMARK("\ue980"),
|
||||
JAM_BOTTLE_F("\ue981"),
|
||||
JAM_BOTTLE("\ue982"),
|
||||
JAM_BOX_F("\ue983"),
|
||||
JAM_BOX("\ue984"),
|
||||
JAM_BRANCH_F("\ue985"),
|
||||
JAM_BRANCH("\ue986"),
|
||||
JAM_BRIGHTNESS_DOWN_F("\ue987"),
|
||||
JAM_BRIGHTNESS_DOWN("\ue988"),
|
||||
JAM_BRIGHTNESS_UP_F("\ue989"),
|
||||
JAM_BRIGHTNESS_UP("\ue98a"),
|
||||
JAM_BRIGHTNESS("\ue98b"),
|
||||
JAM_BRUSH_F("\ue98c"),
|
||||
JAM_BRUSH("\ue98d"),
|
||||
JAM_BUG_F("\ue98e"),
|
||||
JAM_BUG("\ue98f"),
|
||||
JAM_BUILDING_F("\ue990"),
|
||||
JAM_BUILDING("\ue991"),
|
||||
JAM_BUS_F("\ue992"),
|
||||
JAM_BUS("\ue993"),
|
||||
JAM_CACTUS_F("\ue994"),
|
||||
JAM_CACTUS("\ue995"),
|
||||
JAM_CALCULATOR("\ue996"),
|
||||
JAM_CALENDAR_ALT_F("\ue997"),
|
||||
JAM_CALENDAR_ALT("\ue998"),
|
||||
JAM_CALENDAR_F("\ue999"),
|
||||
JAM_CALENDAR("\ue99a"),
|
||||
JAM_CAMERA_ALT_F("\ue99b"),
|
||||
JAM_CAMERA_ALT("\ue99c"),
|
||||
JAM_CAMERA_F("\ue99d"),
|
||||
JAM_CAMERA("\ue99e"),
|
||||
JAM_CANDLE_F("\ue99f"),
|
||||
JAM_CANDLE("\ue9a0"),
|
||||
JAM_CAPSULE_F("\ue9a1"),
|
||||
JAM_CAPSULE("\ue9a2"),
|
||||
JAM_CAR_F("\ue9a3"),
|
||||
JAM_CAR("\ue9a4"),
|
||||
JAM_CASTLE_F("\ue9a5"),
|
||||
JAM_CASTLE("\ue9a6"),
|
||||
JAM_CHECK("\ue9a7"),
|
||||
JAM_CHEVRON_CIRCLE_DOWN_F("\ue9a8"),
|
||||
JAM_CHEVRON_CIRCLE_DOWN_LEFT_F("\ue9a9"),
|
||||
JAM_CHEVRON_CIRCLE_DOWN_LEFT("\ue9aa"),
|
||||
JAM_CHEVRON_CIRCLE_DOWN_RIGHT_F("\ue9ab"),
|
||||
JAM_CHEVRON_CIRCLE_DOWN_RIGHT("\ue9ac"),
|
||||
JAM_CHEVRON_CIRCLE_DOWN("\ue9ad"),
|
||||
JAM_CHEVRON_CIRCLE_LEFT_F("\ue9ae"),
|
||||
JAM_CHEVRON_CIRCLE_LEFT("\ue9af"),
|
||||
JAM_CHEVRON_CIRCLE_RIGHT_F("\ue9b0"),
|
||||
JAM_CHEVRON_CIRCLE_RIGHT("\ue9b1"),
|
||||
JAM_CHEVRON_CIRCLE_UP_F("\ue9b2"),
|
||||
JAM_CHEVRON_CIRCLE_UP_LEFT_F("\ue9b3"),
|
||||
JAM_CHEVRON_CIRCLE_UP_LEFT("\ue9b4"),
|
||||
JAM_CHEVRON_CIRCLE_UP_RIGHT_F("\ue9b5"),
|
||||
JAM_CHEVRON_CIRCLE_UP_RIGHT("\ue9b6"),
|
||||
JAM_CHEVRON_CIRCLE_UP("\ue9b7"),
|
||||
JAM_CHEVRON_DOWN_LEFT("\ue9b8"),
|
||||
JAM_CHEVRON_DOWN_RIGHT("\ue9b9"),
|
||||
JAM_CHEVRON_DOWN("\ue9ba"),
|
||||
JAM_CHEVRON_LEFT("\ue9bb"),
|
||||
JAM_CHEVRON_RIGHT("\ue9bc"),
|
||||
JAM_CHEVRON_SQUARE_DOWN_F("\ue9bd"),
|
||||
JAM_CHEVRON_SQUARE_DOWN_LEFT_F("\ue9be"),
|
||||
JAM_CHEVRON_SQUARE_DOWN_LEFT("\ue9bf"),
|
||||
JAM_CHEVRON_SQUARE_DOWN_RIGHT_F("\ue9c0"),
|
||||
JAM_CHEVRON_SQUARE_DOWN_RIGHT("\ue9c1"),
|
||||
JAM_CHEVRON_SQUARE_DOWN("\ue9c2"),
|
||||
JAM_CHEVRON_SQUARE_LEFT_F("\ue9c3"),
|
||||
JAM_CHEVRON_SQUARE_LEFT("\ue9c4"),
|
||||
JAM_CHEVRON_SQUARE_RIGHT_F("\ue9c5"),
|
||||
JAM_CHEVRON_SQUARE_RIGHT("\ue9c6"),
|
||||
JAM_CHEVRON_SQUARE_UP_F("\ue9c7"),
|
||||
JAM_CHEVRON_SQUARE_UP_LEFT_F("\ue9c8"),
|
||||
JAM_CHEVRON_SQUARE_UP_LEFT("\ue9c9"),
|
||||
JAM_CHEVRON_SQUARE_UP_RIGHT_F("\ue9ca"),
|
||||
JAM_CHEVRON_SQUARE_UP_RIGHT("\ue9cb"),
|
||||
JAM_CHEVRON_SQUARE_UP("\ue9cc"),
|
||||
JAM_CHEVRON_UP_LEFT("\ue9cd"),
|
||||
JAM_CHEVRON_UP_RIGHT("\ue9ce"),
|
||||
JAM_CHEVRON_UP("\ue9cf"),
|
||||
JAM_CHEVRONS_CIRCLE_DOWN_F("\ue9d0"),
|
||||
JAM_CHEVRONS_CIRCLE_DOWN_LEFT_F("\ue9d1"),
|
||||
JAM_CHEVRONS_CIRCLE_DOWN_LEFT("\ue9d2"),
|
||||
JAM_CHEVRONS_CIRCLE_DOWN_RIGHT_F("\ue9d3"),
|
||||
JAM_CHEVRONS_CIRCLE_DOWN_RIGHT("\ue9d4"),
|
||||
JAM_CHEVRONS_CIRCLE_DOWN("\ue9d5"),
|
||||
JAM_CHEVRONS_CIRCLE_LEFT_F("\ue9d6"),
|
||||
JAM_CHEVRONS_CIRCLE_LEFT("\ue9d7"),
|
||||
JAM_CHEVRONS_CIRCLE_RIGHT_F("\ue9d8"),
|
||||
JAM_CHEVRONS_CIRCLE_RIGHT("\ue9d9"),
|
||||
JAM_CHEVRONS_CIRCLE_UP_F("\ue9da"),
|
||||
JAM_CHEVRONS_CIRCLE_UP_LEFT_F("\ue9db"),
|
||||
JAM_CHEVRONS_CIRCLE_UP_LEFT("\ue9dc"),
|
||||
JAM_CHEVRONS_CIRCLE_UP_RIGHT_F("\ue9dd"),
|
||||
JAM_CHEVRONS_CIRCLE_UP_RIGHT("\ue9de"),
|
||||
JAM_CHEVRONS_CIRCLE_UP("\ue9df"),
|
||||
JAM_CHEVRONS_DOWN_LEFT("\ue9e0"),
|
||||
JAM_CHEVRONS_DOWN_RIGHT("\ue9e1"),
|
||||
JAM_CHEVRONS_DOWN("\ue9e2"),
|
||||
JAM_CHEVRONS_LEFT("\ue9e3"),
|
||||
JAM_CHEVRONS_RIGHT("\ue9e4"),
|
||||
JAM_CHEVRONS_SQUARE_DOWN_F("\ue9e5"),
|
||||
JAM_CHEVRONS_SQUARE_DOWN_LEFT_F("\ue9e6"),
|
||||
JAM_CHEVRONS_SQUARE_DOWN_LEFT("\ue9e7"),
|
||||
JAM_CHEVRONS_SQUARE_DOWN_RIGHT_F("\ue9e8"),
|
||||
JAM_CHEVRONS_SQUARE_DOWN_RIGHT("\ue9e9"),
|
||||
JAM_CHEVRONS_SQUARE_DOWN("\ue9ea"),
|
||||
JAM_CHEVRONS_SQUARE_LEFT_F("\ue9eb"),
|
||||
JAM_CHEVRONS_SQUARE_LEFT("\ue9ec"),
|
||||
JAM_CHEVRONS_SQUARE_RIGHT_F("\ue9ed"),
|
||||
JAM_CHEVRONS_SQUARE_RIGHT("\ue9ee"),
|
||||
JAM_CHEVRONS_SQUARE_UP_F("\ue9ef"),
|
||||
JAM_CHEVRONS_SQUARE_UP_LEFT_F("\ue9f0"),
|
||||
JAM_CHEVRONS_SQUARE_UP_LEFT("\ue9f1"),
|
||||
JAM_CHEVRONS_SQUARE_UP_RIGHT_F("\ue9f2"),
|
||||
JAM_CHEVRONS_SQUARE_UP_RIGHT("\ue9f3"),
|
||||
JAM_CHEVRONS_SQUARE_UP("\ue9f4"),
|
||||
JAM_CHEVRONS_UP_LEFT("\ue9f5"),
|
||||
JAM_CHEVRONS_UP_RIGHT("\ue9f6"),
|
||||
JAM_CHEVRONS_UP("\ue9f7"),
|
||||
JAM_CHRONOMETER_F("\ue9f8"),
|
||||
JAM_CHRONOMETER("\ue9f9"),
|
||||
JAM_CIRCLE_F("\ue9fa"),
|
||||
JAM_CIRCLE("\ue9fb"),
|
||||
JAM_CLEAR_FORMAT("\ue9fc"),
|
||||
JAM_CLIPBOARD_F("\ue9fd"),
|
||||
JAM_CLIPBOARD("\ue9fe"),
|
||||
JAM_CLOCK_F("\ue9ff"),
|
||||
JAM_CLOCK("\uea00"),
|
||||
JAM_CLOSE_CIRCLE_F("\uea01"),
|
||||
JAM_CLOSE_CIRCLE("\uea02"),
|
||||
JAM_CLOSE_RECTANGLE_F("\uea03"),
|
||||
JAM_CLOSE_RECTANGLE("\uea04"),
|
||||
JAM_CLOSE("\uea05"),
|
||||
JAM_CLOUD_F("\uea06"),
|
||||
JAM_CLOUD_RAIN_F("\uea07"),
|
||||
JAM_CLOUD_RAIN("\uea08"),
|
||||
JAM_CLOUD_SNOW_F("\uea09"),
|
||||
JAM_CLOUD_SNOW("\uea0a"),
|
||||
JAM_CLOUD_THUNDER_F("\uea0b"),
|
||||
JAM_CLOUD_THUNDER("\uea0c"),
|
||||
JAM_CLOUD("\uea0d"),
|
||||
JAM_CODEPEN_CIRCLE("\uea0e"),
|
||||
JAM_CODEPEN_SQUARE("\uea0f"),
|
||||
JAM_CODEPEN("\uea10"),
|
||||
JAM_COFFEE_CUP_F("\uea11"),
|
||||
JAM_COFFEE_CUP("\uea12"),
|
||||
JAM_COFFEE("\uea13"),
|
||||
JAM_COG_F("\uea14"),
|
||||
JAM_COG("\uea15"),
|
||||
JAM_COGS_F("\uea16"),
|
||||
JAM_COGS("\uea17"),
|
||||
JAM_COIN_F("\uea18"),
|
||||
JAM_COIN("\uea19"),
|
||||
JAM_COLOR("\uea1a"),
|
||||
JAM_COMPASS_F("\uea1b"),
|
||||
JAM_COMPASS("\uea1c"),
|
||||
JAM_COMPUTER_ALT_F("\uea1d"),
|
||||
JAM_COMPUTER_ALT("\uea1e"),
|
||||
JAM_COMPUTER_F("\uea1f"),
|
||||
JAM_COMPUTER("\uea20"),
|
||||
JAM_CREDIT_CARD_F("\uea21"),
|
||||
JAM_CREDIT_CARD("\uea22"),
|
||||
JAM_CROP("\uea23"),
|
||||
JAM_CROWN_F("\uea24"),
|
||||
JAM_CROWN("\uea25"),
|
||||
JAM_CUTLERY_F("\uea26"),
|
||||
JAM_CUTLERY("\uea27"),
|
||||
JAM_CUTTER_F("\uea28"),
|
||||
JAM_CUTTER("\uea29"),
|
||||
JAM_DASHBOARD_F("\uea2a"),
|
||||
JAM_DASHBOARD("\uea2b"),
|
||||
JAM_DATABASE_F("\uea2c"),
|
||||
JAM_DATABASE("\uea2d"),
|
||||
JAM_DEEZER_CIRCLE("\uea2e"),
|
||||
JAM_DEEZER_SQUARE("\uea2f"),
|
||||
JAM_DEEZER("\uea30"),
|
||||
JAM_DELETE_F("\uea31"),
|
||||
JAM_DELETE("\uea32"),
|
||||
JAM_DEVIANTART_CIRCLE("\uea33"),
|
||||
JAM_DEVIANTART_SQUARE("\uea34"),
|
||||
JAM_DEVIANTART("\uea35"),
|
||||
JAM_DIGG("\uea36"),
|
||||
JAM_DIRECTION_F("\uea37"),
|
||||
JAM_DIRECTION("\uea38"),
|
||||
JAM_DIRECTIONS_F("\uea39"),
|
||||
JAM_DIRECTIONS("\uea3a"),
|
||||
JAM_DISC_F("\uea3b"),
|
||||
JAM_DISC("\uea3c"),
|
||||
JAM_DISQUS_CIRCLE("\uea3d"),
|
||||
JAM_DISQUS_SQUARE("\uea3e"),
|
||||
JAM_DISQUS("\uea3f"),
|
||||
JAM_DJ_F("\uea40"),
|
||||
JAM_DJ("\uea41"),
|
||||
JAM_DNA("\uea42"),
|
||||
JAM_DOCUMENT_F("\uea43"),
|
||||
JAM_DOCUMENT("\uea44"),
|
||||
JAM_DOOR("\uea45"),
|
||||
JAM_DOWNLOAD("\uea46"),
|
||||
JAM_DRUPAL_CIRCLE("\uea47"),
|
||||
JAM_DRUPAL_SQUARE("\uea48"),
|
||||
JAM_DRUPAL("\uea49"),
|
||||
JAM_EBAY("\uea4a"),
|
||||
JAM_EGG_F("\uea4b"),
|
||||
JAM_EGG("\uea4c"),
|
||||
JAM_EGGS_F("\uea4d"),
|
||||
JAM_EGGS("\uea4e"),
|
||||
JAM_EJECT_CIRCLE_F("\uea4f"),
|
||||
JAM_EJECT_CIRCLE("\uea50"),
|
||||
JAM_EJECT_SQUARE_F("\uea51"),
|
||||
JAM_EJECT_SQUARE("\uea52"),
|
||||
JAM_EJECT("\uea53"),
|
||||
JAM_ENVELOPE_F("\uea54"),
|
||||
JAM_ENVELOPE_OPEN_F("\uea55"),
|
||||
JAM_ENVELOPE_OPEN("\uea56"),
|
||||
JAM_ENVELOPE("\uea57"),
|
||||
JAM_EXTINGUISHER_F("\uea58"),
|
||||
JAM_EXTINGUISHER("\uea59"),
|
||||
JAM_EYE_CLOSE_F("\uea5a"),
|
||||
JAM_EYE_CLOSE("\uea5b"),
|
||||
JAM_EYE_F("\uea5c"),
|
||||
JAM_EYE("\uea5d"),
|
||||
JAM_EYEDROPPER_F("\uea5e"),
|
||||
JAM_EYEDROPPER("\uea5f"),
|
||||
JAM_FACEBOOK_CIRCLE("\uea60"),
|
||||
JAM_FACEBOOK_SQUARE("\uea61"),
|
||||
JAM_FACEBOOK("\uea62"),
|
||||
JAM_FAST_BACKWARD_CIRCLE_F("\uea63"),
|
||||
JAM_FAST_BACKWARD_CIRCLE("\uea64"),
|
||||
JAM_FAST_BACKWARD_SQUARE_F("\uea65"),
|
||||
JAM_FAST_BACKWARD_SQUARE("\uea66"),
|
||||
JAM_FAST_BACKWARD("\uea67"),
|
||||
JAM_FAST_FORWARD_CIRCLE_F("\uea68"),
|
||||
JAM_FAST_FORWARD_CIRCLE("\uea69"),
|
||||
JAM_FAST_FORWARD_SQUARE_F("\uea6a"),
|
||||
JAM_FAST_FORWARD_SQUARE("\uea6b"),
|
||||
JAM_FAST_FORWARD("\uea6c"),
|
||||
JAM_FEATHER_F("\uea6d"),
|
||||
JAM_FEATHER("\uea6e"),
|
||||
JAM_FEMALE("\uea6f"),
|
||||
JAM_FILE_F("\uea70"),
|
||||
JAM_FILE("\uea71"),
|
||||
JAM_FILES_F("\uea72"),
|
||||
JAM_FILES("\uea73"),
|
||||
JAM_FILTER_F("\uea74"),
|
||||
JAM_FILTER("\uea75"),
|
||||
JAM_FINGERPRINT("\uea76"),
|
||||
JAM_FIRST_AID_F("\uea77"),
|
||||
JAM_FIRST_AID("\uea78"),
|
||||
JAM_FISH("\uea79"),
|
||||
JAM_FIVERR_CIRCLE("\uea7a"),
|
||||
JAM_FIVERR_SQUARE("\uea7b"),
|
||||
JAM_FIVERR("\uea7c"),
|
||||
JAM_FLAG_F("\uea7d"),
|
||||
JAM_FLAG("\uea7e"),
|
||||
JAM_FLAME_F("\uea7f"),
|
||||
JAM_FLAME("\uea80"),
|
||||
JAM_FLASHLIGHT_OFF_F("\uea81"),
|
||||
JAM_FLASHLIGHT_OFF("\uea82"),
|
||||
JAM_FLASHLIGHT_ON_F("\uea83"),
|
||||
JAM_FLASHLIGHT_ON("\uea84"),
|
||||
JAM_FLASK("\uea85"),
|
||||
JAM_FLICKR_CIRCLE("\uea86"),
|
||||
JAM_FLICKR_SQUARE("\uea87"),
|
||||
JAM_FLICKR("\uea88"),
|
||||
JAM_FLOWER("\uea89"),
|
||||
JAM_FOLDER_F("\uea8a"),
|
||||
JAM_FOLDER_OPEN_F("\uea8b"),
|
||||
JAM_FOLDER_OPEN("\uea8c"),
|
||||
JAM_FOLDER_ZIP_F("\uea8d"),
|
||||
JAM_FOLDER_ZIP("\uea8e"),
|
||||
JAM_FOLDER("\uea8f"),
|
||||
JAM_FOOTBALL("\uea90"),
|
||||
JAM_FORK_F("\uea91"),
|
||||
JAM_FORK("\uea92"),
|
||||
JAM_FORWARD_CIRCLE_F("\uea93"),
|
||||
JAM_FORWARD_CIRCLE("\uea94"),
|
||||
JAM_FORWARD_SQUARE_F("\uea95"),
|
||||
JAM_FORWARD_SQUARE("\uea96"),
|
||||
JAM_FORWARD("\uea97"),
|
||||
JAM_FOURSQUARE("\uea98"),
|
||||
JAM_GAMEPAD_F("\uea99"),
|
||||
JAM_GAMEPAD_RETRO_F("\uea9a"),
|
||||
JAM_GAMEPAD_RETRO("\uea9b"),
|
||||
JAM_GAMEPAD("\uea9c"),
|
||||
JAM_GHOST_F("\uea9d"),
|
||||
JAM_GHOST_ORG_CIRCLE("\uea9e"),
|
||||
JAM_GHOST_ORG_SQUARE("\uea9f"),
|
||||
JAM_GHOST_ORG("\ueaa0"),
|
||||
JAM_GHOST("\ueaa1"),
|
||||
JAM_GIFT_F("\ueaa2"),
|
||||
JAM_GIFT("\ueaa3"),
|
||||
JAM_GITHUB_CIRCLE("\ueaa4"),
|
||||
JAM_GITHUB_SQUARE("\ueaa5"),
|
||||
JAM_GITHUB("\ueaa6"),
|
||||
JAM_GITLAB_CIRCLE("\ueaa7"),
|
||||
JAM_GITLAB_SQUARE("\ueaa8"),
|
||||
JAM_GITLAB("\ueaa9"),
|
||||
JAM_GLASS_EMPTY("\ueaaa"),
|
||||
JAM_GLASS_FILLED_F("\ueaab"),
|
||||
JAM_GLASS_FILLED("\ueaac"),
|
||||
JAM_GLUE_F("\ueaad"),
|
||||
JAM_GLUE("\ueaae"),
|
||||
JAM_GOOGLE_CIRCLE("\ueaaf"),
|
||||
JAM_GOOGLE_PLAY_CIRCLE("\ueab0"),
|
||||
JAM_GOOGLE_PLAY_SQUARE("\ueab1"),
|
||||
JAM_GOOGLE_PLAY("\ueab2"),
|
||||
JAM_GOOGLE_PLUS_CIRCLE("\ueab3"),
|
||||
JAM_GOOGLE_PLUS_SQUARE("\ueab4"),
|
||||
JAM_GOOGLE_PLUS("\ueab5"),
|
||||
JAM_GOOGLE_SQUARE("\ueab6"),
|
||||
JAM_GOOGLE("\ueab7"),
|
||||
JAM_GPS_F("\ueab8"),
|
||||
JAM_GPS("\ueab9"),
|
||||
JAM_GRID_F("\ueaba"),
|
||||
JAM_GRID("\ueabb"),
|
||||
JAM_HAIRDRYER_F("\ueabc"),
|
||||
JAM_HAIRDRYER("\ueabd"),
|
||||
JAM_HAMMER_F("\ueabe"),
|
||||
JAM_HAMMER("\ueabf"),
|
||||
JAM_HASHTAG("\ueac0"),
|
||||
JAM_HEADER_1("\ueac1"),
|
||||
JAM_HEADER_2("\ueac2"),
|
||||
JAM_HEADER_3("\ueac3"),
|
||||
JAM_HEADER_4("\ueac4"),
|
||||
JAM_HEADER_5("\ueac5"),
|
||||
JAM_HEADER_6("\ueac6"),
|
||||
JAM_HEADER("\ueac7"),
|
||||
JAM_HEADSET_F("\ueac8"),
|
||||
JAM_HEADSET("\ueac9"),
|
||||
JAM_HEART_F("\ueaca"),
|
||||
JAM_HEART("\ueacb"),
|
||||
JAM_HELMET_F("\ueacc"),
|
||||
JAM_HELMET("\ueacd"),
|
||||
JAM_HELP_F("\ueace"),
|
||||
JAM_HELP("\ueacf"),
|
||||
JAM_HIGHLIGHTER_F("\uead0"),
|
||||
JAM_HIGHLIGHTER("\uead1"),
|
||||
JAM_HISTORY("\uead2"),
|
||||
JAM_HOME_F("\uead3"),
|
||||
JAM_HOME("\uead4"),
|
||||
JAM_HOURGLASS_F("\uead5"),
|
||||
JAM_HOURGLASS("\uead6"),
|
||||
JAM_ICE_CREAM_F("\uead7"),
|
||||
JAM_ICE_CREAM("\uead8"),
|
||||
JAM_ID_CARD_F("\uead9"),
|
||||
JAM_ID_CARD("\ueada"),
|
||||
JAM_INBOX_F("\ueadb"),
|
||||
JAM_INBOX("\ueadc"),
|
||||
JAM_INBOXES_F("\ueadd"),
|
||||
JAM_INBOXES("\ueade"),
|
||||
JAM_INDENT("\ueadf"),
|
||||
JAM_INFINITE("\ueae0"),
|
||||
JAM_INFO_F("\ueae1"),
|
||||
JAM_INFO("\ueae2"),
|
||||
JAM_INSTAGRAM("\ueae3"),
|
||||
JAM_INSTANT_PICTURE_F("\ueae4"),
|
||||
JAM_INSTANT_PICTURE("\ueae5"),
|
||||
JAM_ITALIC("\ueae6"),
|
||||
JAM_JOYSTICK_F("\ueae7"),
|
||||
JAM_JOYSTICK("\ueae8"),
|
||||
JAM_KEY_F("\ueae9"),
|
||||
JAM_KEY("\ueaea"),
|
||||
JAM_KEYBOARD_F("\ueaeb"),
|
||||
JAM_KEYBOARD("\ueaec"),
|
||||
JAM_LANGUAGE("\ueaed"),
|
||||
JAM_LAYERS_F("\ueaee"),
|
||||
JAM_LAYERS("\ueaef"),
|
||||
JAM_LAYOUT_F("\ueaf0"),
|
||||
JAM_LAYOUT("\ueaf1"),
|
||||
JAM_LEAF_F("\ueaf2"),
|
||||
JAM_LEAF("\ueaf3"),
|
||||
JAM_LIFEBUOY_F("\ueaf4"),
|
||||
JAM_LIFEBUOY("\ueaf5"),
|
||||
JAM_LIGHTBULB_F("\ueaf6"),
|
||||
JAM_LIGHTBULB("\ueaf7"),
|
||||
JAM_LINE("\ueaf8"),
|
||||
JAM_LINK("\ueaf9"),
|
||||
JAM_LINKEDIN_CIRCLE("\ueafa"),
|
||||
JAM_LINKEDIN_SQUARE("\ueafb"),
|
||||
JAM_LINKEDIN("\ueafc"),
|
||||
JAM_LOG_IN("\ueafd"),
|
||||
JAM_LOG_OUT("\ueafe"),
|
||||
JAM_LUGGAGE_F("\ueaff"),
|
||||
JAM_LUGGAGE("\ueb00"),
|
||||
JAM_MAGIC_F("\ueb01"),
|
||||
JAM_MAGIC("\ueb02"),
|
||||
JAM_MAGNET_F("\ueb03"),
|
||||
JAM_MAGNET("\ueb04"),
|
||||
JAM_MALE("\ueb05"),
|
||||
JAM_MAP_F("\ueb06"),
|
||||
JAM_MAP_MARKER_F("\ueb07"),
|
||||
JAM_MAP_MARKER("\ueb08"),
|
||||
JAM_MAP("\ueb09"),
|
||||
JAM_MASK_F("\ueb0a"),
|
||||
JAM_MASK("\ueb0b"),
|
||||
JAM_MEDAL_F("\ueb0c"),
|
||||
JAM_MEDAL("\ueb0d"),
|
||||
JAM_MEDICAL("\ueb0e"),
|
||||
JAM_MEDIUM_CIRCLE("\ueb0f"),
|
||||
JAM_MEDIUM_SQUARE("\ueb10"),
|
||||
JAM_MEDIUM("\ueb11"),
|
||||
JAM_MENU("\ueb12"),
|
||||
JAM_MERGE_F("\ueb13"),
|
||||
JAM_MERGE("\ueb14"),
|
||||
JAM_MESSAGE_ALT_F("\ueb15"),
|
||||
JAM_MESSAGE_ALT_WRITING_F("\ueb16"),
|
||||
JAM_MESSAGE_ALT_WRITING("\ueb17"),
|
||||
JAM_MESSAGE_ALT("\ueb18"),
|
||||
JAM_MESSAGE_F("\ueb19"),
|
||||
JAM_MESSAGE_WRITING_F("\ueb1a"),
|
||||
JAM_MESSAGE_WRITING("\ueb1b"),
|
||||
JAM_MESSAGE("\ueb1c"),
|
||||
JAM_MESSAGES_ALT_F("\ueb1d"),
|
||||
JAM_MESSAGES_ALT("\ueb1e"),
|
||||
JAM_MESSAGES_F("\ueb1f"),
|
||||
JAM_MESSAGES("\ueb20"),
|
||||
JAM_MESSENGER("\ueb21"),
|
||||
JAM_MIC_ALT("\ueb22"),
|
||||
JAM_MIC_CIRCLE_F("\ueb23"),
|
||||
JAM_MIC_CIRCLE("\ueb24"),
|
||||
JAM_MIC_F("\ueb25"),
|
||||
JAM_MIC_SQUARE_F("\ueb26"),
|
||||
JAM_MIC_SQUARE("\ueb27"),
|
||||
JAM_MIC("\ueb28"),
|
||||
JAM_MICROCHIP_F("\ueb29"),
|
||||
JAM_MICROCHIP("\ueb2a"),
|
||||
JAM_MINUS_CIRCLE_F("\ueb2b"),
|
||||
JAM_MINUS_CIRCLE("\ueb2c"),
|
||||
JAM_MINUS_RECTANGLE_F("\ueb2d"),
|
||||
JAM_MINUS_RECTANGLE("\ueb2e"),
|
||||
JAM_MINUS("\ueb2f"),
|
||||
JAM_MOON_F("\ueb30"),
|
||||
JAM_MOON("\ueb31"),
|
||||
JAM_MORE_HORIZONTAL_F("\ueb32"),
|
||||
JAM_MORE_HORIZONTAL("\ueb33"),
|
||||
JAM_MORE_VERTICAL_F("\ueb34"),
|
||||
JAM_MORE_VERTICAL("\ueb35"),
|
||||
JAM_MOUNTAIN_F("\ueb36"),
|
||||
JAM_MOUNTAIN("\ueb37"),
|
||||
JAM_MOVE_ALT("\ueb38"),
|
||||
JAM_MOVE("\ueb39"),
|
||||
JAM_MOVIE("\ueb3a"),
|
||||
JAM_MUG_F("\ueb3b"),
|
||||
JAM_MUG("\ueb3c"),
|
||||
JAM_MUSIC_F("\ueb3d"),
|
||||
JAM_MUSIC("\ueb3e"),
|
||||
JAM_MYSPACE_CIRCLE("\ueb3f"),
|
||||
JAM_MYSPACE_SQUARE("\ueb40"),
|
||||
JAM_MYSPACE("\ueb41"),
|
||||
JAM_NAPSTER_CIRCLE("\ueb42"),
|
||||
JAM_NAPSTER_SQUARE("\ueb43"),
|
||||
JAM_NAPSTER("\ueb44"),
|
||||
JAM_NEWSLETTER_F("\ueb45"),
|
||||
JAM_NEWSLETTER("\ueb46"),
|
||||
JAM_NEWSPAPER_F("\ueb47"),
|
||||
JAM_NEWSPAPER("\ueb48"),
|
||||
JAM_NPM("\ueb49"),
|
||||
JAM_ODNOKLASSNIKI_CIRCLE("\ueb4a"),
|
||||
JAM_ODNOKLASSNIKI_SQUARE("\ueb4b"),
|
||||
JAM_ODNOKLASSNIKI("\ueb4c"),
|
||||
JAM_OPERA_CIRCLE("\ueb4d"),
|
||||
JAM_OPERA_SQUARE("\ueb4e"),
|
||||
JAM_OPERA("\ueb4f"),
|
||||
JAM_ORDERED_LIST("\ueb50"),
|
||||
JAM_PADLOCK_ALT_F("\ueb51"),
|
||||
JAM_PADLOCK_ALT_OPEN_F("\ueb52"),
|
||||
JAM_PADLOCK_ALT_OPEN("\ueb53"),
|
||||
JAM_PADLOCK_ALT("\ueb54"),
|
||||
JAM_PADLOCK_F("\ueb55"),
|
||||
JAM_PADLOCK_OPEN_F("\ueb56"),
|
||||
JAM_PADLOCK_OPEN("\ueb57"),
|
||||
JAM_PADLOCK("\ueb58"),
|
||||
JAM_PAPER_PLANE_F("\ueb59"),
|
||||
JAM_PAPER_PLANE("\ueb5a"),
|
||||
JAM_PATREON_CIRCLE("\ueb5b"),
|
||||
JAM_PATREON_SQUARE("\ueb5c"),
|
||||
JAM_PATREON("\ueb5d"),
|
||||
JAM_PAUSE("\ueb5e"),
|
||||
JAM_PAYPAL_CIRCLE("\ueb5f"),
|
||||
JAM_PAYPAL_SQUARE("\ueb60"),
|
||||
JAM_PAYPAL("\ueb61"),
|
||||
JAM_PEN_F("\ueb62"),
|
||||
JAM_PEN("\ueb63"),
|
||||
JAM_PENCIL_F("\ueb64"),
|
||||
JAM_PENCIL("\ueb65"),
|
||||
JAM_PERISCOPE_CIRCLE("\ueb66"),
|
||||
JAM_PERISCOPE_SQUARE("\ueb67"),
|
||||
JAM_PERISCOPE("\ueb68"),
|
||||
JAM_PHONE_F("\ueb69"),
|
||||
JAM_PHONE("\ueb6a"),
|
||||
JAM_PICTURE_F("\ueb6b"),
|
||||
JAM_PICTURE("\ueb6c"),
|
||||
JAM_PICTURES_F("\ueb6d"),
|
||||
JAM_PICTURES("\ueb6e"),
|
||||
JAM_PIE_CHART_ALT("\ueb6f"),
|
||||
JAM_PIE_CHART_F("\ueb70"),
|
||||
JAM_PIE_CHART("\ueb71"),
|
||||
JAM_PIN_ALT_F("\ueb72"),
|
||||
JAM_PIN_ALT("\ueb73"),
|
||||
JAM_PIN_F("\ueb74"),
|
||||
JAM_PIN("\ueb75"),
|
||||
JAM_PINTEREST_CIRCLE("\ueb76"),
|
||||
JAM_PINTEREST_SQUARE("\ueb77"),
|
||||
JAM_PINTEREST("\ueb78"),
|
||||
JAM_PIZZA_SLICE("\ueb79"),
|
||||
JAM_PLANE_F("\ueb7a"),
|
||||
JAM_PLANE("\ueb7b"),
|
||||
JAM_PLAY_CIRCLE_F("\ueb7c"),
|
||||
JAM_PLAY_CIRCLE("\ueb7d"),
|
||||
JAM_PLAY_SQUARE_F("\ueb7e"),
|
||||
JAM_PLAY_SQUARE("\ueb7f"),
|
||||
JAM_PLAY("\ueb80"),
|
||||
JAM_PLUG_F("\ueb81"),
|
||||
JAM_PLUG("\ueb82"),
|
||||
JAM_PLUS_CIRCLE_F("\ueb83"),
|
||||
JAM_PLUS_CIRCLE("\ueb84"),
|
||||
JAM_PLUS_RECTANGLE_F("\ueb85"),
|
||||
JAM_PLUS_RECTANGLE("\ueb86"),
|
||||
JAM_PLUS("\ueb87"),
|
||||
JAM_POCKET_WATCH_F("\ueb88"),
|
||||
JAM_POCKET_WATCH("\ueb89"),
|
||||
JAM_PODCAST("\ueb8a"),
|
||||
JAM_POWER("\ueb8b"),
|
||||
JAM_PRINTER_F("\ueb8c"),
|
||||
JAM_PRINTER("\ueb8d"),
|
||||
JAM_QR_CODE("\ueb8e"),
|
||||
JAM_QUORA_CIRCLE("\ueb8f"),
|
||||
JAM_QUORA_SQUARE("\ueb90"),
|
||||
JAM_QUORA("\ueb91"),
|
||||
JAM_RAINBOW("\ueb92"),
|
||||
JAM_REC("\ueb93"),
|
||||
JAM_RECTANGLE_F("\ueb94"),
|
||||
JAM_RECTANGLE("\ueb95"),
|
||||
JAM_REDDIT("\ueb96"),
|
||||
JAM_REDO("\ueb97"),
|
||||
JAM_REFRESH_REVERSE("\ueb98"),
|
||||
JAM_REFRESH("\ueb99"),
|
||||
JAM_REPEAT("\ueb9a"),
|
||||
JAM_ROCKET_F("\ueb9b"),
|
||||
JAM_ROCKET("\ueb9c"),
|
||||
JAM_RSS_FEED("\ueb9d"),
|
||||
JAM_RUBBER("\ueb9e"),
|
||||
JAM_RULER_F("\ueb9f"),
|
||||
JAM_RULER("\ueba0"),
|
||||
JAM_SAVE_F("\ueba1"),
|
||||
JAM_SAVE("\ueba2"),
|
||||
JAM_SCISSORS("\ueba3"),
|
||||
JAM_SCREEN_F("\ueba4"),
|
||||
JAM_SCREEN("\ueba5"),
|
||||
JAM_SCREWDRIVER_F("\ueba6"),
|
||||
JAM_SCREWDRIVER("\ueba7"),
|
||||
JAM_SEARCH_FOLDER("\ueba8"),
|
||||
JAM_SEARCH_MINUS("\ueba9"),
|
||||
JAM_SEARCH_PLUS("\uebaa"),
|
||||
JAM_SEARCH("\uebab"),
|
||||
JAM_SET_BACKWARD_CIRCLE_F("\uebac"),
|
||||
JAM_SET_BACKWARD_CIRCLE("\uebad"),
|
||||
JAM_SET_BACKWARD_SQUARE_F("\uebae"),
|
||||
JAM_SET_BACKWARD_SQUARE("\uebaf"),
|
||||
JAM_SET_BACKWARD("\uebb0"),
|
||||
JAM_SET_FORWARD_CIRCLE_F("\uebb1"),
|
||||
JAM_SET_FORWARD_CIRCLE("\uebb2"),
|
||||
JAM_SET_FORWARD_SQUARE_F("\uebb3"),
|
||||
JAM_SET_FORWARD_SQUARE("\uebb4"),
|
||||
JAM_SET_FORWARD("\uebb5"),
|
||||
JAM_SET_SQUARE_F("\uebb6"),
|
||||
JAM_SET_SQUARE("\uebb7"),
|
||||
JAM_SETTINGS_ALT("\uebb8"),
|
||||
JAM_SHARE_ALT_F("\uebb9"),
|
||||
JAM_SHARE_ALT("\uebba"),
|
||||
JAM_SHARE("\uebbb"),
|
||||
JAM_SHIELD_CHECK_F("\uebbc"),
|
||||
JAM_SHIELD_CHECK("\uebbd"),
|
||||
JAM_SHIELD_CLOSE_F("\uebbe"),
|
||||
JAM_SHIELD_CLOSE("\uebbf"),
|
||||
JAM_SHIELD_F("\uebc0"),
|
||||
JAM_SHIELD_HALF("\uebc1"),
|
||||
JAM_SHIELD_MINUS_F("\uebc2"),
|
||||
JAM_SHIELD_MINUS("\uebc3"),
|
||||
JAM_SHIELD_PLUS_F("\uebc4"),
|
||||
JAM_SHIELD_PLUS("\uebc5"),
|
||||
JAM_SHIELD("\uebc6"),
|
||||
JAM_SHOPIFY_CIRCLE("\uebc7"),
|
||||
JAM_SHOPIFY_SQUARE("\uebc8"),
|
||||
JAM_SHOPIFY("\uebc9"),
|
||||
JAM_SHOPPING_BAG_ALT_F("\uebca"),
|
||||
JAM_SHOPPING_BAG_ALT("\uebcb"),
|
||||
JAM_SHOPPING_BAG_F("\uebcc"),
|
||||
JAM_SHOPPING_BAG("\uebcd"),
|
||||
JAM_SHOPPING_CART("\uebce"),
|
||||
JAM_SHUFFLE("\uebcf"),
|
||||
JAM_SIGNAL("\uebd0"),
|
||||
JAM_SITEMAP_F("\uebd1"),
|
||||
JAM_SITEMAP("\uebd2"),
|
||||
JAM_SKULL_F("\uebd3"),
|
||||
JAM_SKULL("\uebd4"),
|
||||
JAM_SKYPE_CIRCLE("\uebd5"),
|
||||
JAM_SKYPE_SQUARE("\uebd6"),
|
||||
JAM_SKYPE("\uebd7"),
|
||||
JAM_SLACK_CIRCLE("\uebd8"),
|
||||
JAM_SLACK_SQUARE("\uebd9"),
|
||||
JAM_SLACK("\uebda"),
|
||||
JAM_SMILEY_F("\uebdb"),
|
||||
JAM_SMILEY("\uebdc"),
|
||||
JAM_SNAPCHAT_CIRCLE("\uebdd"),
|
||||
JAM_SNAPCHAT_SQUARE("\uebde"),
|
||||
JAM_SNAPCHAT("\uebdf"),
|
||||
JAM_SNOWBOARD_F("\uebe0"),
|
||||
JAM_SNOWBOARD("\uebe1"),
|
||||
JAM_SNOWFLAKE("\uebe2"),
|
||||
JAM_SOUNDCLOUD("\uebe3"),
|
||||
JAM_SPEAKER_F("\uebe4"),
|
||||
JAM_SPEAKER("\uebe5"),
|
||||
JAM_SPOTIFY("\uebe6"),
|
||||
JAM_SQUARE_F("\uebe7"),
|
||||
JAM_SQUARE("\uebe8"),
|
||||
JAM_SQUARESPACE_CIRCLE("\uebe9"),
|
||||
JAM_SQUARESPACE_SQUARE("\uebea"),
|
||||
JAM_SQUARESPACE("\uebeb"),
|
||||
JAM_STACKOVERFLOW_CIRCLE("\uebec"),
|
||||
JAM_STACKOVERFLOW_SQUARE("\uebed"),
|
||||
JAM_STACKOVERFLOW("\uebee"),
|
||||
JAM_STAMP_F("\uebef"),
|
||||
JAM_STAMP("\uebf0"),
|
||||
JAM_STAR_F("\uebf1"),
|
||||
JAM_STAR_FULL("\uebf2"),
|
||||
JAM_STAR_HALF("\uebf3"),
|
||||
JAM_STAR("\uebf4"),
|
||||
JAM_STATION("\uebf5"),
|
||||
JAM_STOP_SIGN("\uebf6"),
|
||||
JAM_STOP("\uebf7"),
|
||||
JAM_STORE("\uebf8"),
|
||||
JAM_STRIKETHROUGH("\uebf9"),
|
||||
JAM_STUMBLEUPON_CIRCLE("\uebfa"),
|
||||
JAM_STUMBLEUPON_SQUARE("\uebfb"),
|
||||
JAM_STUMBLEUPON("\uebfc"),
|
||||
JAM_SUN_F("\uebfd"),
|
||||
JAM_SUN("\uebfe"),
|
||||
JAM_SWITCH_LEFT_F("\uebff"),
|
||||
JAM_SWITCH_LEFT("\uec00"),
|
||||
JAM_SWITCH_RIGHT_F("\uec01"),
|
||||
JAM_SWITCH_RIGHT("\uec02"),
|
||||
JAM_SWORD_F("\uec03"),
|
||||
JAM_SWORD("\uec04"),
|
||||
JAM_TABLET_F("\uec05"),
|
||||
JAM_TABLET("\uec06"),
|
||||
JAM_TAG_F("\uec07"),
|
||||
JAM_TAG("\uec08"),
|
||||
JAM_TAGS_F("\uec09"),
|
||||
JAM_TAGS("\uec0a"),
|
||||
JAM_TARGET("\uec0b"),
|
||||
JAM_TASK_LIST_F("\uec0c"),
|
||||
JAM_TASK_LIST("\uec0d"),
|
||||
JAM_TEMPERATURE("\uec0e"),
|
||||
JAM_TERMINAL("\uec0f"),
|
||||
JAM_THUNDER_F("\uec10"),
|
||||
JAM_THUNDER("\uec11"),
|
||||
JAM_TICKET_F("\uec12"),
|
||||
JAM_TICKET("\uec13"),
|
||||
JAM_TOOLS_F("\uec14"),
|
||||
JAM_TOOLS("\uec15"),
|
||||
JAM_TORCH_F("\uec16"),
|
||||
JAM_TORCH("\uec17"),
|
||||
JAM_TOTEM("\uec18"),
|
||||
JAM_TRAIN_F("\uec19"),
|
||||
JAM_TRAIN("\uec1a"),
|
||||
JAM_TRANSGENDER("\uec1b"),
|
||||
JAM_TRASH_ALT_F("\uec1c"),
|
||||
JAM_TRASH_ALT("\uec1d"),
|
||||
JAM_TRASH_F("\uec1e"),
|
||||
JAM_TRASH("\uec1f"),
|
||||
JAM_TREE_ALT_F("\uec20"),
|
||||
JAM_TREE_ALT("\uec21"),
|
||||
JAM_TREE_F("\uec22"),
|
||||
JAM_TREE("\uec23"),
|
||||
JAM_TRELLO("\uec24"),
|
||||
JAM_TRIANGLE_DANGER_F("\uec25"),
|
||||
JAM_TRIANGLE_DANGER("\uec26"),
|
||||
JAM_TRIANGLE_F("\uec27"),
|
||||
JAM_TRIANGLE("\uec28"),
|
||||
JAM_TROPHY_F("\uec29"),
|
||||
JAM_TROPHY("\uec2a"),
|
||||
JAM_TUBE("\uec2b"),
|
||||
JAM_TUMBLR_CIRCLE("\uec2c"),
|
||||
JAM_TUMBLR_SQUARE("\uec2d"),
|
||||
JAM_TUMBLR("\uec2e"),
|
||||
JAM_TWITCH("\uec2f"),
|
||||
JAM_TWITTER_CIRCLE("\uec30"),
|
||||
JAM_TWITTER_SQUARE("\uec31"),
|
||||
JAM_TWITTER("\uec32"),
|
||||
JAM_UMBRELLA_CLOSED_F("\uec33"),
|
||||
JAM_UMBRELLA_CLOSED("\uec34"),
|
||||
JAM_UMBRELLA_F("\uec35"),
|
||||
JAM_UMBRELLA("\uec36"),
|
||||
JAM_UNDERLINE("\uec37"),
|
||||
JAM_UNDO("\uec38"),
|
||||
JAM_UNINDENT("\uec39"),
|
||||
JAM_UNIVERSE("\uec3a"),
|
||||
JAM_UNORDERED_LIST("\uec3b"),
|
||||
JAM_UNSPLASH_CIRCLE("\uec3c"),
|
||||
JAM_UNSPLASH_SQUARE("\uec3d"),
|
||||
JAM_UNSPLASH("\uec3e"),
|
||||
JAM_UPLOAD("\uec3f"),
|
||||
JAM_USER_CIRCLE("\uec40"),
|
||||
JAM_USER_MINUS("\uec41"),
|
||||
JAM_USER_PLUS("\uec42"),
|
||||
JAM_USER_REMOVE("\uec43"),
|
||||
JAM_USER_SQUARE("\uec44"),
|
||||
JAM_USER("\uec45"),
|
||||
JAM_USERS("\uec46"),
|
||||
JAM_VIADEO("\uec47"),
|
||||
JAM_VIBER_CIRCLE("\uec48"),
|
||||
JAM_VIBER_SQUARE("\uec49"),
|
||||
JAM_VIBER("\uec4a"),
|
||||
JAM_VIDEO_CAMERA_F("\uec4b"),
|
||||
JAM_VIDEO_CAMERA_VINTAGE_F("\uec4c"),
|
||||
JAM_VIDEO_CAMERA_VINTAGE("\uec4d"),
|
||||
JAM_VIDEO_CAMERA("\uec4e"),
|
||||
JAM_VIMEO_CIRCLE("\uec4f"),
|
||||
JAM_VIMEO_SQUARE("\uec50"),
|
||||
JAM_VIMEO("\uec51"),
|
||||
JAM_VINE_CIRCLE("\uec52"),
|
||||
JAM_VINE_SQUARE("\uec53"),
|
||||
JAM_VINE("\uec54"),
|
||||
JAM_VOICEMAIL("\uec55"),
|
||||
JAM_VOLUME_CIRCLE_F("\uec56"),
|
||||
JAM_VOLUME_CIRCLE("\uec57"),
|
||||
JAM_VOLUME_DOWN_CIRCLE_F("\uec58"),
|
||||
JAM_VOLUME_DOWN_CIRCLE("\uec59"),
|
||||
JAM_VOLUME_DOWN_SQUARE_F("\uec5a"),
|
||||
JAM_VOLUME_DOWN_SQUARE("\uec5b"),
|
||||
JAM_VOLUME_DOWN("\uec5c"),
|
||||
JAM_VOLUME_MUTE_CIRCLE_F("\uec5d"),
|
||||
JAM_VOLUME_MUTE_CIRCLE("\uec5e"),
|
||||
JAM_VOLUME_MUTE_SQUARE_F("\uec5f"),
|
||||
JAM_VOLUME_MUTE_SQUARE("\uec60"),
|
||||
JAM_VOLUME_MUTE("\uec61"),
|
||||
JAM_VOLUME_SQUARE_F("\uec62"),
|
||||
JAM_VOLUME_SQUARE("\uec63"),
|
||||
JAM_VOLUME_UP_CIRCLE_F("\uec64"),
|
||||
JAM_VOLUME_UP_CIRCLE("\uec65"),
|
||||
JAM_VOLUME_UP_SQUARE_F("\uec66"),
|
||||
JAM_VOLUME_UP_SQUARE("\uec67"),
|
||||
JAM_VOLUME_UP("\uec68"),
|
||||
JAM_VOLUME("\uec69"),
|
||||
JAM_WATCH_F("\uec6a"),
|
||||
JAM_WATCH("\uec6b"),
|
||||
JAM_WATER_DROP_F("\uec6c"),
|
||||
JAM_WATER_DROP("\uec6d"),
|
||||
JAM_WHATSAPP("\uec6e"),
|
||||
JAM_WIFI("\uec6f"),
|
||||
JAM_WIKIPEDIA("\uec70"),
|
||||
JAM_WORDPRESS("\uec71"),
|
||||
JAM_WORLD("\uec72"),
|
||||
JAM_WRENCH_F("\uec73"),
|
||||
JAM_WRENCH("\uec74"),
|
||||
JAM_WRITE_F("\uec75"),
|
||||
JAM_WRITE("\uec76"),
|
||||
JAM_YAHOO_CIRCLE("\uec77"),
|
||||
JAM_YAHOO_SQUARE("\uec78"),
|
||||
JAM_YAHOO("\uec79"),
|
||||
JAM_YELP_CIRCLE("\uec7a"),
|
||||
JAM_YELP_SQUARE("\uec7b"),
|
||||
JAM_YELP("\uec7c"),
|
||||
JAM_YOUTUBE_CIRCLE("\uec7d"),
|
||||
JAM_YOUTUBE_SQUARE("\uec7e"),
|
||||
JAM_YOUTUBE("\uec7f");
|
||||
|
||||
/**
|
||||
* The value associated with the icon.
|
||||
*/
|
||||
private final String value;
|
||||
|
||||
/**
|
||||
* Creates a jam icon with the value.
|
||||
*
|
||||
* @param value The value.
|
||||
*/
|
||||
private JamIcon(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the string value of the icon.
|
||||
*
|
||||
* @return The string value of the icon.
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
package com.mowesta.android.app.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Typeface;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
|
||||
import com.mowesta.android.app.R;
|
||||
|
||||
/**
|
||||
* A widget that displays a jam icon. The icon
|
||||
* can be configured via the jam attribute.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class JamView extends AppCompatTextView {
|
||||
|
||||
/**
|
||||
* The icon type to display.
|
||||
*/
|
||||
JamIcon type;
|
||||
|
||||
/**
|
||||
* Creates a weather view.
|
||||
*
|
||||
* @param context The context.
|
||||
*/
|
||||
public JamView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the weather view.
|
||||
*
|
||||
* @param context The context.
|
||||
* @param attrs The attributes.
|
||||
*/
|
||||
public JamView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init(attrs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the weather view.
|
||||
*
|
||||
* @param context The context.
|
||||
* @param attrs The attributes.
|
||||
* @param defStyleAttr The theme.
|
||||
*/
|
||||
public JamView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init(attrs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the view from the attributes.
|
||||
*
|
||||
* @param attrs The attributes.
|
||||
*/
|
||||
public void init(AttributeSet attrs) {
|
||||
if (! isInEditMode()) {
|
||||
setTypeface(ResourcesCompat.getFont(getContext(), R.font.jam), Typeface.NORMAL);
|
||||
if (attrs == null) return;
|
||||
TypedArray ta = getContext().obtainStyledAttributes(attrs, R.styleable.JamView);
|
||||
int type = ta.getInt(R.styleable.JamView_jam,-1);
|
||||
if (type >= 0 && type < JamIcon.values().length) {
|
||||
JamIcon icon = JamIcon.values()[type];
|
||||
setText(icon.getValue());
|
||||
} else {
|
||||
setText("");
|
||||
}
|
||||
ta.recycle();
|
||||
} else {
|
||||
setText("O");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the icon type.
|
||||
*
|
||||
* @param type The icon type.
|
||||
*/
|
||||
public void setType(JamIcon type) {
|
||||
this.type = type;
|
||||
if (!isInEditMode()) {
|
||||
setText(type == null ? "" : type.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the icon type.
|
||||
*
|
||||
* @return The icon type.
|
||||
*/
|
||||
public JamIcon getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,163 +0,0 @@
|
||||
package com.mowesta.android.app.view;
|
||||
|
||||
/**
|
||||
* The weather icon codes extracted from the css file.
|
||||
*/
|
||||
@SuppressWarnings({"unused", "javadoc"})
|
||||
public enum WeatherIcon {
|
||||
|
||||
DAY_SUNNY("\uf00d"),
|
||||
DAY_CLOUDY("\uf002"),
|
||||
DAY_CLOUDY_GUSTS("\uf000"),
|
||||
DAY_CLOUDY_WINDY("\uf001"),
|
||||
DAY_FOG("\uf003"),
|
||||
DAY_HAIL("\uf004"),
|
||||
DAY_HAZE("\uf0b6"),
|
||||
DAY_LIGHTNING("\uf005"),
|
||||
DAY_RAIN("\uf008"),
|
||||
DAY_RAIN_MIX("\uf006"),
|
||||
DAY_RAIN_WIND("\uf007"),
|
||||
DAY_SHOWERS("\uf009"),
|
||||
DAY_SLEET("\uf0b2"),
|
||||
DAY_SLEET_STORM("\uf068"),
|
||||
DAY_SNOW("\uf00a"),
|
||||
DAY_SNOW_THUNDERSTORM("\uf06b"),
|
||||
DAY_SNOW_WIND("\uf065"),
|
||||
DAY_SPRINKLE("\uf00b"),
|
||||
DAY_STORM_SHOWERS("\uf00e"),
|
||||
DAY_SUNNY_OVERCAST("\uf00c"),
|
||||
DAY_THUNDERSTORM("\uf010"),
|
||||
DAY_WINDY("\uf085"),
|
||||
SOLAR_ECLIPSE("\uf06e"),
|
||||
HOT("\uf072"),
|
||||
DAY_CLOUDY_HIGH("\uf07d"),
|
||||
DAY_LIGHT_WIND("\uf0c4"),
|
||||
NIGHT_CLEAR("\uf02e"),
|
||||
NIGHT_ALT_CLOUDY("\uf086"),
|
||||
NIGHT_ALT_CLOUDY_GUSTS("\uf022"),
|
||||
NIGHT_ALT_CLOUDY_WINDY("\uf023"),
|
||||
NIGHT_ALT_HAIL("\uf024"),
|
||||
NIGHT_ALT_LIGHTNING("\uf025"),
|
||||
NIGHT_ALT_RAIN("\uf028"),
|
||||
NIGHT_ALT_RAIN_MIX("\uf026"),
|
||||
NIGHT_ALT_RAIN_WIND("\uf027"),
|
||||
NIGHT_ALT_SHOWERS("\uf029"),
|
||||
NIGHT_ALT_SLEET("\uf0b4"),
|
||||
NIGHT_ALT_SLEET_STORM("\uf06a"),
|
||||
NIGHT_ALT_SNOW("\uf02a"),
|
||||
NIGHT_ALT_SNOW_THUNDERSTORM("\uf06d"),
|
||||
NIGHT_ALT_SNOW_WIND("\uf067"),
|
||||
NIGHT_ALT_SPRINKLE("\uf02b"),
|
||||
NIGHT_ALT_STORM_SHOWERS("\uf02c"),
|
||||
NIGHT_ALT_THUNDERSTORM("\uf02d"),
|
||||
NIGHT_CLOUDY("\uf031"),
|
||||
NIGHT_CLOUDY_GUSTS("\uf02f"),
|
||||
NIGHT_CLOUDY_WINDY("\uf030"),
|
||||
NIGHT_FOG("\uf04a"),
|
||||
NIGHT_HAIL("\uf032"),
|
||||
NIGHT_LIGHTNING("\uf033"),
|
||||
NIGHT_PARTLY_CLOUDY("\uf083"),
|
||||
NIGHT_RAIN("\uf036"),
|
||||
NIGHT_RAIN_MIX("\uf034"),
|
||||
NIGHT_RAIN_WIND("\uf035"),
|
||||
NIGHT_SHOWERS("\uf037"),
|
||||
NIGHT_SLEET("\uf0b3"),
|
||||
NIGHT_SLEET_STORM("\uf069"),
|
||||
NIGHT_SNOW("\uf038"),
|
||||
NIGHT_SNOW_THUNDERSTORM("\uf06c"),
|
||||
NIGHT_SNOW_WIND("\uf066"),
|
||||
NIGHT_SPRINKLE("\uf039"),
|
||||
NIGHT_STORM_SHOWERS("\uf03a"),
|
||||
NIGHT_THUNDERSTORM("\uf03b"),
|
||||
LUNAR_ECLIPSE("\uf070"),
|
||||
STARS("\uf077"),
|
||||
STORM_SHOWERS("\uf01d"),
|
||||
THUNDERSTORM("\uf01e"),
|
||||
NIGHT_ALT_CLOUDY_HIGH("\uf07e"),
|
||||
NIGHT_CLOUDY_HIGH("\uf080"),
|
||||
NIGHT_ALT_PARTLY_CLOUDY("\uf081"),
|
||||
CLOUD("\uf041"),
|
||||
CLOUDY("\uf013"),
|
||||
CLOUDY_GUSTS("\uf011"),
|
||||
CLOUDY_WINDY("\uf012"),
|
||||
FOG("\uf014"),
|
||||
HAIL("\uf015"),
|
||||
RAIN("\uf019"),
|
||||
RAIN_MIX("\uf017"),
|
||||
RAIN_WIND("\uf018"),
|
||||
SHOWERS("\uf01a"),
|
||||
SLEET("\uf0b5"),
|
||||
SNOW("\uf01b"),
|
||||
SPRINKLE("\uf01c"),
|
||||
SNOW_WIND("\uf064"),
|
||||
SMOG("\uf074"),
|
||||
SMOKE("\uf062"),
|
||||
LIGHTNING("\uf016"),
|
||||
RAINDROPS("\uf04e"),
|
||||
RAINDROP("\uf078"),
|
||||
DUST("\uf063"),
|
||||
SNOWFLAKE_COLD("\uf076"),
|
||||
WINDY("\uf021"),
|
||||
STRONG_WIND("\uf050"),
|
||||
SANDSTORM("\uf082"),
|
||||
EARTHQUAKE("\uf0c6"),
|
||||
FIRE("\uf0c7"),
|
||||
FLOOD("\uf07c"),
|
||||
METEOR("\uf071"),
|
||||
TSUNAMI("\uf0c5"),
|
||||
VOLCANO("\uf0c8"),
|
||||
HURRICANE("\uf073"),
|
||||
TORNADO("\uf056"),
|
||||
SMALL_CRAFT_ADVISORY("\uf0cc"),
|
||||
GALE_WARNING("\uf0cd"),
|
||||
STORM_WARNING("\uf0ce"),
|
||||
HURRICANE_WARNING("\uf0cf"),
|
||||
WIND_DIRECTION("\uf0b1"),
|
||||
ALIEN("\uf075"),
|
||||
CELSIUS("\uf03c"),
|
||||
FAHRENHEIT("\uf045"),
|
||||
DEGREES("\uf042"),
|
||||
THERMOMETER("\uf055"),
|
||||
THERMOMETER_EXTERIOR("\uf053"),
|
||||
THERMOMETER_INTERNAL("\uf054"),
|
||||
CLOUD_DOWN("\uf03d"),
|
||||
CLOUD_UP("\uf040"),
|
||||
CLOUD_REFRESH("\uf03e"),
|
||||
HORIZON("\uf047"),
|
||||
HORIZON_ALT("\uf046"),
|
||||
SUNRISE("\uf051"),
|
||||
SUNSET("\uf052"),
|
||||
MOONRISE("\uf0c9"),
|
||||
MOONSET("\uf0ca"),
|
||||
REFRESH("\uf04c"),
|
||||
REFRESH_ALT("\uf04b"),
|
||||
UMBRELLA("\uf084"),
|
||||
BAROMETER("\uf079"),
|
||||
HUMIDITY("\uf07a"),
|
||||
NA("\uf07b"),
|
||||
TRAIN("\uf0cb");
|
||||
|
||||
/**
|
||||
* The value associated with the icon.
|
||||
*/
|
||||
private final String value;
|
||||
|
||||
/**
|
||||
* Creates a weather icon with the value.
|
||||
*
|
||||
* @param value The value.
|
||||
*/
|
||||
private WeatherIcon(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the string value of the icon.
|
||||
*
|
||||
* @return The string value of the icon.
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
package com.mowesta.android.app.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Typeface;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
|
||||
import com.mowesta.android.app.R;
|
||||
|
||||
/**
|
||||
* A view that displays an icon from the weather icon set. Note
|
||||
* that this view will not show the correct preview in the
|
||||
* development tools, since there seems to be a bug in the current
|
||||
* version of the layout editor in Android Studio that prevents
|
||||
* the loading of custom fonts.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class WeatherView extends AppCompatTextView {
|
||||
|
||||
/**
|
||||
* The icon type to display.
|
||||
*/
|
||||
WeatherIcon type;
|
||||
|
||||
/**
|
||||
* Creates a weather view.
|
||||
*
|
||||
* @param context The context.
|
||||
*/
|
||||
public WeatherView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the weather view.
|
||||
*
|
||||
* @param context The context.
|
||||
* @param attrs The attributes.
|
||||
*/
|
||||
public WeatherView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init(attrs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the weather view.
|
||||
*
|
||||
* @param context The context.
|
||||
* @param attrs The attributes.
|
||||
* @param defStyleAttr The theme.
|
||||
*/
|
||||
public WeatherView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init(attrs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the view from the attributes.
|
||||
*
|
||||
* @param attrs The attributes.
|
||||
*/
|
||||
public void init(AttributeSet attrs) {
|
||||
if (! isInEditMode()) {
|
||||
setTypeface(ResourcesCompat.getFont(getContext(), R.font.weather), Typeface.NORMAL);
|
||||
if (attrs == null) return;
|
||||
TypedArray ta = getContext().obtainStyledAttributes(attrs, R.styleable.WeatherView);
|
||||
int type = ta.getInt(R.styleable.WeatherView_weather,-1);
|
||||
if (type >= 0 && type < WeatherIcon.values().length) {
|
||||
WeatherIcon icon = WeatherIcon.values()[type];
|
||||
setText(icon.getValue());
|
||||
} else {
|
||||
setText("");
|
||||
}
|
||||
ta.recycle();
|
||||
} else {
|
||||
setText("O");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the icon type.
|
||||
*
|
||||
* @param type The icon type.
|
||||
*/
|
||||
public void setType(WeatherIcon type) {
|
||||
this.type = type;
|
||||
if (!isInEditMode()) {
|
||||
setText(type == null ? "" : type.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the icon type.
|
||||
*
|
||||
* @return The icon type.
|
||||
*/
|
||||
public WeatherIcon getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
package com.mowesta.android.app.widget;
|
||||
|
||||
import android.appwidget.AppWidgetManager;
|
||||
import android.appwidget.AppWidgetProvider;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mowesta.android.app.IApp;
|
||||
import com.mowesta.android.app.database.Widget;
|
||||
import com.mowesta.android.app.database.WidgetAccessor;
|
||||
import com.mowesta.android.app.database.WidgetDatabase;
|
||||
import com.mowesta.android.app.task.DatabaseTask;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* An abstract base class to handle widget updates.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public abstract class AbstractWidgetProvider extends AppWidgetProvider {
|
||||
|
||||
/**
|
||||
* The log tag.
|
||||
*/
|
||||
private static final String TAG = "AbstractWidgetProvider";
|
||||
|
||||
/**
|
||||
* The widget type.
|
||||
*/
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* Creates a provider for the type.
|
||||
*
|
||||
* @param type The widget type handled by this provider.
|
||||
*/
|
||||
public AbstractWidgetProvider(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnabled(Context context) {
|
||||
super.onEnabled(context);
|
||||
Log.d(TAG, "Enabling widget provider.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisabled(Context context) {
|
||||
super.onDisabled(context);
|
||||
Log.d(TAG, "Disabling widget provider.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
|
||||
super.onUpdate(context, appWidgetManager, appWidgetIds);
|
||||
Log.d(TAG, "Updating widget data for " + Arrays.toString(appWidgetIds));
|
||||
for (int i = 0; i < appWidgetIds.length; i++) {
|
||||
triggerUpdate(context, appWidgetIds[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAppWidgetOptionsChanged(Context context, AppWidgetManager appWidgetManager, int appWidgetId, Bundle newOptions) {
|
||||
super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions);
|
||||
Log.d(TAG, "Updating widget data for " + appWidgetId + " due to change.");
|
||||
triggerUpdate(context, appWidgetId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeleted(Context context, int[] appWidgetIds) {
|
||||
Log.d(TAG, "Deleting widget data for " + Arrays.toString(appWidgetIds));
|
||||
super.onDeleted(context, appWidgetIds);
|
||||
DatabaseTask<WidgetDatabase, int[], Void> task = new DatabaseTask<WidgetDatabase, int[], Void>((input, db)-> {
|
||||
WidgetAccessor a = db.getAccessor();
|
||||
for (int reference: input) {
|
||||
a.delete(type, reference);
|
||||
}
|
||||
return null;
|
||||
}, (input, result)-> {
|
||||
Log.d(TAG, "Widget data deleted for " + Arrays.toString(appWidgetIds));
|
||||
});
|
||||
task.execute(appWidgetIds, getWidgetDatabase(context));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRestored(Context context, int[] oldWidgetIds, int[] newWidgetIds) {
|
||||
Log.d(TAG, "Restoring widget backup from " + Arrays.toString(oldWidgetIds) + " to " + Arrays.toString(newWidgetIds) + ".");
|
||||
super.onRestored(context, oldWidgetIds, newWidgetIds);
|
||||
DatabaseTask<WidgetDatabase, Void, Void> task = new DatabaseTask<WidgetDatabase, Void, Void>((input, db)-> {
|
||||
db.runInTransaction(()-> {
|
||||
WidgetAccessor a = db.getAccessor();
|
||||
List<Widget> widgets = new ArrayList<>();
|
||||
for (int i = 0; i < oldWidgetIds.length; i++) {
|
||||
List<Widget> targets = a.get(type, oldWidgetIds[i]);
|
||||
for (Widget t: targets) {
|
||||
t.setReference(newWidgetIds[i]);
|
||||
widgets.add(t);
|
||||
}
|
||||
}
|
||||
for (Widget w: widgets) {
|
||||
a.update(w);
|
||||
}
|
||||
});
|
||||
return null;
|
||||
}, (input, result)-> {
|
||||
Log.d(TAG, "Widget data restored from " + Arrays.toString(oldWidgetIds) + " to " + Arrays.toString(newWidgetIds) + ".");
|
||||
});
|
||||
task.execute(null, getWidgetDatabase(context));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a reference to the widget database.
|
||||
*
|
||||
* @param c The context.
|
||||
* @return The widget database.
|
||||
*/
|
||||
protected WidgetDatabase getWidgetDatabase(Context c) {
|
||||
IApp app = (IApp)c.getApplicationContext();
|
||||
return app.getWidgetRepository().getDatabase();
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers the widget service to perform an update.
|
||||
*
|
||||
* @param context The context.
|
||||
* @param id The id.
|
||||
*/
|
||||
public void triggerUpdate(Context context, int id) {
|
||||
WidgetService.scheduleUpdate(context, type, id);
|
||||
DatabaseTask<WidgetDatabase, Integer, Widget> task = new DatabaseTask<WidgetDatabase, Integer, Widget>((input, database)-> {
|
||||
List<Widget> widgets = database.getAccessor().get(type, input);
|
||||
if (widgets.isEmpty()) return null;
|
||||
else return widgets.get(0);
|
||||
}, (input, widget)-> {
|
||||
if (widget != null) {
|
||||
updateWidget(context, widget);
|
||||
}
|
||||
});
|
||||
task.execute(id, getWidgetDatabase(context));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the widget dimensions for the app widget. If the options
|
||||
* cannot be retrieved, the width and height will be 0.
|
||||
*
|
||||
* @param context The context.
|
||||
* @param id The widget id.
|
||||
* @return An int array containing the width and height.
|
||||
*/
|
||||
protected int[] getWidgetDimensions(Context context, int id) {
|
||||
AppWidgetManager manager = AppWidgetManager.getInstance(context);
|
||||
Bundle options = manager.getAppWidgetOptions(id);
|
||||
if (options == null) return new int[] { 0, 0 };
|
||||
int minWidth = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH, 0);
|
||||
int maxWidth = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH, 0);
|
||||
int minHeight = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT, 0);
|
||||
int maxHeight = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT, 0);
|
||||
if (context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
return new int[] { minWidth, maxHeight };
|
||||
} else {
|
||||
return new int[] { maxWidth, minHeight };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Performs an update of the widget using the specified widget
|
||||
* state.
|
||||
*
|
||||
* @param context The context.
|
||||
* @param widget The widget state.
|
||||
*/
|
||||
public abstract void updateWidget(Context context, Widget widget);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.mowesta.android.app.widget;
|
||||
|
||||
import android.appwidget.AppWidgetManager;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.fragment.ForecastWidgetFragment;
|
||||
|
||||
/**
|
||||
* The activity to configure the forecast widget.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class ForecastWidgetActivity extends AppCompatActivity {
|
||||
|
||||
/**
|
||||
* Creates the activity and sets the content view.
|
||||
*/
|
||||
public ForecastWidgetActivity() {
|
||||
super(R.layout.activity_widget);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Intent intent = getIntent();
|
||||
int widgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
|
||||
if (savedInstanceState == null) {
|
||||
ForecastWidgetFragment fragment = ForecastWidgetFragment.newInstance(widgetId);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.setReorderingAllowed(true)
|
||||
.add(R.id.fragment_container, fragment, null)
|
||||
.commit();
|
||||
}
|
||||
Intent resultValue = new Intent();
|
||||
resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, widgetId);
|
||||
setResult(RESULT_CANCELED, resultValue);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
package com.mowesta.android.app.widget;
|
||||
|
||||
import android.app.Application;
|
||||
import android.appwidget.AppWidgetManager;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.RemoteViews;
|
||||
|
||||
import androidx.navigation.NavDeepLinkBuilder;
|
||||
|
||||
import com.mowesta.android.app.MowestaActivity;
|
||||
import com.mowesta.android.app.MowestaSettings;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.database.Widget;
|
||||
import com.mowesta.android.app.binding.BindingTransforms;
|
||||
import com.mowesta.android.app.model.ConditionViewModel;
|
||||
import com.mowesta.android.app.model.SummaryViewModel;
|
||||
import com.mowesta.android.app.util.UnitUtils;
|
||||
import com.mowesta.android.app.util.WeatherAggregate;
|
||||
import com.mowesta.android.feign.model.City;
|
||||
import com.mowesta.android.feign.model.WeatherCondition;
|
||||
import com.mowesta.android.feign.model.WeatherForecast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The provider class for the forecast widget.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class ForecastWidgetProvider extends AbstractWidgetProvider {
|
||||
|
||||
/**
|
||||
* The log tag.
|
||||
*/
|
||||
private static final String TAG = "ForecastWidgetProvider";
|
||||
|
||||
/**
|
||||
* The horizontal break point for the view.
|
||||
*/
|
||||
private static final int BREAK_HORIZONTAL_1 = 160;
|
||||
|
||||
/**
|
||||
* The horizontal break point for the view.
|
||||
*/
|
||||
private static final int BREAK_HORIZONTAL_2 = 260;
|
||||
|
||||
/**
|
||||
* The vertical break point for the view.
|
||||
*/
|
||||
private static final int BREAK_VERTICAL = 80;
|
||||
|
||||
/**
|
||||
* The space to allocate for a single day view.
|
||||
*/
|
||||
private static final int WIDTH_DAY = 80;
|
||||
|
||||
/**
|
||||
* The width for borders around the day views.
|
||||
*/
|
||||
private static final int WIDTH_BORDER = 16;
|
||||
|
||||
/**
|
||||
* Creates a new forecast widget provider.
|
||||
*/
|
||||
public ForecastWidgetProvider() {
|
||||
super(Widget.TYPE_FORECAST);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateWidget(Context context, Widget widget) {
|
||||
City city = widget.getData(City.class);
|
||||
if (city == null) {
|
||||
Log.d(TAG, "Ignoring update without for widget " + widget.getReference() + " without city.");
|
||||
return;
|
||||
}
|
||||
MowestaSettings.TemperatureUnit unit = widget.isCelsius()?MowestaSettings.TemperatureUnit.CELSIUS: MowestaSettings.TemperatureUnit.FAHRENHEIT;
|
||||
long now = System.currentTimeMillis();
|
||||
WeatherForecast forecast = widget.getContent(WeatherForecast.class);
|
||||
List<SummaryViewModel> days = new ArrayList<>();
|
||||
WeatherCondition condition = null;
|
||||
if (forecast != null) {
|
||||
WeatherAggregate a = WeatherAggregate.getAggregate(context, city.getTimezone(), forecast.getConditions());
|
||||
for (ConditionViewModel m: a.getHours()) {
|
||||
if (m.getCondition().getValue().getTime() > now) break;
|
||||
condition = m.getCondition().getValue();
|
||||
}
|
||||
days = a.getDays();
|
||||
}
|
||||
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
|
||||
RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_forecast);
|
||||
// set city name
|
||||
views.setTextViewText(R.id.widget_location_name, BindingTransforms.getName(context, city.getNames(), false));
|
||||
// set icon
|
||||
if (condition != null) {
|
||||
WeatherCondition.TypeEnum weatherType = condition.getType();
|
||||
Integer icon = BindingTransforms.getIcon(weatherType, false);
|
||||
if (icon != null) {
|
||||
views.setImageViewResource(R.id.widget_condition_icon, icon);
|
||||
views.setInt(R.id.widget_condition_icon, "setColorFilter", Color.argb(255, 255, 255, 255));
|
||||
views.setImageViewResource(R.id.widget_condition_background, icon);
|
||||
views.setInt(R.id.widget_condition_background, "setColorFilter", Color.argb(255, 0, 0, 0));
|
||||
}
|
||||
String text = context.getString(BindingTransforms.getText(weatherType));
|
||||
views.setTextViewText(R.id.widget_condition_text, text);
|
||||
views.setContentDescription(R.id.widget_condition_icon, text);
|
||||
if (condition.getTemperature() != null) {
|
||||
views.setTextViewText(R.id.widget_condition_temperature, UnitUtils.toSpanned(UnitUtils.getTemperature(context, condition.getTemperature(), unit)));
|
||||
}
|
||||
}
|
||||
float scale = context.getResources().getDisplayMetrics().scaledDensity / context.getResources().getDisplayMetrics().density;
|
||||
int[] widgetDimension = getWidgetDimensions(context, widget.getReference());
|
||||
int width = widgetDimension[0];
|
||||
int height = widgetDimension[1];
|
||||
views.setViewVisibility(R.id.widget_condition_icons, width < (BREAK_HORIZONTAL_1 * scale) ? View.GONE : View.VISIBLE);
|
||||
views.setViewVisibility(R.id.widget_container_text, width < (BREAK_HORIZONTAL_2 * scale) ? View.GONE : View.VISIBLE);
|
||||
views.removeAllViews(R.id.widget_container_days);
|
||||
int count = Math.min(days.size(), (int)((width - WIDTH_BORDER) / (WIDTH_DAY * scale)));
|
||||
if (height > (BREAK_VERTICAL * scale) && count > 1) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
RemoteViews day = createDayView(context, days.get(i), unit);
|
||||
views.addView(R.id.widget_container_days, day);
|
||||
}
|
||||
}
|
||||
MowestaSettings settings = new MowestaSettings((Application) context.getApplicationContext());
|
||||
NavDeepLinkBuilder builder = new NavDeepLinkBuilder(context)
|
||||
.setComponentName(new ComponentName(context, MowestaActivity.class))
|
||||
.setGraph(R.navigation.navigation_app);
|
||||
if (settings.isTermsAccepted()) {
|
||||
Bundle args = new Bundle();
|
||||
args.putLong("id", widget.getDataId());
|
||||
builder = builder.setDestination(R.id.destination_city).setArguments(args);
|
||||
} else {
|
||||
builder = builder.setDestination(R.id.destination_splash);
|
||||
}
|
||||
views.setOnClickPendingIntent(R.id.widget_forecast, builder.createPendingIntent());
|
||||
appWidgetManager.updateAppWidget(widget.getReference(), views);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a remote view to display a summary.
|
||||
*
|
||||
* @param context The context.
|
||||
* @param model The model.
|
||||
* @param unit The temperature unit.
|
||||
* @return The view.
|
||||
*/
|
||||
private RemoteViews createDayView(Context context, SummaryViewModel model, MowestaSettings.TemperatureUnit unit) {
|
||||
RemoteViews day = new RemoteViews(context.getPackageName(), R.layout.widget_forecast_day);
|
||||
day.setTextViewText(R.id.widget_day_text, model.getTitle().getValue());
|
||||
WeatherCondition.TypeEnum weatherType = model.getMax().getValue().getType();
|
||||
Integer icon = BindingTransforms.getIcon(weatherType, false);
|
||||
if (icon != null) {
|
||||
day.setImageViewResource(R.id.widget_day_icon, icon);
|
||||
day.setInt(R.id.widget_day_icon, "setColorFilter", Color.argb(255, 255, 255, 255));
|
||||
day.setImageViewResource(R.id.widget_day_background, icon);
|
||||
day.setInt(R.id.widget_day_background, "setColorFilter", Color.argb(255, 0, 0, 0));
|
||||
}
|
||||
String text = context.getString(BindingTransforms.getText(weatherType));
|
||||
day.setContentDescription(R.id.widget_day_icon, text);
|
||||
if (model.getMax().getValue().getTemperature() != null) {
|
||||
day.setTextViewText(R.id.widget_day_temperature, UnitUtils.toSpanned(UnitUtils.getTemperature(context, model.getMax().getValue().getTemperature(), unit)));
|
||||
}
|
||||
return day;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.mowesta.android.app.widget;
|
||||
|
||||
import android.appwidget.AppWidgetManager;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.fragment.ForecastWidgetFragment;
|
||||
import com.mowesta.android.app.fragment.MeasureWidgetFragment;
|
||||
|
||||
/**
|
||||
* The activity to configure the measurement widget.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class MeasureWidgetActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
/**
|
||||
* Creates the activity and sets the content view.
|
||||
*/
|
||||
public MeasureWidgetActivity() {
|
||||
super(R.layout.activity_widget);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Intent intent = getIntent();
|
||||
int widgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
|
||||
if (savedInstanceState == null) {
|
||||
MeasureWidgetFragment fragment = MeasureWidgetFragment.newInstance(widgetId);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.setReorderingAllowed(true)
|
||||
.add(R.id.fragment_container, fragment, null)
|
||||
.commit();
|
||||
}
|
||||
Intent resultValue = new Intent();
|
||||
resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, widgetId);
|
||||
setResult(RESULT_CANCELED, resultValue);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
package com.mowesta.android.app.widget;
|
||||
|
||||
import android.app.Application;
|
||||
import android.appwidget.AppWidgetManager;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.text.Spanned;
|
||||
import android.util.Log;
|
||||
import android.widget.RemoteViews;
|
||||
|
||||
import androidx.navigation.NavDeepLinkBuilder;
|
||||
|
||||
import com.mowesta.android.app.IApp;
|
||||
import com.mowesta.android.app.MowestaActivity;
|
||||
import com.mowesta.android.app.MowestaSettings;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.binding.MeasurementType;
|
||||
import com.mowesta.android.app.database.Widget;
|
||||
import com.mowesta.android.app.binding.BindingTransforms;
|
||||
import com.mowesta.android.app.util.UnitUtils;
|
||||
import com.mowesta.android.feign.model.Device;
|
||||
import com.mowesta.android.feign.model.Measurement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The provider for measurement widgets that display the
|
||||
* last measurement of a particular device.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class MeasureWidgetProvider extends AbstractWidgetProvider {
|
||||
|
||||
/**
|
||||
* The height of the layout with the device name.
|
||||
*/
|
||||
private static final int HEIGHT_DEVICE = 40;
|
||||
|
||||
/**
|
||||
* The height of a row with measurements.
|
||||
*/
|
||||
private static final int HEIGHT_ITEM = 20;
|
||||
|
||||
/**
|
||||
* The log tag.
|
||||
*/
|
||||
private static final String TAG = "MeasureWidgetProvider";
|
||||
|
||||
/**
|
||||
* Creates a new measurement widget provider.
|
||||
*/
|
||||
public MeasureWidgetProvider() {
|
||||
super(Widget.TYPE_MEASURE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateWidget(Context context, Widget widget) {
|
||||
Device device = widget.getData(Device.class);
|
||||
if (device == null) {
|
||||
Log.d(TAG, "Ignoring update without for widget " + widget.getReference() + " without device.");
|
||||
return;
|
||||
}
|
||||
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
|
||||
MowestaSettings.TemperatureUnit unit = widget.isCelsius()?MowestaSettings.TemperatureUnit.CELSIUS:MowestaSettings.TemperatureUnit.FAHRENHEIT;
|
||||
MowestaSettings.UnitSystem system = widget.isSi()?MowestaSettings.UnitSystem.STANDARD:MowestaSettings.UnitSystem.IMPERIAL;
|
||||
float scale = context.getResources().getDisplayMetrics().scaledDensity / context.getResources().getDisplayMetrics().density;
|
||||
int[] widgetDimension = getWidgetDimensions(context, widget.getReference());
|
||||
int width = widgetDimension[0];
|
||||
int height = widgetDimension[1];
|
||||
|
||||
RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_measure);
|
||||
// set device
|
||||
views.setTextViewText(R.id.widget_device_name, device.getDevice());
|
||||
views.setTextViewText(R.id.widget_device_model, device.getModel());
|
||||
// set icon
|
||||
int icon = BindingTransforms.getOsIcon(device.getOs());
|
||||
int label = BindingTransforms.getOsLabel(device.getOs());
|
||||
if (icon != 0 && label != 0) {
|
||||
views.setImageViewResource(R.id.widget_device_icon, icon);
|
||||
views.setInt(R.id.widget_device_icon, "setColorFilter", Color.argb(255, 255, 255, 255));
|
||||
views.setImageViewResource(R.id.widget_device_background, icon);
|
||||
views.setInt(R.id.widget_device_background, "setColorFilter", Color.argb(255, 0, 0, 0));
|
||||
views.setContentDescription(R.id.widget_device_icon, context.getResources().getString(label));
|
||||
}
|
||||
views.removeAllViews(R.id.widget_container_item);
|
||||
Measurement measurement = widget.getContent(Measurement.class);
|
||||
if (measurement != null) {
|
||||
List<RemoteViews> items = new ArrayList<>();
|
||||
Date dateTime = new Date(measurement.getTime());
|
||||
String date = android.text.format.DateFormat.getDateFormat(context).format(dateTime);
|
||||
createItemView(items, context, R.drawable.ic_calendar_today_normal_24, R.string.widget_measure_date, UnitUtils.toSpanned(date));
|
||||
String time = android.text.format.DateFormat.getTimeFormat(context).format(dateTime);
|
||||
createItemView(items, context, R.drawable.ic_alarm_normal_24, R.string.widget_measure_time , UnitUtils.toSpanned(time));
|
||||
if (measurement.getTemperature() != null) {
|
||||
createItemView(items, context, R.drawable.ic_thermometer_normal_24, R.string.label_temperature, UnitUtils.toSpanned(UnitUtils.getTemperature(context, measurement.getTemperature(), unit)));
|
||||
}
|
||||
if (measurement.getPressure() != null) {
|
||||
createItemView(items, context, R.drawable.ic_barometer_normal_24, R.string.label_pressure, UnitUtils.toSpanned(UnitUtils.getPressure(context, measurement.getPressure(), system)));
|
||||
}
|
||||
if (measurement.getHumidity() != null) {
|
||||
createItemView(items, context, R.drawable.ic_humidity_normal_24, R.string.label_humidity, UnitUtils.toSpanned(context.getResources().getString(R.string.format_humidity, measurement.getHumidity())));
|
||||
}
|
||||
if (device.getOs() != Device.OsEnum.IOS && device.getOs() != Device.OsEnum.ANDROID) {
|
||||
if (measurement.getData().containsKey(MeasurementType.BATTERY_VOLTAGE.name())) {
|
||||
Object[] values = MeasurementType.BATTERY_VOLTAGE.getValues(measurement.getData().get(MeasurementType.BATTERY_VOLTAGE.name()));
|
||||
if (values.length > 0 && values[0] instanceof Double) {
|
||||
createItemView(items, context, R.drawable.ic_outline_battery_unknown_normal_24, R.string.measurement_type_battery_voltage, UnitUtils.toSpanned(context.getResources().getString(R.string.format_voltage, (Double)values[0])));
|
||||
}
|
||||
}
|
||||
}
|
||||
int max = Math.min(items.size(), (int)((height - (HEIGHT_DEVICE * scale)) / (HEIGHT_ITEM * scale)));
|
||||
for (int i = 0; i < max; i++) {
|
||||
views.addView(R.id.widget_container_item, items.get(i));
|
||||
}
|
||||
}
|
||||
NavDeepLinkBuilder builder = new NavDeepLinkBuilder(context)
|
||||
.setComponentName(new ComponentName(context, MowestaActivity.class))
|
||||
.setGraph(R.navigation.navigation_app);
|
||||
IApp app = (IApp)context.getApplicationContext();
|
||||
if (app.getUserRepository().getCredentials().getValue() != null) {
|
||||
Bundle args = new Bundle();
|
||||
args.putLong("id", widget.getDataId());
|
||||
builder = builder.setDestination(R.id.destination_device).setArguments(args);
|
||||
} else {
|
||||
builder = builder.setDestination(R.id.destination_splash);
|
||||
}
|
||||
views.setOnClickPendingIntent(R.id.widget_measure, builder.createPendingIntent());
|
||||
appWidgetManager.updateAppWidget(widget.getReference(), views);
|
||||
}
|
||||
|
||||
public void createItemView(List<RemoteViews> result, Context context, int icon, int description, Spanned value) {
|
||||
if (value != null) {
|
||||
RemoteViews item = new RemoteViews(context.getPackageName(), R.layout.widget_measure_item);
|
||||
item.setImageViewResource(R.id.widget_item_icon, icon);
|
||||
item.setInt(R.id.widget_item_icon, "setColorFilter", Color.argb(255, 255, 255, 255));
|
||||
item.setImageViewResource(R.id.widget_item_background, icon);
|
||||
item.setInt(R.id.widget_item_background, "setColorFilter", Color.argb(255, 0, 0, 0));
|
||||
item.setContentDescription(R.id.widget_item_icon, context.getResources().getString(description));
|
||||
item.setTextViewText(R.id.widget_item_text, value);
|
||||
result.add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.mowesta.android.app.widget;
|
||||
|
||||
import android.app.AlarmManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.appwidget.AppWidgetManager;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mowesta.android.app.database.Widget;
|
||||
|
||||
/**
|
||||
* The receiver that will
|
||||
*/
|
||||
public class WidgetReceiver extends BroadcastReceiver {
|
||||
|
||||
/**
|
||||
* The log tag.
|
||||
*/
|
||||
private static final String TAG = "WidgetReceiver";
|
||||
/**
|
||||
* The request code.
|
||||
*/
|
||||
private static final int REQuEST_CODE = 2298;
|
||||
|
||||
/**
|
||||
* The initial scheduling delay.
|
||||
*/
|
||||
private static final int DELAY_START = 60000;
|
||||
|
||||
/**
|
||||
* The periodic update rate.
|
||||
*/
|
||||
private static final int DELAY_PERIOD = 15 * 60000;
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
updateWidgets(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates all widgets.
|
||||
*
|
||||
* @param context The context.
|
||||
*/
|
||||
public static void updateWidgets(Context context) {
|
||||
Log.d(TAG, "Received widget update request.");
|
||||
boolean hasWidgets = updateWidgets(context, ForecastWidgetProvider.class, Widget.TYPE_FORECAST);
|
||||
hasWidgets |= updateWidgets(context, MeasureWidgetProvider.class, Widget.TYPE_MEASURE);
|
||||
if (!hasWidgets) cancelUpdates(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates all widgets of a particular provider and returns whether anything
|
||||
* has been scheduled.
|
||||
*
|
||||
* @param context The context.
|
||||
* @param provider The widget provider class.
|
||||
* @param type The widget type.
|
||||
* @return True if any update has been scheduled.
|
||||
*/
|
||||
private static boolean updateWidgets(Context context, Class<?> provider, int type) {
|
||||
AppWidgetManager manager = AppWidgetManager.getInstance(context);
|
||||
int[] ids = manager.getAppWidgetIds(new ComponentName(context, provider));
|
||||
for (int id: ids) {
|
||||
WidgetService.scheduleUpdate(context, type, id);
|
||||
}
|
||||
return ids.length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedules periodic widget updates.
|
||||
*
|
||||
* @param context The context.
|
||||
*/
|
||||
public static void scheduleUpdates(Context context) {
|
||||
Log.d(TAG, "Scheduling periodic widget updates.");
|
||||
AlarmManager alarm = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
|
||||
alarm.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime() + DELAY_START, DELAY_PERIOD, createIntent(context));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a pending intent for the updates.
|
||||
*
|
||||
* @param context The context.
|
||||
* @return The pending intent.
|
||||
*/
|
||||
private static PendingIntent createIntent(Context context) {
|
||||
Intent intent = new Intent(context, WidgetReceiver.class);
|
||||
return PendingIntent.getBroadcast(context, 2298, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels the period widget updates.
|
||||
*
|
||||
* @param context The context.
|
||||
*/
|
||||
public static void cancelUpdates(Context context) {
|
||||
Log.d(TAG, "Canceling periodic widget updates.");
|
||||
AlarmManager alarm = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
|
||||
alarm.cancel(createIntent(context));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
package com.mowesta.android.app.widget;
|
||||
|
||||
import android.appwidget.AppWidgetManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.app.JobIntentService;
|
||||
|
||||
import com.mowesta.android.app.IApp;
|
||||
import com.mowesta.android.app.database.Widget;
|
||||
import com.mowesta.android.app.database.WidgetAccessor;
|
||||
import com.mowesta.android.app.database.WidgetDatabase;
|
||||
import com.mowesta.android.feign.api.DefaultApi;
|
||||
import com.mowesta.android.feign.model.City;
|
||||
import com.mowesta.android.feign.model.Device;
|
||||
import com.mowesta.android.feign.model.Measurement;
|
||||
import com.mowesta.android.feign.model.MeasurementPage;
|
||||
import com.mowesta.android.feign.model.WeatherForecast;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The service that updates the forecast widgets.
|
||||
*
|
||||
* @author Marcus
|
||||
*/
|
||||
public class WidgetService extends JobIntentService {
|
||||
|
||||
/**
|
||||
* The extra containing the reference.
|
||||
*/
|
||||
public static final String EXTRA_WIDGET_REFERENCE = "reference";
|
||||
|
||||
/**
|
||||
* The delay to update the data.
|
||||
*/
|
||||
private static final int DELAY_DATA = 24 * 60 * 60 * 1000;
|
||||
|
||||
/**
|
||||
* The delay to update the content.
|
||||
*/
|
||||
private static final int DELAY_CONTENT = 1 * 60 * 60 * 1000;
|
||||
|
||||
/**
|
||||
* The extra containing the widget type.
|
||||
*/
|
||||
public static final String EXTRA_WIDGET_TYPE = "type";
|
||||
|
||||
/**
|
||||
* The id for the service.
|
||||
*/
|
||||
private static final int SERVICE_ID = 1111;
|
||||
|
||||
/**
|
||||
* The log tag.
|
||||
*/
|
||||
private static final String TAG = "WidgetService";
|
||||
|
||||
/**
|
||||
* A handler to perform work on the ui thread.
|
||||
*/
|
||||
private Handler handler = new Handler();
|
||||
|
||||
/**
|
||||
* Schedules an update for a particular widget referenced by its type and its
|
||||
* local id.
|
||||
*
|
||||
* @param context Tthe context.
|
||||
* @param reference The widget reference.
|
||||
* @param type The widget type.
|
||||
*/
|
||||
public static void scheduleUpdate(Context context, int type, int reference) {
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(context, JobIntentService.class);
|
||||
intent.putExtra(EXTRA_WIDGET_TYPE, type);
|
||||
intent.putExtra(EXTRA_WIDGET_REFERENCE, reference);
|
||||
enqueueWork(context, WidgetService.class, SERVICE_ID, intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onHandleWork(@NonNull Intent intent) {
|
||||
int type = intent.getIntExtra(EXTRA_WIDGET_TYPE, Widget.TYPE_INVALID);
|
||||
int reference = intent.getIntExtra(EXTRA_WIDGET_REFERENCE, AppWidgetManager.INVALID_APPWIDGET_ID);
|
||||
if (type == Widget.TYPE_INVALID || reference == AppWidgetManager.INVALID_APPWIDGET_ID) {
|
||||
Log.d(TAG, "Received an invalid request for type " + type + " and reference " + reference + ".");
|
||||
return;
|
||||
}
|
||||
IApp app = (IApp)getApplicationContext();
|
||||
WidgetDatabase database = app.getWidgetRepository().getDatabase();
|
||||
WidgetAccessor accessor = database.getAccessor();
|
||||
List<Widget> widgets = accessor.get(type, reference);
|
||||
if (widgets.isEmpty()) {
|
||||
Log.d(TAG, "Received a request for removed widget with type " + type + " and reference " + reference + ".");
|
||||
return;
|
||||
}
|
||||
Widget widget = widgets.get(0);
|
||||
if (type == Widget.TYPE_FORECAST) {
|
||||
try {
|
||||
DefaultApi api = app.getClientFactory().createClient();
|
||||
long time = System.currentTimeMillis();
|
||||
City[] city = new City[] { widget.getData(City.class) };
|
||||
long[] dataTime = new long[] { widget.getDataTime() };
|
||||
if (city[0] == null || dataTime[0] - time > DELAY_DATA) {
|
||||
city[0] = api.getCity(widget.getDataId());
|
||||
dataTime[0] = time;
|
||||
}
|
||||
WeatherForecast[] content = new WeatherForecast[] { widget.getContent(WeatherForecast.class) };
|
||||
long[] contentTime = new long[] { widget.getContentTime() };
|
||||
if (content[0] == null || contentTime[0] - time > DELAY_CONTENT) {
|
||||
content[0] = api.getCityForecast(widget.getDataId());
|
||||
contentTime[0] = time;
|
||||
}
|
||||
database.runInTransaction(() -> {
|
||||
Widget w = accessor.get(widget.getId());
|
||||
if (w == null) return;
|
||||
w.setDataTime(dataTime[0]);
|
||||
w.setData(city[0]);
|
||||
w.setContentTime(contentTime[0]);
|
||||
w.setContent(content[0]);
|
||||
accessor.update(w);
|
||||
});
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to update widget state with type " + type + " and reference " + reference + ".", e);
|
||||
}
|
||||
Widget w = accessor.get(widget.getId());
|
||||
if (w != null) {
|
||||
handler.post(()-> {
|
||||
ForecastWidgetProvider provider = new ForecastWidgetProvider();
|
||||
provider.updateWidget(getApplicationContext(), w);
|
||||
});
|
||||
}
|
||||
} else if (type == Widget.TYPE_MEASURE) {
|
||||
try {
|
||||
DefaultApi api = app.getClientFactory().createClient(app.getUserRepository().getCredentials().getValue());
|
||||
long time = System.currentTimeMillis();
|
||||
Device[] device = new Device[] { widget.getData(Device.class) };
|
||||
long[] dataTime = new long[] { widget.getDataTime() };
|
||||
if (device[0] == null || dataTime[0] - time > DELAY_DATA) {
|
||||
device[0] = api.getDevice(widget.getDataId());
|
||||
dataTime[0] = time;
|
||||
}
|
||||
Measurement[] content = new Measurement[] { widget.getContent(Measurement.class) };
|
||||
long[] contentTime = new long[] { widget.getContentTime() };
|
||||
if (content[0] == null || contentTime[0] - time > DELAY_CONTENT) {
|
||||
MeasurementPage page = api.getDeviceMeasurements(widget.getDataId(), 0l, time, 0, 1);
|
||||
if (page.getElements().size() > 0) {
|
||||
content[0] = page.getElements().get(0);
|
||||
contentTime[0] = time;
|
||||
}
|
||||
}
|
||||
database.runInTransaction(() -> {
|
||||
Widget w = accessor.get(widget.getId());
|
||||
if (w == null) return;
|
||||
w.setDataTime(dataTime[0]);
|
||||
w.setData(device[0]);
|
||||
w.setContentTime(contentTime[0]);
|
||||
w.setContent(content[0]);
|
||||
accessor.update(w);
|
||||
});
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to update widget state with type " + type + " and reference " + reference + ".", e);
|
||||
}
|
||||
Widget w = accessor.get(widget.getId());
|
||||
if (w != null) {
|
||||
handler.post(()-> {
|
||||
MeasureWidgetProvider provider = new MeasureWidgetProvider();
|
||||
provider.updateWidget(getApplicationContext(), w);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 49 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15.67,4H14V2h-4v2H8.33C7.6,4 7,4.6 7,5.33v15.33C7,21.4 7.6,22 8.33,22h7.33c0.74,0 1.34,-0.6 1.34,-1.33V5.33C17,4.6 16.4,4 15.67,4zM11,20v-5.5H9L13,7v5.5h2L11,20z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15.67,4H14V2h-4v2H8.33C7.6,4 7,4.6 7,5.33v15.33C7,21.4 7.6,22 8.33,22h7.33c0.74,0 1.34,-0.6 1.34,-1.33V5.33C17,4.6 16.4,4 15.67,4z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,3h-1L19,1h-2v2L7,3L7,1L5,1v2L4,3c-1.1,0 -2,0.9 -2,2v16c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,5c0,-1.1 -0.9,-2 -2,-2zM20,21L4,21L4,8h16v13z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M3.89 17.6c0-0.99 0.31-1.88 0.93-2.65s1.41-1.27 2.38-1.49c0.26-1.17 0.85-2.14 1.78-2.88c0.93-0.75 2-1.12 3.22-1.12c1.18 0 2.24 0.36 3.16 1.09c0.93 0.73 1.53 1.66 1.8 2.8h0.27c1.18 0 2.18 0.41 3.01 1.24s1.25 1.83 1.25 3c0 1.18-0.42 2.18-1.25 3.01s-1.83 1.25-3.01 1.25H8.16c-0.58 0-1.13-0.11-1.65-0.34S5.52 21 5.14 20.62c-0.38-0.38-0.68-0.84-0.91-1.36s-0.34-1.09-0.34-1.66zm1.45 0c0 0.76 0.28 1.42 0.82 1.96s1.21 0.82 1.99 0.82h9.28c0.77 0 1.44-0.27 1.99-0.82c0.55-0.55 0.83-1.2 0.83-1.96s-0.27-1.42-0.83-1.96c-0.55-0.54-1.21-0.82-1.99-0.82h-1.39c-0.1 0-0.15-0.05-0.15-0.15l-0.07-0.49c-0.1-0.94-0.5-1.73-1.19-2.35s-1.51-0.93-2.45-0.93c-0.94 0-1.76 0.31-2.46 0.94c-0.7 0.62-1.09 1.41-1.18 2.34L8.47 14.6c0 0.1-0.05 0.15-0.16 0.15l-0.45 0.07c-0.72 0.06-1.32 0.36-1.81 0.89c-0.46 0.53-0.71 1.16-0.71 1.89zm8.85-8.72c-0.1 0.09-0.08 0.16 0.07 0.21c0.43 0.19 0.79 0.37 1.08 0.55c0.11 0.03 0.19 0.02 0.22-0.03c0.61-0.57 1.31-0.86 2.12-0.86s1.5 0.27 2.1 0.81c0.59 0.54 0.92 1.21 0.99 2l0.09 0.64h1.42c0.65 0 1.21 0.23 1.68 0.7s0.7 1.02 0.7 1.66c0 0.6-0.21 1.12-0.62 1.57s-0.92 0.7-1.53 0.77c-0.1 0-0.15 0.05-0.15 0.16v1.13c0 0.11 0.05 0.16 0.15 0.16c1.01-0.06 1.86-0.46 2.55-1.19s1.04-1.6 1.04-2.6c0-1.06-0.37-1.96-1.12-2.7c-0.75-0.75-1.65-1.12-2.7-1.12h-0.15c-0.26-1-0.81-1.82-1.65-2.47c-0.83-0.65-1.77-0.97-2.8-0.97c-1.4-0.01-2.57 0.52-3.49 1.58z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M1.56 16.9c0 0.9 0.22 1.73 0.66 2.49s1.04 1.36 1.8 1.8c0.76 0.44 1.58 0.66 2.47 0.66h10.83c0.89 0 1.72-0.22 2.48-0.66c0.76-0.44 1.37-1.04 1.81-1.8c0.44-0.76 0.67-1.59 0.67-2.49c0-0.66-0.14-1.33-0.42-2c0.76-0.92 1.14-2.03 1.14-3.3c0-0.71-0.14-1.39-0.41-2.04c-0.27-0.65-0.65-1.2-1.12-1.67C21 7.42 20.45 7.04 19.8 6.77c-0.65-0.28-1.33-0.41-2.04-0.41c-1.48 0-2.77 0.58-3.88 1.74c-0.77-0.44-1.67-0.66-2.7-0.66c-1.41 0-2.65 0.44-3.73 1.31c-1.08 0.87-1.78 1.99-2.08 3.35c-1.12 0.26-2.03 0.83-2.74 1.73s-1.07 1.92-1.07 3.07zm1.71 0c0-0.84 0.28-1.56 0.84-2.17c0.56-0.61 1.26-0.96 2.1-1.06l0.5-0.03c0.12 0 0.19-0.06 0.19-0.18l0.07-0.54c0.14-1.08 0.61-1.99 1.41-2.71c0.8-0.73 1.74-1.09 2.81-1.09c1.1 0 2.06 0.37 2.87 1.1c0.82 0.73 1.27 1.63 1.37 2.71l0.07 0.58c0.02 0.11 0.09 0.17 0.21 0.17h1.61c0.88 0 1.64 0.32 2.28 0.96c0.64 0.64 0.96 1.39 0.96 2.27c0 0.91-0.32 1.68-0.95 2.32c-0.63 0.64-1.4 0.96-2.28 0.96H6.49c-0.88 0-1.63-0.32-2.27-0.97c-0.63-0.65-0.95-1.42-0.95-2.32zm6.7-12.27c0 0.24 0.08 0.45 0.24 0.63l0.66 0.64c0.25 0.19 0.46 0.27 0.64 0.25c0.21 0 0.39-0.09 0.55-0.26s0.24-0.38 0.24-0.62s-0.09-0.44-0.26-0.59l-0.59-0.66c-0.18-0.16-0.38-0.24-0.61-0.24c-0.24 0-0.45 0.08-0.62 0.25c-0.17 0.16-0.25 0.36-0.25 0.6zm5.34 4.43c0.69-0.67 1.51-1 2.45-1c0.99 0 1.83 0.34 2.52 1.03s1.04 1.52 1.04 2.51c0 0.62-0.17 1.24-0.51 1.84c-0.97-0.96-2.13-1.44-3.49-1.44H17c-0.25-1.09-0.81-2.07-1.69-2.94zm1.63-5.28c0 0.26 0.08 0.46 0.23 0.62s0.35 0.23 0.59 0.23c0.26 0 0.46-0.08 0.62-0.23c0.16-0.16 0.23-0.36 0.23-0.62V1.73c0-0.24-0.08-0.43-0.24-0.59s-0.36-0.23-0.61-0.23c-0.24 0-0.43 0.08-0.59 0.23s-0.23 0.35-0.23 0.59v2.05zm5.52 2.29c0 0.26 0.07 0.46 0.22 0.62c0.21 0.16 0.42 0.24 0.62 0.24c0.18 0 0.38-0.08 0.59-0.24l1.43-1.43c0.16-0.18 0.24-0.39 0.24-0.64c0-0.24-0.08-0.44-0.24-0.6c-0.16-0.16-0.36-0.24-0.59-0.24c-0.24 0-0.43 0.08-0.58 0.24l-1.47 1.43c-0.15 0.19-0.22 0.39-0.22 0.62zm0.79 11.84c0 0.24 0.08 0.45 0.25 0.63l0.65 0.63c0.15 0.16 0.34 0.24 0.58 0.24s0.44-0.08 0.6-0.25c0.16-0.17 0.24-0.37 0.24-0.62c0-0.22-0.08-0.42-0.24-0.58l-0.65-0.65c-0.16-0.16-0.35-0.24-0.57-0.24c-0.24 0-0.44 0.08-0.6 0.24c-0.17 0.16-0.26 0.36-0.26 0.6zm1.47-6.31c0 0.23 0.09 0.42 0.26 0.58c0.16 0.16 0.37 0.24 0.61 0.24h2.04c0.23 0 0.42-0.08 0.58-0.23s0.23-0.35 0.23-0.59s-0.08-0.44-0.23-0.6s-0.35-0.25-0.58-0.25h-2.04c-0.24 0-0.44 0.08-0.61 0.25c-0.18 0.17-0.26 0.37-0.26 0.6z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M0.32 21.06c0 0.23 0.08 0.43 0.25 0.59c0.17 0.16 0.38 0.24 0.63 0.24h18.71c0.24 0 0.44-0.08 0.61-0.24c0.17-0.16 0.25-0.35 0.25-0.59s-0.08-0.44-0.25-0.6c-0.17-0.17-0.37-0.25-0.61-0.25H1.2c-0.25 0-0.46 0.08-0.63 0.25s-0.25 0.36-0.25 0.6zm2.62-3.14c0 0.23 0.08 0.43 0.25 0.58c0.17 0.18 0.37 0.27 0.6 0.27h18.72c0.23 0 0.43-0.08 0.59-0.25c0.16-0.17 0.24-0.37 0.24-0.6c0-0.23-0.08-0.43-0.23-0.59c-0.16-0.16-0.35-0.24-0.59-0.24H3.8c-0.24 0-0.44 0.08-0.6 0.24c-0.17 0.17-0.26 0.36-0.26 0.59zm0.13-2.4c0 0.09 0.05 0.13 0.16 0.13h1.43c0.07 0 0.14-0.05 0.21-0.16c0.24-0.52 0.59-0.94 1.06-1.27c0.47-0.33 0.99-0.52 1.56-0.56l0.54-0.07c0.11 0 0.17-0.06 0.17-0.18l0.07-0.51c0.11-1.08 0.56-1.98 1.37-2.71c0.81-0.72 1.76-1.09 2.86-1.09c1.08 0 2.03 0.36 2.84 1.08c0.81 0.72 1.27 1.61 1.38 2.68l0.07 0.58c0 0.11 0.06 0.17 0.19 0.17h1.61c0.64 0 1.23 0.17 1.76 0.52c0.53 0.34 0.92 0.8 1.18 1.37c0.07 0.11 0.13 0.16 0.2 0.16h1.44c0.13 0 0.18-0.07 0.13-0.23l-0.2-0.55c0.76-0.94 1.13-2.04 1.13-3.31c0-0.71-0.14-1.38-0.41-2.03s-0.64-1.2-1.11-1.67c-0.46-0.47-1.02-0.84-1.67-1.12s-1.32-0.4-2.04-0.4c-1.54 0-2.82 0.56-3.82 1.68c-0.85-0.42-1.74-0.63-2.68-0.63c-1.4 0-2.65 0.44-3.74 1.32s-1.79 2-2.1 3.37c-1.78 0.47-2.98 1.58-3.58 3.35c-0.01 0.01-0.01 0.04-0.01 0.08zm1.62 8.61c0 0.24 0.09 0.44 0.27 0.6c0.16 0.17 0.35 0.26 0.59 0.26h18.74c0.23 0 0.43-0.08 0.6-0.25c0.17-0.17 0.25-0.37 0.25-0.61c0-0.23-0.08-0.42-0.25-0.58c-0.17-0.15-0.37-0.23-0.6-0.23H5.55c-0.24 0-0.44 0.08-0.61 0.23c-0.17 0.16-0.25 0.35-0.25 0.58zm6.57-19.47c0 0.24 0.08 0.43 0.23 0.59l0.65 0.64c0.17 0.18 0.36 0.27 0.58 0.27c0.22 0 0.42-0.08 0.6-0.25c0.17-0.17 0.26-0.37 0.26-0.61s-0.08-0.45-0.25-0.63l-0.64-0.61c-0.16-0.17-0.36-0.26-0.6-0.26s-0.44 0.08-0.6 0.25c-0.15 0.16-0.23 0.37-0.23 0.61zm5.32 4.38c0.67-0.68 1.48-1.01 2.43-1.01c0.98 0 1.82 0.35 2.51 1.04c0.69 0.69 1.04 1.53 1.04 2.5c0 0.65-0.16 1.25-0.49 1.8c-0.95-0.95-2.11-1.42-3.47-1.42h-0.34c-0.29-1.18-0.85-2.15-1.68-2.91zm1.6-5.23c0 0.23 0.08 0.43 0.24 0.59c0.16 0.16 0.35 0.24 0.59 0.24c0.25 0 0.46-0.08 0.63-0.24c0.17-0.16 0.25-0.35 0.25-0.59V1.76c0-0.23-0.09-0.43-0.26-0.6c-0.18-0.17-0.39-0.25-0.63-0.25c-0.23 0-0.43 0.08-0.59 0.25c-0.16 0.17-0.24 0.37-0.24 0.6v2.05zm5.49 2.27c0 0.22 0.08 0.43 0.24 0.6c0.37 0.36 0.78 0.36 1.23 0l1.43-1.43c0.16-0.18 0.24-0.39 0.24-0.64c0-0.23-0.08-0.43-0.24-0.59c-0.16-0.16-0.36-0.24-0.59-0.24c-0.24 0-0.44 0.08-0.6 0.24l-1.46 1.47c-0.17 0.18-0.25 0.38-0.25 0.59zm0.81 11.8c0 0.24 0.09 0.44 0.26 0.6l0.64 0.65c0.16 0.16 0.36 0.24 0.58 0.24c0.21 0 0.41-0.08 0.61-0.24c0.16-0.17 0.24-0.39 0.24-0.64c0-0.22-0.08-0.41-0.24-0.56l-0.65-0.66c-0.18-0.16-0.38-0.24-0.6-0.24c-0.24 0-0.44 0.08-0.6 0.25c-0.16 0.16-0.24 0.36-0.24 0.6zm1.48-6.31c0 0.24 0.09 0.44 0.26 0.6c0.15 0.17 0.35 0.25 0.59 0.25h2.05c0.23 0 0.43-0.08 0.59-0.25c0.16-0.17 0.24-0.37 0.24-0.6c0-0.24-0.08-0.44-0.24-0.6c-0.16-0.16-0.35-0.24-0.59-0.24h-2.05c-0.24 0-0.44 0.08-0.6 0.25c-0.17 0.16-0.25 0.36-0.25 0.59z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M1.48 16.95c0 1.32 0.46 2.46 1.37 3.4c0.91 0.94 2.04 1.45 3.38 1.51c0.12 0 0.18-0.06 0.18-0.17v-1.33c0-0.12-0.06-0.18-0.18-0.18c-0.86-0.04-1.58-0.38-2.17-1s-0.88-1.37-0.88-2.24c0-0.84 0.28-1.58 0.84-2.19c0.56-0.62 1.26-0.96 2.1-1.03l0.53-0.08c0.11 0 0.16-0.05 0.16-0.14l0.08-0.55c0.12-1.09 0.59-2 1.38-2.72S10 9.16 11.1 9.16s2.05 0.36 2.86 1.08c0.82 0.72 1.28 1.62 1.38 2.69l0.07 0.58c0.02 0.11 0.1 0.17 0.22 0.17h1.6c0.89 0 1.65 0.32 2.29 0.96c0.64 0.64 0.96 1.41 0.96 2.31c0 0.87-0.29 1.61-0.88 2.24s-1.31 0.95-2.17 1c-0.13 0-0.2 0.06-0.2 0.18v1.33c0 0.11 0.07 0.17 0.2 0.17c1.33-0.04 2.45-0.54 3.37-1.49c0.91-0.95 1.37-2.09 1.37-3.42c0-0.68-0.13-1.34-0.38-2.01c0.78-0.96 1.16-2.08 1.16-3.35c0-0.71-0.14-1.38-0.41-2.03c-0.27-0.65-0.65-1.2-1.12-1.67s-1.03-0.84-1.67-1.12s-1.33-0.42-2.04-0.42c-1.54 0-2.83 0.58-3.86 1.74c-0.89-0.44-1.81-0.66-2.74-0.66c-1.41 0-2.66 0.44-3.74 1.31s-1.77 2-2.08 3.38c-1.12 0.26-2.04 0.83-2.75 1.73s-1.06 1.93-1.06 3.09zm5.35 7.03c0 0.17 0.05 0.34 0.16 0.51c0.11 0.17 0.27 0.28 0.47 0.35c0.23 0.07 0.45 0.06 0.64-0.04c0.2-0.09 0.33-0.28 0.4-0.56l0.14-0.61c0.05-0.23 0.02-0.44-0.1-0.63c-0.12-0.2-0.29-0.33-0.52-0.4c-0.23-0.07-0.44-0.04-0.64 0.08S7.06 22.97 7 23.2l-0.14 0.59c-0.02 0.06-0.03 0.12-0.03 0.19zm0.77-2.9c0 0.22 0.08 0.41 0.24 0.57c0.16 0.18 0.35 0.26 0.56 0.26c0.24 0 0.44-0.08 0.6-0.24c0.17-0.16 0.25-0.35 0.25-0.59c0-0.23-0.08-0.43-0.25-0.59c-0.17-0.16-0.37-0.24-0.6-0.24c-0.23 0-0.42 0.08-0.58 0.23s-0.22 0.37-0.22 0.6zm0.61-2.27c-0.01 0.16 0.03 0.31 0.13 0.45c0.1 0.15 0.26 0.25 0.48 0.32c0.21 0.06 0.41 0.04 0.62-0.07c0.21-0.11 0.35-0.28 0.42-0.51l0.27-0.9c0.07-0.24 0.05-0.46-0.07-0.65c-0.12-0.19-0.3-0.32-0.54-0.39c-0.22-0.07-0.43-0.05-0.63 0.07c-0.2 0.11-0.34 0.28-0.41 0.5l-0.24 0.92c-0.02 0.16-0.03 0.25-0.03 0.26zm1.15 8.29c0 0.17 0.05 0.33 0.16 0.49c0.11 0.16 0.27 0.27 0.49 0.33c0.09 0.02 0.17 0.03 0.24 0.03c0.43 0 0.7-0.2 0.8-0.61l0.13-0.59c0.06-0.26 0.03-0.48-0.08-0.68s-0.29-0.32-0.52-0.37c-0.21-0.07-0.42-0.05-0.63 0.07c-0.21 0.12-0.34 0.29-0.41 0.51l-0.14 0.6c-0.03 0.11-0.04 0.19-0.04 0.22zM9.92 4.66c0 0.24 0.08 0.44 0.24 0.6l0.66 0.64c0.14 0.16 0.32 0.24 0.54 0.26c0.22 0.02 0.43-0.07 0.62-0.26c0.16-0.16 0.24-0.36 0.24-0.59c0-0.24-0.08-0.44-0.24-0.6l-0.63-0.65C11.2 3.9 11 3.82 10.77 3.8c-0.23 0-0.43 0.08-0.6 0.25c-0.16 0.17-0.25 0.37-0.25 0.61zm0.23 19.54c0 0.23 0.08 0.42 0.24 0.58c0.16 0.16 0.36 0.24 0.58 0.24c0.24 0 0.43-0.08 0.59-0.23c0.16-0.16 0.23-0.35 0.23-0.59c0-0.23-0.08-0.42-0.23-0.58c-0.16-0.16-0.35-0.23-0.59-0.23s-0.43 0.08-0.59 0.23s-0.23 0.35-0.23 0.58zm0.62-2.27c-0.01 0.15 0.03 0.31 0.14 0.47c0.1 0.16 0.25 0.26 0.45 0.3c0.23 0.06 0.44 0.04 0.64-0.06s0.33-0.29 0.41-0.56l0.26-0.9c0.07-0.22 0.05-0.43-0.07-0.63c-0.12-0.2-0.29-0.33-0.53-0.4c-0.22-0.07-0.43-0.04-0.64 0.08s-0.34 0.3-0.41 0.53l-0.22 0.9c-0.02 0.08-0.03 0.17-0.03 0.27zm2.76 2.15c0 0.17 0.05 0.33 0.15 0.48c0.1 0.15 0.25 0.26 0.46 0.32c0.03 0 0.08 0.01 0.14 0.02c0.06 0.01 0.11 0.02 0.14 0.02c0.41 0 0.66-0.22 0.76-0.66l0.14-0.6c0.07-0.21 0.05-0.42-0.07-0.63c-0.12-0.21-0.29-0.34-0.51-0.41c-0.25-0.06-0.48-0.04-0.68 0.08s-0.34 0.29-0.41 0.53l-0.09 0.59c0 0.01 0 0.05-0.01 0.11c-0.01 0.07-0.02 0.11-0.02 0.15zm0.74-2.96c0 0.23 0.08 0.42 0.24 0.57c0.15 0.16 0.34 0.24 0.58 0.24s0.43-0.08 0.59-0.23c0.16-0.16 0.23-0.35 0.23-0.58c0-0.24-0.08-0.43-0.23-0.59c-0.16-0.16-0.35-0.23-0.59-0.23s-0.43 0.08-0.59 0.23s-0.23 0.35-0.23 0.59zm0.61-2.31c0 0.17 0.05 0.33 0.16 0.48c0.11 0.15 0.27 0.26 0.49 0.32c0.02 0 0.06 0.01 0.12 0.02s0.11 0.02 0.14 0.02c0.11 0 0.23-0.03 0.37-0.09c0.21-0.11 0.34-0.28 0.4-0.52l0.24-0.9c0.06-0.23 0.04-0.44-0.07-0.63s-0.28-0.33-0.5-0.4c-0.23-0.07-0.45-0.05-0.64 0.06c-0.2 0.11-0.33 0.27-0.4 0.51l-0.28 0.91c0 0.02 0 0.05-0.01 0.11c-0.01 0.03-0.02 0.07-0.02 0.11zm0.35-9.72c0.66-0.66 1.48-0.99 2.47-0.99c0.99 0 1.83 0.34 2.52 1.02s1.04 1.5 1.04 2.48c0 0.66-0.18 1.29-0.53 1.88c-0.98-0.98-2.15-1.47-3.5-1.47h-0.31c-0.28-1.1-0.85-2.07-1.69-2.92zm1.65-5.26c0 0.23 0.08 0.42 0.23 0.58c0.15 0.15 0.35 0.23 0.59 0.23s0.45-0.08 0.62-0.23c0.17-0.15 0.25-0.35 0.25-0.58V1.76c0-0.23-0.09-0.43-0.26-0.6c-0.17-0.17-0.38-0.25-0.61-0.25c-0.23 0-0.43 0.08-0.58 0.25c-0.16 0.17-0.23 0.37-0.23 0.6v2.07zm5.52 2.26c0 0.25 0.08 0.45 0.23 0.6c0.36 0.36 0.76 0.36 1.21 0l1.43-1.43c0.17-0.17 0.25-0.38 0.25-0.63c0-0.24-0.08-0.44-0.25-0.6c-0.17-0.17-0.37-0.25-0.6-0.25c-0.23 0-0.43 0.08-0.61 0.24L22.63 5.5c-0.15 0.15-0.23 0.34-0.23 0.59zm0.78 11.85c0 0.23 0.09 0.43 0.27 0.59l0.61 0.63c0.2 0.16 0.4 0.24 0.61 0.24c0.2 0 0.4-0.08 0.6-0.24c0.17-0.16 0.25-0.35 0.25-0.59c0-0.23-0.08-0.43-0.25-0.62l-0.65-0.61c-0.15-0.17-0.34-0.25-0.57-0.25s-0.43 0.08-0.6 0.25c-0.18 0.17-0.27 0.37-0.27 0.6zm1.48-6.34c0 0.24 0.09 0.43 0.26 0.59c0.18 0.18 0.39 0.27 0.62 0.27h2.03c0.23 0 0.43-0.08 0.59-0.25c0.16-0.17 0.24-0.37 0.24-0.61s-0.08-0.44-0.24-0.6c-0.16-0.17-0.35-0.25-0.59-0.25h-2.03c-0.24 0-0.44 0.08-0.62 0.25s-0.26 0.37-0.26 0.6z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M1.51 16.89c0 1.33 0.46 2.48 1.39 3.44s2.06 1.47 3.41 1.53c0.11 0 0.17-0.06 0.17-0.17v-1.34c0-0.11-0.06-0.17-0.17-0.17c-0.86-0.04-1.59-0.39-2.19-1.03s-0.9-1.4-0.9-2.26c0-0.82 0.28-1.54 0.85-2.16s1.27-0.97 2.1-1.07l0.53-0.05c0.13 0 0.2-0.06 0.2-0.17l0.07-0.54c0.11-1.08 0.56-1.99 1.37-2.72s1.76-1.1 2.85-1.1s2.04 0.37 2.86 1.1s1.28 1.64 1.4 2.72l0.07 0.57c0 0.12 0.06 0.19 0.17 0.19h1.62c0.89 0 1.65 0.32 2.3 0.96c0.65 0.64 0.97 1.39 0.97 2.27c0 0.87-0.3 1.62-0.9 2.26c-0.6 0.64-1.33 0.98-2.18 1.03c-0.12 0-0.19 0.06-0.19 0.17v1.34c0 0.11 0.06 0.17 0.19 0.17c1.33-0.04 2.46-0.55 3.39-1.51c0.93-0.97 1.39-2.12 1.39-3.45c0-0.72-0.14-1.39-0.42-2.01c0.78-0.97 1.17-2.07 1.17-3.31c0-0.95-0.24-1.83-0.71-2.64s-1.11-1.45-1.92-1.92s-1.68-0.7-2.62-0.7c-1.56 0-2.85 0.58-3.88 1.74c-0.82-0.44-1.72-0.66-2.71-0.66c-1.41 0-2.67 0.44-3.76 1.32s-1.79 2-2.1 3.36c-1.11 0.26-2.02 0.84-2.74 1.74s-1.08 1.92-1.08 3.07zm5.4 6.86c0 0.17 0.05 0.33 0.16 0.49c0.11 0.16 0.27 0.27 0.49 0.33c0.11 0.02 0.2 0.04 0.27 0.04c0.39 0 0.65-0.21 0.77-0.64l1.58-5.88c0.07-0.24 0.04-0.46-0.08-0.67c-0.12-0.21-0.3-0.33-0.53-0.38c-0.22-0.07-0.43-0.05-0.63 0.07c-0.2 0.11-0.34 0.28-0.41 0.51l-1.58 5.91c-0.02 0.13-0.04 0.2-0.04 0.22zm2.61 3.08c0 0.19 0.05 0.36 0.15 0.52c0.1 0.16 0.27 0.26 0.52 0.3c0.11 0.02 0.2 0.04 0.26 0.04c0.16 0 0.31-0.06 0.45-0.17c0.14-0.12 0.23-0.28 0.27-0.48l2.4-8.93c0.06-0.23 0.04-0.45-0.07-0.64s-0.28-0.33-0.5-0.4c-0.23-0.07-0.45-0.05-0.65 0.07c-0.2 0.11-0.34 0.28-0.4 0.51l-2.4 8.93c-0.02 0.15-0.03 0.24-0.03 0.25zM9.94 4.6c0 0.24 0.08 0.44 0.25 0.61l0.65 0.66c0.19 0.15 0.4 0.22 0.62 0.22c0.21 0 0.41-0.08 0.58-0.23c0.17-0.16 0.26-0.35 0.26-0.59s-0.08-0.46-0.24-0.64l-0.64-0.65c-0.18-0.17-0.38-0.25-0.6-0.25c-0.24 0-0.45 0.09-0.62 0.26c-0.17 0.17-0.26 0.38-0.26 0.61zm3.73 19.17c0 0.16 0.05 0.32 0.15 0.47s0.26 0.26 0.46 0.32c0.11 0.02 0.2 0.04 0.25 0.04c0.17 0 0.34-0.05 0.49-0.15c0.15-0.1 0.25-0.26 0.3-0.49l1.58-5.88c0.06-0.23 0.04-0.45-0.07-0.64c-0.11-0.2-0.28-0.33-0.5-0.4c-0.24-0.07-0.45-0.05-0.65 0.07c-0.2 0.11-0.33 0.28-0.39 0.51l-1.58 5.91c-0.02 0.15-0.04 0.23-0.04 0.24zM15.3 9.03c0.71-0.67 1.53-1 2.48-1c0.98 0 1.82 0.35 2.5 1.04c0.69 0.69 1.03 1.53 1.03 2.52c0 0.62-0.17 1.24-0.52 1.85c-0.97-0.97-2.13-1.45-3.49-1.45h-0.33c-0.27-1.18-0.83-2.16-1.67-2.96zm1.62-5.25c0 0.23 0.08 0.43 0.25 0.59c0.17 0.16 0.37 0.24 0.61 0.24c0.23 0 0.43-0.08 0.59-0.23c0.16-0.16 0.24-0.35 0.24-0.59V1.73c0-0.26-0.08-0.47-0.23-0.63c-0.16-0.16-0.35-0.24-0.59-0.24c-0.25 0-0.46 0.08-0.62 0.25s-0.24 0.37-0.24 0.62v2.05zm5.53 2.28c0 0.24 0.09 0.44 0.27 0.59c0.14 0.16 0.32 0.24 0.55 0.26c0.23 0.02 0.44-0.07 0.62-0.26l1.44-1.43c0.18-0.17 0.26-0.38 0.26-0.63c0-0.24-0.08-0.45-0.25-0.61c-0.17-0.16-0.37-0.24-0.61-0.24c-0.21 0-0.4 0.08-0.58 0.25l-1.43 1.44c-0.18 0.17-0.27 0.38-0.27 0.63zm0.81 11.85c0 0.24 0.08 0.45 0.24 0.63l0.65 0.63c0.18 0.14 0.38 0.21 0.6 0.21l0.02 0.02c0.23 0 0.42-0.08 0.58-0.24c0.16-0.16 0.24-0.37 0.24-0.61s-0.09-0.43-0.26-0.58l-0.62-0.66c-0.18-0.16-0.39-0.24-0.62-0.24s-0.43 0.08-0.59 0.25s-0.24 0.35-0.24 0.59zm1.46-6.33c0 0.24 0.09 0.43 0.26 0.59c0.18 0.18 0.38 0.26 0.62 0.26h2.03c0.24 0 0.44-0.08 0.61-0.25c0.17-0.17 0.25-0.37 0.25-0.6c0-0.24-0.08-0.44-0.25-0.61s-0.37-0.26-0.61-0.26H25.6c-0.24 0-0.44 0.09-0.62 0.26s-0.26 0.37-0.26 0.61z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M1.56 16.88c0 1.33 0.46 2.47 1.39 3.43s2.06 1.46 3.4 1.53c0.11 0 0.17-0.06 0.17-0.17v-1.34c0-0.12-0.06-0.18-0.17-0.18c-0.85-0.04-1.57-0.38-2.17-1.02s-0.89-1.39-0.89-2.25c0-0.84 0.28-1.56 0.84-2.17s1.26-0.96 2.1-1.06l0.5-0.04c0.13 0 0.2-0.06 0.2-0.18l0.06-0.53c0.11-1.08 0.56-1.99 1.37-2.71c0.81-0.73 1.76-1.09 2.86-1.09c1.09 0 2.05 0.36 2.86 1.09c0.81 0.73 1.27 1.63 1.37 2.71l0.07 0.57c0 0.12 0.06 0.18 0.18 0.18h1.67c0.88 0 1.63 0.32 2.27 0.96c0.64 0.64 0.96 1.39 0.96 2.27c0 0.85-0.3 1.59-0.9 2.22s-1.32 0.98-2.16 1.05c-0.11 0-0.17 0.06-0.17 0.18v1.34c0 0.11 0.06 0.17 0.17 0.17c0.88-0.02 1.67-0.26 2.4-0.72s1.3-1.05 1.71-1.8c0.42-0.75 0.62-1.56 0.62-2.44c0-0.71-0.14-1.37-0.41-1.96c0.76-0.94 1.13-2.03 1.13-3.28c0-0.71-0.14-1.39-0.41-2.04c-0.27-0.65-0.65-1.2-1.12-1.67C21 7.46 20.44 7.09 19.8 6.82c-0.65-0.28-1.33-0.41-2.04-0.41c-1.51 0-2.78 0.55-3.81 1.66c-0.79-0.43-1.7-0.64-2.73-0.64c-1.41 0-2.66 0.44-3.75 1.31S5.7 10.73 5.4 12.09c-1.12 0.26-2.05 0.83-2.77 1.72c-0.71 0.89-1.07 1.92-1.07 3.07zm5.41 6.7c0 0.18 0.05 0.36 0.16 0.53c0.11 0.18 0.26 0.29 0.45 0.36s0.4 0.05 0.61-0.06c0.22-0.11 0.36-0.29 0.44-0.55l0.25-1.05c0.07-0.21 0.05-0.41-0.07-0.62c-0.12-0.21-0.29-0.35-0.51-0.42c-0.25-0.06-0.47-0.03-0.67 0.08s-0.32 0.3-0.37 0.53l-0.28 0.99c0 0.05-0.01 0.12-0.01 0.21zm1.31-4.72c0 0.38 0.21 0.64 0.64 0.79c0.22 0.08 0.43 0.06 0.64-0.05c0.21-0.11 0.34-0.29 0.41-0.53l0.24-1.03c0.07-0.21 0.05-0.41-0.07-0.62c-0.11-0.21-0.28-0.35-0.51-0.42c-0.24-0.06-0.47-0.04-0.67 0.08s-0.32 0.29-0.37 0.52l-0.3 1.02c0 0.08-0.01 0.16-0.01 0.24zm1.22 7.89c0 0.16 0.06 0.33 0.17 0.5c0.11 0.17 0.28 0.29 0.49 0.36c0.01 0 0.04 0 0.1 0.01c0.06 0.01 0.11 0.01 0.15 0.01c0.14 0 0.26-0.02 0.37-0.07c0.19-0.08 0.33-0.27 0.41-0.58l0.27-0.99c0.07-0.23 0.05-0.45-0.07-0.65c-0.12-0.2-0.29-0.34-0.51-0.4c-0.23-0.07-0.45-0.05-0.65 0.07c-0.2 0.12-0.34 0.29-0.4 0.51l-0.28 1.02C9.51 26.63 9.5 26.7 9.5 26.75zM9.96 4.68c0 0.25 0.08 0.46 0.25 0.62l0.66 0.65c0.34 0.34 0.73 0.34 1.17 0c0.16-0.17 0.24-0.38 0.24-0.61c0-0.23-0.08-0.43-0.24-0.61l-0.63-0.66c-0.16-0.16-0.36-0.24-0.6-0.24c-0.23 0-0.43 0.08-0.6 0.25c-0.17 0.16-0.25 0.36-0.25 0.6zm0.89 17.28c0 0.17 0.05 0.34 0.16 0.51c0.11 0.17 0.26 0.28 0.47 0.35c0.23 0.07 0.44 0.05 0.64-0.05c0.19-0.1 0.33-0.29 0.4-0.56l0.24-1.01c0.07-0.23 0.05-0.45-0.06-0.65s-0.28-0.34-0.5-0.41c-0.25-0.07-0.48-0.04-0.68 0.08c-0.2 0.12-0.33 0.3-0.37 0.53l-0.28 1.03c-0.02 0.03-0.02 0.09-0.02 0.18zm2.78 1.72c0.02 0.38 0.23 0.65 0.63 0.83l0.25 0.04c0.16 0 0.32-0.05 0.47-0.16c0.15-0.11 0.26-0.27 0.32-0.5l0.29-1.01c0.06-0.24 0.03-0.46-0.09-0.66s-0.3-0.33-0.53-0.37c-0.21-0.07-0.41-0.05-0.62 0.07s-0.34 0.29-0.41 0.51l-0.27 1.02c-0.01 0.02-0.01 0.05-0.02 0.08s-0.01 0.06-0.02 0.08s0 0.05 0 0.07zm1.4-4.76c0 0.16 0.05 0.32 0.15 0.48c0.1 0.16 0.25 0.27 0.45 0.32l0.25 0.03c0.19 0 0.37-0.06 0.52-0.18s0.24-0.28 0.28-0.47l0.27-0.99c0.07-0.24 0.05-0.45-0.07-0.65c-0.11-0.2-0.28-0.33-0.51-0.39c-0.23-0.07-0.45-0.05-0.64 0.06c-0.2 0.11-0.33 0.28-0.39 0.5l-0.3 1.06c0 0.08-0.01 0.16-0.01 0.23zm0.33-9.86c0.66-0.64 1.46-0.96 2.4-0.96c0.98 0 1.82 0.35 2.51 1.04c0.69 0.69 1.04 1.53 1.04 2.51c0 0.56-0.16 1.15-0.47 1.76c-0.96-0.96-2.11-1.43-3.47-1.43h-0.34c-0.26-1.14-0.82-2.11-1.67-2.92zm1.54-5.23c0 0.25 0.08 0.45 0.24 0.61c0.16 0.16 0.36 0.24 0.61 0.24s0.45-0.08 0.61-0.24c0.16-0.16 0.24-0.36 0.24-0.61V1.81c0-0.25-0.08-0.46-0.24-0.62C18.2 1.03 18 0.95 17.75 0.95s-0.45 0.08-0.61 0.24c-0.16 0.16-0.24 0.37-0.24 0.62v2.02zm5.55 2.29c0 0.25 0.08 0.45 0.23 0.61c0.21 0.17 0.41 0.25 0.62 0.25c0.19 0 0.38-0.08 0.59-0.25l1.43-1.43c0.16-0.18 0.24-0.39 0.24-0.63s-0.08-0.44-0.24-0.6c-0.16-0.16-0.36-0.24-0.59-0.24s-0.43 0.08-0.61 0.24L22.68 5.5c-0.15 0.18-0.23 0.38-0.23 0.62zm0.79 11.83c0 0.23 0.09 0.44 0.26 0.63l0.62 0.64c0.21 0.21 0.41 0.31 0.62 0.31c0.19 0 0.39-0.1 0.58-0.31c0.18-0.18 0.27-0.39 0.26-0.61c-0.01-0.23-0.09-0.43-0.26-0.6l-0.65-0.66c-0.16-0.16-0.35-0.24-0.57-0.24c-0.24 0-0.44 0.08-0.61 0.25c-0.16 0.16-0.25 0.36-0.25 0.59zm1.47-6.31c0 0.22 0.08 0.42 0.24 0.58c0.16 0.16 0.36 0.24 0.58 0.24h2.04c0.26 0 0.47-0.08 0.63-0.23c0.16-0.16 0.24-0.35 0.24-0.59c0-0.25-0.08-0.46-0.25-0.62c-0.17-0.16-0.37-0.24-0.62-0.24h-2.04c-0.23 0-0.43 0.08-0.59 0.25c-0.15 0.17-0.23 0.38-0.23 0.61z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M1.58 16.93c0 0.86 0.21 1.67 0.64 2.41c0.42 0.74 1 1.34 1.74 1.79c0.73 0.45 1.54 0.69 2.4 0.71c0.11 0 0.17-0.06 0.17-0.17v-1.33c0-0.12-0.06-0.19-0.17-0.19c-0.85-0.04-1.58-0.38-2.18-1.02s-0.9-1.37-0.9-2.21c0-0.82 0.28-1.54 0.85-2.16c0.57-0.61 1.26-0.97 2.1-1.07l0.53-0.06c0.12 0 0.18-0.06 0.18-0.19l0.08-0.51c0.11-1.09 0.56-2 1.36-2.73s1.75-1.09 2.85-1.09c1.09 0 2.04 0.36 2.85 1.09c0.82 0.73 1.28 1.63 1.38 2.7l0.07 0.58c0 0.11 0.06 0.17 0.17 0.17h1.61c0.9 0 1.67 0.32 2.31 0.96c0.64 0.64 0.96 1.4 0.96 2.29c0 0.84-0.3 1.57-0.9 2.21c-0.6 0.63-1.33 0.97-2.17 1.02c-0.12 0-0.19 0.06-0.19 0.19v1.33c0 0.11 0.06 0.17 0.19 0.17c1.33-0.04 2.45-0.54 3.38-1.5c0.93-0.96 1.39-2.09 1.39-3.41c0-0.76-0.14-1.43-0.43-2.03C22.6 13.95 23 12.85 23 11.6c0-0.94-0.23-1.81-0.7-2.61c-0.47-0.8-1.11-1.44-1.91-1.91s-1.68-0.7-2.62-0.7c-1.54 0-2.83 0.58-3.87 1.73c-0.81-0.44-1.71-0.66-2.69-0.66c-1.41 0-2.65 0.44-3.74 1.31s-1.78 1.99-2.09 3.34c-1.12 0.28-2.03 0.86-2.74 1.75c-0.71 0.9-1.06 1.92-1.06 3.08zm6.34 4.05c0 0.24 0.08 0.44 0.24 0.61c0.16 0.17 0.35 0.25 0.59 0.25c0.23 0 0.43-0.08 0.59-0.25c0.16-0.17 0.24-0.37 0.24-0.61c0-0.23-0.08-0.42-0.24-0.58s-0.35-0.24-0.59-0.24c-0.23 0-0.43 0.08-0.59 0.24s-0.24 0.36-0.24 0.58zm0 3.63c0 0.21 0.08 0.4 0.24 0.57c0.18 0.16 0.37 0.24 0.58 0.24c0.24 0 0.43-0.08 0.59-0.23c0.16-0.16 0.23-0.35 0.23-0.58c0-0.24-0.08-0.43-0.24-0.59c-0.16-0.16-0.35-0.23-0.59-0.23c-0.23 0-0.43 0.08-0.59 0.23c-0.14 0.15-0.22 0.35-0.22 0.59zM9.97 4.68c0 0.24 0.08 0.44 0.24 0.59l0.66 0.66c0.16 0.16 0.34 0.25 0.53 0.25c0.21 0.03 0.41-0.04 0.61-0.22s0.3-0.39 0.3-0.63s-0.08-0.46-0.24-0.64l-0.64-0.61c-0.15-0.17-0.34-0.25-0.58-0.25c-0.25 0-0.46 0.08-0.63 0.25c-0.17 0.16-0.25 0.36-0.25 0.6zM11.1 22.9c0 0.22 0.08 0.42 0.24 0.6c0.16 0.16 0.36 0.24 0.58 0.24c0.24 0 0.44-0.08 0.6-0.24s0.25-0.36 0.25-0.6c0-0.23-0.08-0.43-0.25-0.6s-0.37-0.25-0.6-0.25c-0.23 0-0.42 0.08-0.58 0.25s-0.24 0.37-0.24 0.6zm0-3.6c0 0.23 0.08 0.42 0.24 0.58s0.36 0.24 0.58 0.24c0.24 0 0.44-0.08 0.6-0.24c0.17-0.16 0.25-0.35 0.25-0.59c0-0.23-0.08-0.43-0.25-0.59s-0.37-0.24-0.6-0.24c-0.23 0-0.42 0.08-0.58 0.24s-0.24 0.37-0.24 0.6zm0 7.26c0 0.22 0.08 0.41 0.24 0.57c0.17 0.17 0.36 0.25 0.58 0.25c0.24 0 0.44-0.08 0.6-0.23c0.17-0.16 0.25-0.35 0.25-0.59s-0.08-0.44-0.25-0.6c-0.17-0.17-0.37-0.25-0.6-0.25c-0.22 0-0.41 0.08-0.58 0.25c-0.16 0.17-0.24 0.37-0.24 0.6zm3.22-5.58c0 0.24 0.08 0.44 0.24 0.61c0.16 0.17 0.36 0.25 0.59 0.25s0.43-0.08 0.59-0.25c0.16-0.17 0.24-0.37 0.24-0.61c0-0.23-0.08-0.42-0.24-0.58s-0.35-0.24-0.59-0.24s-0.43 0.08-0.59 0.24s-0.24 0.36-0.24 0.58zm0 3.63c0 0.21 0.08 0.4 0.23 0.57c0.18 0.16 0.38 0.24 0.6 0.24c0.24 0 0.43-0.08 0.59-0.23c0.16-0.16 0.23-0.35 0.23-0.58c0-0.24-0.08-0.43-0.24-0.59c-0.16-0.16-0.35-0.23-0.59-0.23s-0.44 0.08-0.6 0.24c-0.14 0.15-0.22 0.35-0.22 0.58zM15.3 9.06c0.69-0.66 1.51-0.99 2.47-0.99c0.97 0 1.8 0.35 2.48 1.04c0.69 0.69 1.03 1.53 1.03 2.49c0 0.62-0.17 1.24-0.51 1.84C19.82 12.48 18.66 12 17.3 12h-0.32c-0.3-1.17-0.86-2.15-1.68-2.94zm1.6-5.22c0 0.23 0.08 0.43 0.25 0.58s0.37 0.23 0.61 0.23s0.43-0.08 0.59-0.23c0.16-0.16 0.23-0.35 0.23-0.58V1.8c0-0.24-0.08-0.44-0.24-0.61S18 0.94 17.77 0.94s-0.43 0.09-0.6 0.26C17 1.37 16.91 1.57 16.91 1.8v2.04zm5.52 2.27c0 0.23 0.08 0.43 0.25 0.59c0.15 0.16 0.34 0.24 0.56 0.26s0.43-0.07 0.62-0.26l1.43-1.43c0.18-0.18 0.26-0.38 0.26-0.61c0-0.24-0.09-0.44-0.26-0.61c-0.17-0.17-0.37-0.25-0.6-0.25c-0.22 0-0.41 0.08-0.58 0.25l-1.43 1.46c-0.17 0.16-0.25 0.36-0.25 0.6zm0.8 11.8c0 0.25 0.08 0.46 0.24 0.62l0.64 0.63c0.24 0.16 0.46 0.24 0.64 0.24c0.21 0 0.39-0.09 0.56-0.26c0.17-0.17 0.25-0.38 0.25-0.61c0-0.23-0.09-0.42-0.26-0.58l-0.62-0.65c-0.18-0.16-0.38-0.24-0.61-0.24s-0.43 0.08-0.59 0.25c-0.17 0.16-0.25 0.36-0.25 0.6zm1.45-6.31c0 0.24 0.09 0.43 0.26 0.59c0.17 0.18 0.38 0.27 0.62 0.27h2.02c0.23 0 0.43-0.08 0.6-0.25s0.25-0.37 0.25-0.61s-0.08-0.44-0.25-0.6s-0.37-0.25-0.6-0.25h-2.02c-0.24 0-0.44 0.08-0.62 0.25s-0.26 0.37-0.26 0.6z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M1.58 16.89c0 0.87 0.21 1.68 0.64 2.42c0.42 0.75 1 1.35 1.73 1.8c0.73 0.45 1.53 0.69 2.4 0.73c0.12 0 0.18-0.06 0.18-0.17v-1.33c0-0.12-0.06-0.19-0.18-0.19c-0.85-0.04-1.58-0.38-2.18-1.02s-0.9-1.38-0.9-2.25c0-0.82 0.28-1.54 0.84-2.15s1.26-0.96 2.09-1.06l0.52-0.03c0.12 0 0.19-0.06 0.19-0.18l0.08-0.54c0.11-1.08 0.56-1.98 1.36-2.71s1.75-1.09 2.85-1.09c1.07 0 2.02 0.36 2.84 1.09c0.82 0.73 1.28 1.63 1.4 2.7l0.07 0.58c0 0.11 0.06 0.17 0.17 0.17h1.62c0.88 0 1.65 0.32 2.29 0.96c0.65 0.64 0.97 1.39 0.97 2.26c0 0.86-0.3 1.61-0.9 2.25c-0.6 0.63-1.33 0.97-2.18 1.02c-0.12 0-0.18 0.06-0.18 0.19v1.33c0 0.11 0.06 0.17 0.18 0.17c0.87-0.02 1.67-0.26 2.4-0.72s1.31-1.05 1.73-1.8s0.63-1.56 0.63-2.43c0-0.74-0.14-1.4-0.41-2c0.78-0.95 1.16-2.05 1.16-3.3c0-0.94-0.23-1.82-0.7-2.62s-1.1-1.44-1.9-1.9c-0.8-0.47-1.67-0.7-2.61-0.7c-1.55 0-2.84 0.58-3.87 1.73c-0.82-0.44-1.72-0.66-2.69-0.66c-1.41 0-2.65 0.44-3.74 1.31s-1.78 1.99-2.09 3.34c-1.1 0.26-2.01 0.84-2.72 1.73c-0.74 0.91-1.09 1.93-1.09 3.07zm5.9 0.88c0 0.38 0.14 0.71 0.42 0.98s0.62 0.4 1.01 0.4c0.4 0 0.73-0.13 1-0.4s0.4-0.59 0.4-0.98c0-0.24-0.12-0.58-0.35-1c-0.23-0.43-0.45-0.76-0.65-0.99c-0.21-0.22-0.35-0.37-0.4-0.42l-0.36 0.4c-0.27 0.29-0.52 0.63-0.74 1.03s-0.33 0.73-0.33 0.98zM9.97 4.66c0 0.26 0.08 0.46 0.24 0.61l0.65 0.66c0.42 0.31 0.82 0.31 1.21 0c0.16-0.19 0.24-0.41 0.24-0.64c0-0.23-0.08-0.43-0.24-0.59l-0.64-0.65c-0.19-0.17-0.39-0.25-0.61-0.25c-0.24 0-0.45 0.08-0.61 0.25c-0.16 0.17-0.24 0.37-0.24 0.61zm0.48 17.07c0 0.66 0.23 1.21 0.68 1.65s1 0.67 1.65 0.67c0.65 0 1.2-0.23 1.66-0.68c0.46-0.46 0.68-1 0.68-1.64c0-0.54-0.27-1.19-0.81-1.97c-0.46-0.61-0.89-1.1-1.28-1.49c-0.08-0.06-0.17-0.13-0.26-0.23l-0.23 0.23c-0.36 0.32-0.78 0.82-1.27 1.47c-0.54 0.76-0.82 1.42-0.82 1.99zm1.48-6.62c0 0.25 0.1 0.47 0.29 0.65c0.19 0.18 0.42 0.27 0.69 0.27c0.26 0 0.48-0.09 0.66-0.27c0.18-0.18 0.27-0.4 0.27-0.65c0-0.41-0.31-0.95-0.93-1.6l-0.24 0.25c-0.18 0.2-0.35 0.43-0.5 0.7c-0.17 0.27-0.24 0.48-0.24 0.65zm3.37-6.05c0.66-0.66 1.48-0.99 2.47-0.99c0.98 0 1.8 0.34 2.49 1.03c0.68 0.69 1.03 1.52 1.03 2.5c0 0.59-0.17 1.2-0.52 1.84C19.8 12.48 18.64 12 17.3 12h-0.33c-0.29-1.16-0.85-2.14-1.67-2.94zm1.6-5.26c0 0.24 0.09 0.44 0.26 0.61c0.17 0.17 0.37 0.25 0.6 0.25s0.43-0.08 0.58-0.25c0.16-0.17 0.23-0.37 0.23-0.61V1.76c0-0.24-0.08-0.43-0.23-0.59S18 0.94 17.77 0.94s-0.44 0.08-0.61 0.23s-0.26 0.35-0.26 0.59V3.8zm5.52 2.31c0 0.24 0.08 0.44 0.25 0.59c0.17 0.16 0.36 0.24 0.56 0.24c0.17 0 0.38-0.08 0.61-0.24l1.43-1.43c0.18-0.18 0.27-0.39 0.27-0.62c0-0.24-0.08-0.45-0.25-0.61c-0.17-0.16-0.37-0.24-0.61-0.24c-0.22 0-0.41 0.08-0.58 0.25l-1.43 1.43c-0.17 0.17-0.25 0.38-0.25 0.63zm0.8 11.78c0 0.25 0.08 0.46 0.23 0.64l0.65 0.58c0.14 0.18 0.34 0.27 0.59 0.27c0.24 0 0.44-0.09 0.58-0.27c0.18-0.16 0.27-0.36 0.27-0.58c0-0.22-0.09-0.41-0.27-0.58l-0.61-0.65c-0.18-0.16-0.38-0.24-0.61-0.24c-0.24 0-0.44 0.08-0.6 0.24s-0.23 0.36-0.23 0.59zm1.45-6.29c0 0.22 0.08 0.42 0.25 0.58c0.17 0.16 0.38 0.24 0.63 0.24h2.02c0.24 0 0.44-0.08 0.6-0.24c0.17-0.16 0.25-0.35 0.25-0.59s-0.08-0.44-0.25-0.6s-0.37-0.25-0.6-0.25h-2.02c-0.24 0-0.44 0.08-0.62 0.25s-0.26 0.38-0.26 0.61z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M4.37 14.62c0-0.24 0.08-0.45 0.25-0.62c0.17-0.16 0.38-0.24 0.6-0.24h2.04c0.23 0 0.42 0.08 0.58 0.25c0.15 0.17 0.23 0.37 0.23 0.61S8 15.06 7.85 15.23C7.7 15.4 7.5 15.48 7.27 15.48H5.23c-0.23 0-0.43-0.08-0.6-0.25c-0.17-0.17-0.26-0.37-0.26-0.61zm2.86 6.93c0-0.23 0.08-0.43 0.23-0.61l1.47-1.43c0.15-0.16 0.35-0.23 0.59-0.23s0.44 0.08 0.6 0.23s0.24 0.34 0.24 0.57c0 0.24-0.08 0.46-0.24 0.64L8.7 22.14c-0.41 0.32-0.82 0.32-1.23 0c-0.16-0.16-0.24-0.36-0.24-0.59zm0-13.84c0-0.23 0.08-0.43 0.23-0.61c0.2-0.17 0.41-0.25 0.64-0.25c0.22 0 0.42 0.08 0.59 0.24l1.43 1.47c0.16 0.15 0.24 0.35 0.24 0.59s-0.08 0.44-0.24 0.6s-0.36 0.24-0.6 0.24s-0.44-0.08-0.59-0.24L7.47 8.32C7.31 8.16 7.23 7.95 7.23 7.71zm2.55 6.91c0-0.93 0.23-1.8 0.7-2.6s1.1-1.44 1.91-1.91s1.67-0.7 2.6-0.7c0.7 0 1.37 0.14 2.02 0.42c0.64 0.28 1.2 0.65 1.66 1.12c0.47 0.47 0.84 1.02 1.11 1.66c0.27 0.64 0.41 1.32 0.41 2.02c0 0.94-0.23 1.81-0.7 2.61c-0.47 0.8-1.1 1.43-1.9 1.9c-0.8 0.47-1.67 0.7-2.61 0.7s-1.81-0.23-2.61-0.7c-0.8-0.47-1.43-1.1-1.9-1.9c-0.45-0.81-0.69-1.68-0.69-2.62zm1.7 0c0 0.98 0.34 1.81 1.03 2.5c0.68 0.69 1.51 1.04 2.49 1.04s1.81-0.35 2.5-1.04s1.04-1.52 1.04-2.5c0-0.96-0.35-1.78-1.04-2.47c-0.69-0.68-1.52-1.02-2.5-1.02c-0.97 0-1.8 0.34-2.48 1.02c-0.7 0.69-1.04 1.51-1.04 2.47zm2.66 7.78c0-0.24 0.08-0.44 0.25-0.6s0.37-0.24 0.6-0.24c0.24 0 0.45 0.08 0.61 0.24s0.24 0.36 0.24 0.6v1.99c0 0.24-0.08 0.45-0.25 0.62c-0.17 0.17-0.37 0.25-0.6 0.25s-0.44-0.08-0.6-0.25c-0.17-0.17-0.25-0.38-0.25-0.62V22.4zm0-15.5V4.86c0-0.23 0.08-0.43 0.25-0.6C14.56 4.09 14.76 4 15 4s0.43 0.08 0.6 0.25c0.17 0.17 0.25 0.37 0.25 0.6V6.9c0 0.23-0.08 0.42-0.25 0.58S15.23 7.71 15 7.71s-0.44-0.08-0.6-0.23s-0.26-0.35-0.26-0.58zm5.52 13.18c0-0.23 0.08-0.42 0.23-0.56c0.15-0.16 0.34-0.23 0.56-0.23c0.24 0 0.44 0.08 0.6 0.23l1.46 1.43c0.16 0.17 0.24 0.38 0.24 0.61c0 0.23-0.08 0.43-0.24 0.59c-0.4 0.31-0.8 0.31-1.2 0l-1.42-1.42c-0.15-0.18-0.23-0.39-0.23-0.65zm0-10.92c0-0.25 0.08-0.45 0.23-0.59l1.42-1.47c0.17-0.16 0.37-0.24 0.59-0.24c0.24 0 0.44 0.08 0.6 0.25c0.17 0.17 0.25 0.37 0.25 0.6c0 0.25-0.08 0.46-0.24 0.62l-1.46 1.43C20.87 9.92 20.67 10 20.45 10c-0.23 0-0.41-0.08-0.56-0.24s-0.23-0.36-0.23-0.6zm2.26 5.46c0-0.24 0.08-0.44 0.24-0.62c0.16-0.16 0.35-0.24 0.57-0.24h2.02c0.23 0 0.43 0.09 0.6 0.26c0.17 0.17 0.26 0.37 0.26 0.6s-0.09 0.43-0.26 0.6c-0.17 0.17-0.37 0.25-0.6 0.25h-2.02c-0.23 0-0.43-0.08-0.58-0.25s-0.23-0.36-0.23-0.6z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M1.52 16.9c0 1.11 0.33 2.09 0.98 2.96s1.51 1.46 2.57 1.78l-0.64 1.7c-0.04 0.14 0 0.21 0.14 0.21H6.7L5.45 27.5h0.29l4.17-5.39c0.04-0.04 0.04-0.09 0.01-0.14c-0.02-0.05-0.07-0.07-0.14-0.07H7.61l2.47-4.63c0.07-0.14 0.02-0.22-0.14-0.22H7c-0.09 0-0.17 0.05-0.23 0.14L5.7 20.07c-0.71-0.18-1.3-0.57-1.77-1.16s-0.7-1.26-0.7-2.01c0-0.83 0.28-1.55 0.85-2.17s1.27-0.97 2.1-1.07L6.7 13.6c0.13 0 0.2-0.06 0.2-0.18l0.06-0.51c0.11-1.08 0.57-1.99 1.38-2.72c0.81-0.73 1.77-1.1 2.86-1.1c1.09 0 2.04 0.37 2.85 1.1s1.28 1.64 1.4 2.72l0.06 0.58c0 0.11 0.06 0.17 0.18 0.17h1.61c0.91 0 1.68 0.32 2.32 0.95c0.64 0.63 0.96 1.39 0.96 2.29c0 0.85-0.3 1.59-0.89 2.21c-0.59 0.62-1.32 0.97-2.19 1.04c-0.13 0-0.2 0.06-0.2 0.18v1.37c0 0.11 0.07 0.17 0.2 0.17c1.33-0.04 2.46-0.55 3.39-1.51c0.93-0.96 1.39-2.11 1.39-3.45c0-0.74-0.14-1.41-0.43-2.01c0.79-0.96 1.18-2.06 1.18-3.32c0-0.94-0.24-1.81-0.71-2.62s-1.11-1.45-1.92-1.92c-0.81-0.47-1.68-0.71-2.62-0.71c-1.54 0-2.84 0.58-3.88 1.73c-0.81-0.43-1.71-0.65-2.7-0.65c-1.41 0-2.67 0.44-3.76 1.31s-1.79 1.99-2.1 3.36c-1.11 0.26-2.02 0.83-2.73 1.73s-1.09 1.94-1.09 3.09zm8.09 9.58c-0.01 0.15 0.03 0.3 0.14 0.44s0.26 0.25 0.46 0.33c0.07 0.02 0.14 0.03 0.21 0.03c0.17 0 0.34-0.05 0.51-0.15s0.28-0.26 0.34-0.47l2.29-8.57c0.06-0.23 0.04-0.45-0.07-0.64c-0.11-0.2-0.27-0.33-0.49-0.4c-0.23-0.07-0.45-0.05-0.65 0.07c-0.2 0.11-0.34 0.28-0.4 0.51l-2.31 8.6c-0.02 0.07-0.03 0.16-0.03 0.25zM9.94 4.63c0 0.24 0.08 0.43 0.25 0.59l0.64 0.66C11 6.05 11.2 6.13 11.44 6.14c0.24 0 0.43-0.08 0.57-0.26c0.19-0.15 0.28-0.35 0.28-0.6c0-0.24-0.08-0.43-0.25-0.59l-0.63-0.66c-0.17-0.16-0.38-0.24-0.61-0.24c-0.25 0-0.46 0.08-0.62 0.24c-0.16 0.16-0.24 0.36-0.24 0.6zm3.83 18.8c0 0.12 0.04 0.24 0.11 0.38c0.13 0.2 0.29 0.34 0.5 0.43c0.07 0.03 0.17 0.05 0.3 0.05c0.15 0 0.26-0.02 0.33-0.06c0.2-0.08 0.34-0.28 0.41-0.58l1.49-5.55c0.06-0.24 0.04-0.45-0.07-0.65c-0.11-0.19-0.28-0.32-0.51-0.39c-0.23-0.07-0.45-0.05-0.64 0.07c-0.2 0.11-0.33 0.28-0.39 0.51l-1.5 5.56c0 0.02-0.01 0.06-0.02 0.11c-0.01 0.06-0.01 0.09-0.01 0.12zM15.3 9.04c0.67-0.64 1.49-0.97 2.48-0.97c0.97 0 1.81 0.34 2.5 1.02c0.69 0.68 1.04 1.51 1.04 2.48c0 0.62-0.17 1.24-0.52 1.85c-0.99-0.98-2.16-1.47-3.5-1.47h-0.31c-0.31-1.17-0.88-2.14-1.69-2.91zm1.61-5.25c0 0.23 0.09 0.43 0.26 0.6s0.37 0.26 0.6 0.26c0.24 0 0.43-0.08 0.59-0.25c0.16-0.17 0.23-0.37 0.23-0.61V1.73c0-0.24-0.08-0.44-0.23-0.61s-0.35-0.25-0.59-0.25c-0.23 0-0.43 0.08-0.6 0.25s-0.26 0.37-0.26 0.61v2.06zm5.53 2.28c0 0.24 0.09 0.44 0.26 0.6c0.14 0.17 0.33 0.25 0.57 0.25s0.44-0.08 0.6-0.25l1.44-1.45c0.17-0.16 0.26-0.35 0.26-0.59s-0.08-0.44-0.25-0.61c-0.17-0.17-0.37-0.25-0.61-0.25c-0.22 0-0.41 0.09-0.57 0.26L22.7 5.47c-0.17 0.16-0.26 0.36-0.26 0.6zm0.81 11.86c0 0.22 0.08 0.42 0.24 0.6l0.66 0.63c0.12 0.14 0.31 0.23 0.54 0.24l0.01 0.01h0.05h0.05c0.19 0 0.36-0.09 0.53-0.26c0.17-0.16 0.26-0.36 0.26-0.6c0-0.23-0.09-0.43-0.26-0.61l-0.65-0.61c-0.16-0.18-0.36-0.27-0.58-0.27c-0.23 0-0.43 0.08-0.6 0.25c-0.17 0.18-0.25 0.39-0.25 0.62zm1.45-6.35c0 0.23 0.09 0.43 0.27 0.6c0.18 0.18 0.38 0.27 0.61 0.27h2.03c0.23 0 0.43-0.09 0.6-0.26s0.26-0.38 0.26-0.61c0-0.23-0.08-0.43-0.25-0.59c-0.17-0.16-0.37-0.24-0.61-0.24h-2.03c-0.25 0-0.46 0.08-0.63 0.24c-0.17 0.16-0.25 0.36-0.25 0.59z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15,13V5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v8c-1.21,0.91 -2,2.37 -2,4c0,2.76 2.24,5 5,5s5,-2.24 5,-5C17,15.37 16.21,13.91 15,13zM11,11V5c0,-0.55 0.45,-1 1,-1s1,0.45 1,1v1h-1v1h1v1v1h-1v1h1v1H11z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,3H4C2.9,3 2,3.9 2,5v11c0,1.1 0.9,2 2,2h3l-1,1v2h12v-2l-1,-1h3c1.1,0 2,-0.9 2,-2V5C22,3.9 21.1,3 20,3zM20,16H4V5h16V16z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M7.91 14.48c0-0.96 0.19-1.87 0.56-2.75s0.88-1.63 1.51-2.26c0.63-0.63 1.39-1.14 2.27-1.52c0.88-0.38 1.8-0.57 2.75-0.57h1.14c0.16 0.04 0.23 0.14 0.23 0.28l0.05 0.88c0.04 1.27 0.49 2.35 1.37 3.24c0.88 0.89 1.94 1.37 3.19 1.42l0.82 0.07c0.16 0 0.24 0.08 0.24 0.23v0.98c0.01 1.28-0.3 2.47-0.93 3.56c-0.63 1.09-1.48 1.95-2.57 2.59c-1.08 0.63-2.27 0.95-3.55 0.95c-0.97 0-1.9-0.19-2.78-0.56s-1.63-0.88-2.26-1.51c-0.63-0.63-1.13-1.39-1.5-2.26c-0.35-0.88-0.54-1.8-0.54-2.77zm1.83 0c0 0.76 0.15 1.48 0.45 2.16c0.3 0.67 0.7 1.24 1.19 1.7c0.49 0.46 1.05 0.82 1.69 1.08c0.63 0.27 1.28 0.4 1.94 0.4c0.58 0 1.17-0.11 1.76-0.34c0.59-0.23 1.14-0.55 1.65-0.96c0.51-0.41 0.94-0.93 1.31-1.57c0.37-0.64 0.6-1.33 0.71-2.09c-1.63-0.34-2.94-1.04-3.92-2.1s-1.55-2.3-1.7-3.74C13.86 9.08 13 9.37 12.21 9.9c-0.78 0.53-1.39 1.2-1.82 2.02c-0.43 0.82-0.65 1.67-0.65 2.56z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M4.3 16.89c0 0.89 0.22 1.72 0.66 2.48s1.03 1.36 1.79 1.8s1.58 0.67 2.48 0.67h10.81c0.89 0 1.72-0.22 2.48-0.67s1.36-1.05 1.8-1.8c0.44-0.76 0.67-1.59 0.67-2.48c0-0.64-0.14-1.3-0.42-2c0.76-0.93 1.13-2.03 1.13-3.3c0-0.95-0.23-1.83-0.69-2.63c-0.46-0.8-1.1-1.44-1.9-1.91c-0.8-0.47-1.68-0.7-2.63-0.7c-1.49 0-2.78 0.58-3.87 1.74c-0.76-0.43-1.66-0.65-2.69-0.65c-1.41 0-2.65 0.43-3.73 1.3s-1.77 1.98-2.08 3.35c-1.12 0.25-2.03 0.82-2.74 1.72c-0.71 0.9-1.07 1.93-1.07 3.08zm1.71 0c0-0.83 0.28-1.55 0.83-2.16c0.56-0.61 1.26-0.96 2.1-1.06l0.68-0.03l0.07-0.72c0.14-1.08 0.61-1.99 1.41-2.71c0.8-0.73 1.74-1.09 2.81-1.09c1.09 0 2.05 0.37 2.86 1.1s1.27 1.63 1.38 2.71l0.1 0.75h1.78c0.88 0 1.64 0.32 2.28 0.95s0.96 1.39 0.96 2.26c0 0.9-0.32 1.67-0.95 2.32s-1.4 0.97-2.28 0.97H9.23c-0.87 0-1.62-0.32-2.26-0.97c-0.64-0.66-0.96-1.43-0.96-2.32zm12.03-7.83c0.69-0.66 1.5-0.99 2.44-0.99c0.99 0 1.83 0.34 2.52 1.03c0.69 0.68 1.04 1.52 1.04 2.51c0 0.62-0.17 1.23-0.52 1.84C22.56 12.48 21.4 12 20.03 12h-0.31c-0.27-1.11-0.83-2.09-1.68-2.94z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M2.66 20.92c0 0.23 0.08 0.42 0.25 0.57c0.17 0.16 0.38 0.23 0.62 0.23h18.61c0.24 0 0.44-0.08 0.6-0.23c0.17-0.16 0.25-0.35 0.25-0.57c0-0.24-0.08-0.45-0.24-0.61c-0.16-0.17-0.37-0.25-0.61-0.25H3.53c-0.24 0-0.44 0.08-0.61 0.25c-0.17 0.17-0.26 0.38-0.26 0.61zm2.61-3.11c0 0.24 0.09 0.43 0.26 0.59c0.14 0.18 0.33 0.27 0.59 0.27h18.61c0.23 0 0.42-0.08 0.58-0.25s0.23-0.37 0.23-0.61c0-0.23-0.08-0.43-0.23-0.58c-0.15-0.15-0.35-0.23-0.58-0.23H6.12c-0.24 0-0.44 0.08-0.6 0.23c-0.17 0.16-0.25 0.35-0.25 0.58zm0.15-2.42v-0.05c-0.04 0.15 0 0.22 0.12 0.22h1.44c0.06 0 0.12-0.05 0.19-0.15c0.24-0.52 0.59-0.94 1.06-1.27c0.47-0.33 0.99-0.52 1.55-0.56l0.53-0.08c0.12 0 0.19-0.06 0.19-0.18l0.06-0.5c0.11-1.08 0.56-1.97 1.36-2.7c0.8-0.72 1.75-1.08 2.84-1.08c1.07 0 2.02 0.36 2.82 1.07s1.27 1.6 1.38 2.67l0.07 0.57c0 0.12 0.07 0.18 0.21 0.18h1.58c0.64 0 1.23 0.17 1.75 0.52c0.52 0.34 0.92 0.8 1.17 1.36c0.07 0.1 0.14 0.15 0.22 0.15h1.42c0.12 0 0.17-0.07 0.15-0.22c-0.22-0.56-0.37-0.91-0.46-1.06c0.72-0.65 1.23-1.51 1.5-2.57l0.17-0.66c0.03-0.06 0.02-0.12-0.01-0.16c-0.03-0.04-0.07-0.07-0.12-0.07l-0.62-0.22c-0.89-0.26-1.57-0.78-2.04-1.58s-0.59-1.65-0.37-2.56l0.13-0.58c0.05-0.09 0.01-0.17-0.13-0.23l-0.84-0.23c-1.09-0.27-2.17-0.18-3.22 0.26c-1.05 0.44-1.87 1.15-2.47 2.12c-0.79-0.31-1.56-0.46-2.29-0.46c-1.39 0-2.62 0.44-3.71 1.31S9.27 10.64 8.95 12c-0.84 0.2-1.58 0.6-2.22 1.21s-1.06 1.34-1.31 2.18zM7 23.97c0 0.24 0.09 0.43 0.26 0.59c0.17 0.18 0.37 0.27 0.59 0.27H26.5c0.23 0 0.43-0.08 0.59-0.25c0.16-0.17 0.24-0.37 0.24-0.61c0-0.23-0.08-0.42-0.24-0.58s-0.36-0.23-0.59-0.23H7.86c-0.24 0-0.44 0.08-0.6 0.23C7.09 23.55 7 23.74 7 23.97zM18.51 8.7c0.35-0.57 0.82-1.02 1.41-1.33c0.59-0.31 1.21-0.44 1.87-0.38c-0.07 1.04 0.17 2.02 0.7 2.93c0.54 0.91 1.28 1.58 2.22 2.02c-0.15 0.35-0.4 0.71-0.75 1.07c-0.92-0.76-1.97-1.13-3.14-1.13H20.5c-0.32-1.31-0.98-2.37-1.99-3.18z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M4.19 16.91c0 0.87 0.21 1.68 0.64 2.43c0.42 0.75 1.01 1.35 1.74 1.8c0.73 0.46 1.54 0.7 2.43 0.72c0.12 0 0.19-0.06 0.19-0.17v-1.34c0-0.12-0.06-0.18-0.19-0.18c-0.86-0.04-1.59-0.39-2.19-1.03S5.9 17.75 5.9 16.9c0-0.85 0.28-1.59 0.85-2.21c0.57-0.62 1.27-0.97 2.11-1.04l0.52-0.07c0.13 0 0.2-0.06 0.2-0.17l0.07-0.52c0.11-1.1 0.57-2.02 1.38-2.76s1.77-1.11 2.87-1.11c1.09 0 2.04 0.37 2.86 1.1c0.82 0.73 1.28 1.65 1.4 2.73l0.08 0.58c0 0.11 0.06 0.17 0.18 0.17h1.62c0.9 0 1.67 0.32 2.32 0.97c0.65 0.65 0.97 1.42 0.97 2.32c0 0.85-0.3 1.6-0.91 2.24c-0.61 0.64-1.33 0.98-2.18 1.03c-0.13 0-0.2 0.06-0.2 0.18v1.34c0 0.11 0.07 0.17 0.2 0.17c0.88-0.02 1.69-0.26 2.42-0.72c0.73-0.45 1.31-1.05 1.73-1.8s0.63-1.56 0.63-2.43c0-0.73-0.14-1.4-0.42-2.02c0.81-0.99 1.21-2.12 1.21-3.37c0-0.96-0.24-1.84-0.71-2.65s-1.11-1.45-1.92-1.92c-0.81-0.47-1.69-0.71-2.64-0.71c-0.74 0-1.46 0.15-2.15 0.46c-0.68 0.34-1.27 0.76-1.77 1.31c-0.88-0.43-1.78-0.65-2.71-0.65c-1.42 0-2.68 0.44-3.78 1.32s-1.81 2-2.12 3.37c-1.12 0.29-2.04 0.88-2.76 1.78c-0.71 0.9-1.06 1.93-1.06 3.09zm5.33 7.07c0 0.17 0.05 0.34 0.16 0.51c0.11 0.17 0.27 0.28 0.47 0.35c0.23 0.07 0.44 0.06 0.64-0.04c0.19-0.09 0.32-0.28 0.39-0.56l0.14-0.61c0.05-0.23 0.02-0.44-0.09-0.63c-0.11-0.2-0.28-0.33-0.52-0.4c-0.22-0.07-0.44-0.04-0.64 0.08s-0.34 0.3-0.4 0.53L9.53 23.8c0 0.03-0.01 0.09-0.01 0.18zm0.76-2.9c0 0.21 0.08 0.4 0.25 0.57c0.16 0.17 0.34 0.25 0.56 0.25c0.24 0 0.44-0.08 0.6-0.24c0.16-0.16 0.24-0.35 0.24-0.59c0-0.23-0.08-0.43-0.24-0.59c-0.16-0.16-0.36-0.24-0.6-0.24c-0.23 0-0.42 0.08-0.58 0.23c-0.15 0.18-0.23 0.38-0.23 0.61zm0.61-2.27c-0.01 0.16 0.03 0.31 0.14 0.45c0.1 0.15 0.26 0.25 0.48 0.32c0.21 0.06 0.41 0.04 0.62-0.07c0.21-0.11 0.34-0.28 0.41-0.51l0.28-0.9c0.07-0.24 0.05-0.46-0.07-0.65c-0.12-0.19-0.3-0.32-0.54-0.39c-0.22-0.07-0.43-0.05-0.63 0.07c-0.2 0.11-0.34 0.28-0.41 0.5l-0.24 0.92c0 0.02-0.01 0.06-0.02 0.12c-0.01 0.05-0.02 0.1-0.02 0.14zm1.16 8.29c0 0.18 0.05 0.34 0.15 0.5c0.1 0.16 0.26 0.27 0.48 0.33c0.08 0.02 0.17 0.03 0.25 0.03c0.43 0 0.69-0.2 0.79-0.61l0.14-0.59c0.06-0.26 0.03-0.48-0.08-0.68s-0.29-0.32-0.52-0.37c-0.21-0.07-0.42-0.05-0.63 0.07c-0.21 0.12-0.34 0.29-0.41 0.51l-0.14 0.59c-0.02 0.09-0.03 0.16-0.03 0.22zm0.78-2.9c0 0.22 0.08 0.41 0.25 0.58c0.16 0.16 0.35 0.24 0.57 0.24c0.24 0 0.43-0.08 0.59-0.23c0.16-0.16 0.23-0.35 0.23-0.59c0-0.23-0.08-0.42-0.23-0.58c-0.16-0.16-0.35-0.23-0.59-0.23s-0.43 0.08-0.59 0.23c-0.15 0.15-0.23 0.35-0.23 0.58zm0.63-2.27c-0.01 0.15 0.03 0.31 0.13 0.47s0.25 0.26 0.45 0.3c0.23 0.06 0.44 0.04 0.64-0.06s0.33-0.29 0.41-0.56l0.27-0.9c0.07-0.22 0.05-0.43-0.07-0.63c-0.12-0.2-0.29-0.33-0.53-0.4c-0.22-0.07-0.43-0.04-0.64 0.08c-0.21 0.12-0.34 0.3-0.41 0.53l-0.23 0.9c-0.01 0.08-0.02 0.17-0.02 0.27zm2.75 2.15c0 0.16 0.05 0.32 0.15 0.48s0.26 0.27 0.46 0.33c0.03 0 0.08 0.01 0.14 0.02s0.1 0.02 0.14 0.02c0.41 0 0.66-0.22 0.76-0.66l0.14-0.6c0.07-0.21 0.05-0.42-0.07-0.63c-0.11-0.21-0.28-0.34-0.51-0.41c-0.25-0.06-0.48-0.04-0.68 0.08c-0.2 0.12-0.34 0.29-0.41 0.53l-0.09 0.59c0 0.02-0.01 0.07-0.02 0.12s-0.01 0.09-0.01 0.13zm0.74-2.96c0 0.22 0.08 0.42 0.25 0.57c0.15 0.16 0.34 0.24 0.57 0.24c0.24 0 0.43-0.08 0.59-0.23c0.16-0.16 0.23-0.35 0.23-0.58c0-0.24-0.08-0.43-0.23-0.59c-0.16-0.16-0.35-0.23-0.59-0.23s-0.43 0.08-0.59 0.23s-0.23 0.35-0.23 0.59zm0.61-2.31c0 0.17 0.05 0.33 0.16 0.48s0.27 0.26 0.49 0.32c0.02 0 0.06 0.01 0.12 0.02s0.11 0.02 0.14 0.02c0.1 0 0.22-0.03 0.36-0.09c0.21-0.11 0.35-0.29 0.41-0.52l0.24-0.9c0.06-0.23 0.04-0.44-0.07-0.63c-0.11-0.2-0.28-0.33-0.51-0.4c-0.23-0.07-0.44-0.05-0.64 0.06c-0.19 0.11-0.32 0.27-0.39 0.51l-0.28 0.91c0 0.02-0.01 0.06-0.02 0.12c0 0.03-0.01 0.07-0.01 0.1zm0.47-9.8c0.69-0.69 1.53-1.04 2.51-1.04c0.98 0 1.82 0.35 2.51 1.05c0.69 0.7 1.04 1.54 1.04 2.52c0 0.67-0.17 1.28-0.51 1.85c-0.96-0.96-2.14-1.44-3.54-1.44h-0.32c-0.28-1.18-0.84-2.16-1.69-2.94z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M4.26 16.93c0 0.66 0.12 1.28 0.38 1.88s0.59 1.11 1.02 1.55c0.43 0.43 0.94 0.79 1.53 1.05s1.21 0.42 1.87 0.45c0.11 0 0.17-0.06 0.17-0.17v-1.34c0-0.11-0.06-0.17-0.17-0.17c-0.87-0.06-1.6-0.41-2.19-1.03c-0.59-0.62-0.89-1.37-0.89-2.22c0-0.84 0.28-1.57 0.85-2.19c0.57-0.62 1.26-0.97 2.1-1.04l0.53-0.06c0.13 0 0.2-0.06 0.2-0.19l0.06-0.51c0.11-1.09 0.56-1.99 1.37-2.71s1.76-1.08 2.86-1.08c1.09 0 2.05 0.36 2.85 1.07c0.81 0.72 1.27 1.61 1.38 2.69l0.07 0.58c0 0.12 0.06 0.18 0.19 0.18h1.6c0.9 0 1.67 0.32 2.32 0.96s0.97 1.4 0.97 2.29c0 0.86-0.3 1.6-0.89 2.22c-0.59 0.62-1.33 0.97-2.19 1.03c-0.13 0-0.2 0.06-0.2 0.17v1.34c0 0.11 0.07 0.17 0.2 0.17c1.34-0.06 2.47-0.57 3.39-1.51c0.92-0.95 1.38-2.09 1.38-3.42c0-0.72-0.14-1.38-0.42-1.99c0.78-0.94 1.17-2.06 1.17-3.36c0-0.94-0.23-1.81-0.7-2.62s-1.11-1.45-1.91-1.92s-1.68-0.71-2.62-0.71c-1.56 0-2.85 0.58-3.88 1.73c-0.88-0.43-1.78-0.65-2.7-0.65c-1.41 0-2.66 0.44-3.75 1.32s-1.79 2-2.1 3.38c-1.1 0.26-2.01 0.83-2.73 1.73c-0.76 0.93-1.12 1.95-1.12 3.1zm5.49 6.68c0 0.4 0.22 0.66 0.65 0.78c0.21 0.07 0.42 0.05 0.63-0.06c0.21-0.11 0.35-0.28 0.41-0.5l1.5-5.73c0.06-0.22 0.03-0.43-0.09-0.63s-0.3-0.33-0.54-0.4c-0.22-0.07-0.43-0.05-0.63 0.07s-0.33 0.29-0.39 0.52l-1.5 5.7c-0.03 0.11-0.04 0.19-0.04 0.25zm2.59 3.05c0 0.12 0.03 0.24 0.08 0.37c0.1 0.21 0.27 0.35 0.51 0.43c0.02 0 0.06 0 0.1 0.01s0.08 0.01 0.11 0.01h0.09c0.43 0 0.68-0.22 0.76-0.66l2.3-8.74c0.07-0.22 0.05-0.43-0.06-0.63s-0.28-0.33-0.5-0.4c-0.24-0.07-0.47-0.05-0.68 0.07s-0.33 0.29-0.38 0.52l-2.31 8.75c-0.01 0.1-0.02 0.19-0.02 0.27zm4.16-3.06c0 0.16 0.05 0.31 0.16 0.47c0.11 0.16 0.26 0.26 0.45 0.32c0.06 0.02 0.14 0.03 0.23 0.03c0.17 0 0.33-0.05 0.49-0.14c0.16-0.09 0.26-0.24 0.32-0.45l1.5-5.73c0.08-0.21 0.05-0.41-0.07-0.62c-0.12-0.21-0.29-0.34-0.52-0.41c-0.24-0.07-0.46-0.05-0.66 0.07c-0.2 0.12-0.32 0.29-0.36 0.52l-1.5 5.7c-0.03 0.11-0.04 0.19-0.04 0.24zm1.53-14.52c0.67-0.67 1.49-1 2.48-1c0.98 0 1.81 0.34 2.49 1.02c0.69 0.68 1.03 1.51 1.03 2.48c0 0.63-0.17 1.24-0.52 1.85C22.56 12.48 21.4 12 20.02 12h-0.31c-0.28-1.17-0.84-2.14-1.68-2.92z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M4.25 16.92c0 0.66 0.12 1.28 0.38 1.88c0.25 0.6 0.59 1.11 1.02 1.55c0.43 0.44 0.94 0.79 1.53 1.06s1.22 0.42 1.88 0.45c0.12 0 0.18-0.06 0.18-0.17v-1.34c0-0.11-0.06-0.17-0.18-0.17c-0.85-0.04-1.58-0.39-2.18-1.03s-0.9-1.39-0.9-2.24s0.28-1.58 0.84-2.2s1.26-0.96 2.1-1.03l0.53-0.07c0.1 0 0.15-0.05 0.15-0.15l0.08-0.53c0.11-1.09 0.58-2 1.4-2.73s1.78-1.09 2.88-1.09c1.09 0 2.04 0.36 2.85 1.08c0.82 0.72 1.28 1.62 1.4 2.7l0.07 0.57c0 0.12 0.06 0.19 0.18 0.19h1.62c0.89 0 1.65 0.32 2.29 0.96c0.64 0.64 0.96 1.41 0.96 2.31c0 0.85-0.3 1.6-0.89 2.24s-1.32 0.98-2.17 1.03c-0.13 0-0.19 0.06-0.19 0.17v1.34c0 0.11 0.06 0.17 0.19 0.17c1.34-0.06 2.47-0.57 3.39-1.52c0.93-0.95 1.39-2.09 1.39-3.42c0-0.64-0.14-1.31-0.41-2c0.76-0.99 1.13-2.09 1.13-3.29c0-0.94-0.24-1.82-0.71-2.63s-1.11-1.45-1.92-1.92c-0.81-0.47-1.68-0.71-2.62-0.71c-1.53 0-2.82 0.56-3.86 1.67c-0.87-0.43-1.77-0.65-2.7-0.65c-1.42 0-2.68 0.44-3.77 1.32s-1.79 2.01-2.1 3.38c-1.13 0.26-2.05 0.84-2.76 1.72s-1.08 1.92-1.08 3.1zm5.39 6.75c0 0.17 0.05 0.33 0.15 0.48c0.1 0.15 0.26 0.27 0.48 0.34c0.11 0.06 0.24 0.08 0.37 0.07c0.13-0.01 0.27-0.08 0.4-0.2c0.13-0.12 0.23-0.28 0.28-0.48l0.28-1.01c0.06-0.25 0.04-0.48-0.08-0.67c-0.12-0.2-0.29-0.32-0.53-0.37c-0.21-0.07-0.42-0.05-0.63 0.07s-0.34 0.28-0.41 0.5l-0.28 1.04c-0.02 0.09-0.03 0.17-0.03 0.23zm1.31-4.77c0.01 0.19 0.06 0.37 0.17 0.52s0.27 0.25 0.48 0.28c0.18 0.03 0.27 0.05 0.3 0.05c0.38 0 0.63-0.22 0.76-0.66l0.28-1c0.06-0.23 0.04-0.45-0.08-0.66c-0.12-0.21-0.29-0.35-0.53-0.42c-0.22-0.06-0.44-0.04-0.64 0.08s-0.33 0.29-0.4 0.52l-0.3 1.05c-0.02 0.12-0.04 0.2-0.04 0.24zm1.24 7.9c0 0.18 0.05 0.34 0.15 0.5c0.1 0.16 0.26 0.27 0.48 0.33c0.14 0.03 0.23 0.05 0.28 0.05c0.09 0 0.21-0.03 0.38-0.1c0.17-0.08 0.3-0.27 0.38-0.55l0.3-1.01c0.06-0.25 0.03-0.48-0.08-0.68c-0.12-0.2-0.29-0.33-0.52-0.37c-0.22-0.07-0.43-0.05-0.64 0.07c-0.21 0.12-0.35 0.29-0.42 0.51l-0.28 1.04c-0.02 0.08-0.03 0.15-0.03 0.21zm1.33-4.8c0 0.17 0.05 0.33 0.16 0.49c0.11 0.16 0.27 0.27 0.49 0.33c0.22 0.07 0.44 0.05 0.63-0.05c0.2-0.1 0.33-0.29 0.41-0.56l0.28-1.01c0.07-0.25 0.05-0.47-0.07-0.67c-0.12-0.19-0.29-0.31-0.53-0.36c-0.22-0.08-0.43-0.05-0.64 0.06s-0.34 0.29-0.41 0.51l-0.28 1.04c-0.02 0.1-0.04 0.17-0.04 0.22zm2.85 1.75c-0.01 0.16 0.03 0.31 0.14 0.46s0.26 0.26 0.46 0.33l0.25 0.03c0.11 0.01 0.24-0.02 0.38-0.07c0.21-0.08 0.35-0.26 0.42-0.54l0.28-1.05c0.07-0.23 0.05-0.45-0.07-0.64c-0.12-0.2-0.29-0.33-0.51-0.4c-0.25-0.06-0.47-0.03-0.67 0.08s-0.32 0.3-0.36 0.53l-0.29 1c-0.02 0.17-0.03 0.26-0.03 0.27zm1.35-4.8c0 0.17 0.05 0.34 0.16 0.5c0.11 0.16 0.27 0.26 0.48 0.3l0.25 0.03c0.43 0 0.7-0.21 0.81-0.62l0.28-1.03c0.06-0.25 0.03-0.48-0.08-0.68s-0.3-0.32-0.53-0.37c-0.23-0.07-0.45-0.05-0.64 0.07c-0.2 0.12-0.33 0.29-0.39 0.53l-0.3 1.02c-0.02 0.12-0.04 0.2-0.04 0.25zm0.34-9.9c0.67-0.64 1.48-0.97 2.45-0.97c0.98 0 1.81 0.35 2.49 1.05c0.69 0.7 1.03 1.53 1.03 2.51c0 0.64-0.16 1.23-0.48 1.77c-0.96-0.96-2.12-1.44-3.49-1.44h-0.32c-0.24-1.1-0.8-2.07-1.68-2.92z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M4.23 16.89c0 1.33 0.47 2.48 1.4 3.44s2.07 1.47 3.4 1.53c0.12 0 0.18-0.06 0.18-0.17v-1.34c0-0.11-0.06-0.17-0.18-0.17c-0.86-0.05-1.59-0.39-2.19-1.03c-0.6-0.64-0.9-1.39-0.9-2.26c0-0.83 0.28-1.55 0.85-2.17c0.57-0.61 1.27-0.97 2.1-1.07l0.53-0.04c0.13 0 0.2-0.06 0.2-0.18l0.07-0.54c0.11-1.08 0.56-1.99 1.37-2.72c0.81-0.73 1.76-1.1 2.85-1.1s2.04 0.37 2.86 1.1c0.82 0.73 1.28 1.64 1.4 2.72l0.08 0.57c0 0.12 0.06 0.19 0.17 0.19h1.62c0.91 0 1.68 0.32 2.33 0.95c0.64 0.63 0.97 1.4 0.97 2.28c0 0.86-0.3 1.61-0.91 2.25c-0.61 0.64-1.34 0.99-2.19 1.04c-0.12 0-0.19 0.06-0.19 0.17v1.34c0 0.11 0.06 0.17 0.19 0.17c1.34-0.04 2.47-0.55 3.4-1.51c0.93-0.97 1.39-2.12 1.39-3.45c0-0.71-0.14-1.38-0.43-2.01c0.79-0.96 1.18-2.07 1.18-3.32c0-0.95-0.24-1.83-0.71-2.64S23.96 7.47 23.15 7s-1.68-0.7-2.62-0.7c-1.55 0-2.85 0.58-3.89 1.73c-0.81-0.43-1.71-0.65-2.71-0.65c-1.41 0-2.67 0.44-3.76 1.32s-1.8 2-2.11 3.36c-1.11 0.26-2.02 0.84-2.74 1.74c-0.73 0.91-1.09 1.94-1.09 3.09zm6.39 4.12c0 0.22 0.08 0.41 0.24 0.57c0.17 0.17 0.36 0.25 0.58 0.25c0.23 0 0.43-0.08 0.59-0.23s0.24-0.35 0.24-0.59s-0.08-0.43-0.23-0.59c-0.16-0.16-0.35-0.23-0.59-0.23s-0.43 0.08-0.59 0.23c-0.16 0.15-0.24 0.35-0.24 0.59zm0 3.63c0 0.24 0.08 0.43 0.24 0.58c0.16 0.16 0.36 0.24 0.58 0.24c0.24 0 0.43-0.08 0.59-0.23c0.16-0.16 0.23-0.35 0.23-0.59s-0.08-0.44-0.24-0.6s-0.35-0.25-0.59-0.25c-0.23 0-0.43 0.08-0.59 0.25s-0.22 0.36-0.22 0.6zm3.19-1.74c0 0.23 0.08 0.44 0.25 0.61s0.36 0.27 0.58 0.27c0.23 0 0.43-0.09 0.6-0.26c0.17-0.17 0.25-0.38 0.25-0.62c0-0.22-0.08-0.41-0.25-0.58c-0.17-0.17-0.37-0.25-0.6-0.25c-0.22 0-0.41 0.08-0.58 0.25s-0.25 0.36-0.25 0.58zm0-3.59c0 0.23 0.08 0.42 0.24 0.58s0.36 0.24 0.59 0.24c0.24 0 0.44-0.08 0.6-0.24s0.25-0.35 0.25-0.59s-0.08-0.43-0.25-0.6s-0.37-0.25-0.6-0.25c-0.23 0-0.42 0.08-0.59 0.25s-0.24 0.38-0.24 0.61zm0 7.27c0 0.23 0.08 0.43 0.25 0.6c0.17 0.17 0.36 0.25 0.59 0.25c0.23 0 0.43-0.08 0.6-0.25c0.17-0.17 0.25-0.37 0.25-0.6c0-0.22-0.08-0.41-0.25-0.58c-0.17-0.17-0.37-0.25-0.6-0.25c-0.22 0-0.41 0.08-0.58 0.25c-0.17 0.17-0.26 0.36-0.26 0.58zm3.24-5.57c0 0.21 0.08 0.4 0.24 0.57c0.17 0.17 0.37 0.25 0.6 0.25c0.23 0 0.43-0.08 0.59-0.23c0.16-0.16 0.24-0.35 0.24-0.59s-0.08-0.43-0.23-0.59c-0.16-0.16-0.35-0.23-0.59-0.23s-0.44 0.08-0.6 0.23c-0.17 0.15-0.25 0.35-0.25 0.59zm0 3.63c0 0.22 0.08 0.42 0.24 0.58s0.36 0.24 0.6 0.24s0.43-0.08 0.59-0.23c0.16-0.16 0.23-0.35 0.23-0.59s-0.08-0.44-0.24-0.6c-0.16-0.17-0.35-0.25-0.59-0.25c-0.23 0-0.43 0.08-0.6 0.25s-0.23 0.36-0.23 0.6zm0.98-15.62c0.68-0.68 1.5-1.01 2.48-1.01s1.81 0.35 2.5 1.04s1.03 1.53 1.03 2.52c0 0.59-0.17 1.2-0.51 1.84c-0.96-0.96-2.13-1.44-3.5-1.44h-0.31c-0.28-1.17-0.85-2.15-1.69-2.95z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M4.22 16.89c0 1.33 0.46 2.48 1.39 3.44s2.06 1.47 3.41 1.53c0.11 0 0.17-0.06 0.17-0.17v-1.37c0-0.13-0.06-0.19-0.17-0.19c-0.88-0.06-1.61-0.41-2.21-1.03c-0.6-0.62-0.9-1.36-0.9-2.21c0-0.84 0.28-1.58 0.85-2.2c0.57-0.62 1.27-0.97 2.11-1.04l0.52-0.07c0.12 0 0.19-0.06 0.19-0.19l0.07-0.5c0.11-1.08 0.57-1.99 1.38-2.72s1.77-1.1 2.87-1.1c1.09 0 2.05 0.36 2.86 1.09c0.81 0.73 1.28 1.64 1.4 2.72l0.06 0.57c0 0.12 0.06 0.18 0.19 0.18h1.6c0.91 0 1.68 0.32 2.32 0.95c0.64 0.63 0.97 1.4 0.97 2.28c0 0.85-0.3 1.59-0.89 2.21c-0.59 0.62-1.33 0.97-2.19 1.03c-0.14 0-0.21 0.06-0.21 0.19v1.37c0 0.11 0.07 0.17 0.21 0.17c1.33-0.04 2.46-0.55 3.39-1.51c0.93-0.97 1.39-2.12 1.39-3.45c0-0.74-0.14-1.41-0.43-2.01c0.79-0.96 1.18-2.07 1.18-3.36c0-0.94-0.24-1.82-0.71-2.63s-1.11-1.45-1.92-1.92c-0.81-0.47-1.68-0.71-2.62-0.71c-1.52 0-2.83 0.58-3.93 1.75c-0.83-0.38-1.72-0.59-2.67-0.59c-1.41 0-2.67 0.44-3.76 1.31s-1.8 2-2.1 3.37c-1.11 0.26-2.02 0.84-2.74 1.74c-0.72 0.89-1.08 1.92-1.08 3.07zm5.93 0.88c0 0.38 0.14 0.7 0.43 0.98c0.28 0.27 0.62 0.41 1.02 0.41s0.73-0.13 1-0.4s0.41-0.6 0.41-0.98c0-0.26-0.12-0.6-0.35-1.02c-0.23-0.42-0.45-0.76-0.66-1c-0.02-0.02-0.08-0.09-0.18-0.2c-0.1-0.11-0.17-0.19-0.21-0.24l-0.36 0.4c-0.28 0.3-0.53 0.65-0.75 1.05c-0.23 0.4-0.35 0.74-0.35 1zm2.99 3.99c0 0.63 0.23 1.18 0.69 1.64c0.46 0.46 1.01 0.69 1.65 0.69c0.64 0 1.2-0.23 1.66-0.69c0.46-0.46 0.69-1.01 0.69-1.64c0-0.27-0.08-0.59-0.23-0.97c-0.16-0.38-0.34-0.72-0.56-1.04c-0.46-0.59-0.89-1.09-1.29-1.49c-0.06-0.04-0.14-0.13-0.26-0.24L14.9 18.6c-0.44 0.42-0.85 0.95-1.21 1.56c-0.37 0.62-0.55 1.15-0.55 1.6zm1.48-6.7c0 0.27 0.09 0.49 0.28 0.67S15.33 16 15.61 16c0.26 0 0.48-0.09 0.66-0.27s0.27-0.4 0.27-0.67c0-0.41-0.31-0.94-0.93-1.61l-0.25 0.26c-0.19 0.2-0.36 0.43-0.51 0.7c-0.16 0.26-0.23 0.48-0.23 0.65zm3.39-6.04c0.67-0.66 1.5-0.99 2.48-0.99s1.81 0.34 2.49 1.02s1.03 1.51 1.03 2.48c0 0.63-0.17 1.25-0.51 1.85c-1-0.96-2.17-1.44-3.51-1.44H19.7c-0.28-1.18-0.85-2.15-1.69-2.92z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M4.28 16.89c0 1.11 0.33 2.11 0.99 2.98s1.52 1.46 2.56 1.75L7.19 23.3c-0.05 0.14 0 0.22 0.14 0.22h2.12l-1.04 4.19h0.28l3.97-5.62c0.04-0.04 0.04-0.09 0.01-0.14c-0.03-0.05-0.08-0.07-0.15-0.07h-2.17l2.47-4.61c0.07-0.14 0.02-0.22-0.14-0.22H9.74c-0.09 0-0.16 0.05-0.23 0.14l-1.07 2.87c-0.71-0.17-1.3-0.56-1.77-1.14s-0.7-1.26-0.7-2.02c0-0.83 0.28-1.55 0.84-2.16s1.26-0.96 2.1-1.06l0.53-0.04c0.12 0 0.18-0.06 0.18-0.18l0.07-0.53c0.07-0.71 0.3-1.35 0.69-1.94c0.39-0.58 0.9-1.04 1.52-1.37s1.29-0.5 2.01-0.5c1.08 0 2.03 0.37 2.84 1.1c0.81 0.73 1.27 1.63 1.39 2.71l0.08 0.56c0 0.12 0.06 0.19 0.17 0.19h1.62c0.89 0 1.65 0.32 2.3 0.96s0.97 1.39 0.97 2.27c0 0.86-0.3 1.61-0.9 2.25s-1.33 0.97-2.18 1.02c-0.13 0-0.2 0.06-0.2 0.18v1.34c0 0.11 0.07 0.17 0.2 0.17c0.87-0.02 1.67-0.26 2.4-0.72c0.73-0.45 1.31-1.05 1.72-1.8s0.63-1.56 0.63-2.43c0-0.73-0.14-1.4-0.42-2.01c0.78-0.93 1.17-2.03 1.17-3.31c0-0.71-0.14-1.38-0.42-2.02c-0.28-0.64-0.65-1.2-1.12-1.67c-0.47-0.47-1.02-0.84-1.67-1.12c-0.64-0.28-1.32-0.42-2.02-0.42c-1.54 0-2.83 0.58-3.86 1.73c-0.81-0.43-1.71-0.65-2.7-0.65c-1.41 0-2.66 0.44-3.75 1.31s-1.79 1.99-2.1 3.35c-1.1 0.26-2.01 0.83-2.73 1.73s-1.05 1.9-1.05 3.05zm7.93 9.88c0 0.16 0.05 0.32 0.15 0.46s0.25 0.25 0.45 0.31l0.25 0.03c0.42 0 0.68-0.2 0.8-0.6l2.43-8.89c0.06-0.23 0.04-0.45-0.07-0.64c-0.11-0.2-0.27-0.33-0.49-0.4c-0.23-0.07-0.45-0.05-0.65 0.06s-0.34 0.28-0.4 0.5l-2.45 8.9c-0.01 0.17-0.02 0.26-0.02 0.27zm4.14-3.03c0 0.4 0.21 0.67 0.62 0.8c0.17 0.02 0.26 0.03 0.26 0.03c0.11 0 0.23-0.02 0.35-0.08c0.2-0.09 0.34-0.27 0.42-0.55l1.64-5.85c0.06-0.23 0.04-0.45-0.08-0.64c-0.11-0.2-0.28-0.33-0.51-0.4c-0.23-0.07-0.45-0.05-0.65 0.06s-0.33 0.28-0.39 0.5l-1.62 5.89c-0.02 0.14-0.04 0.22-0.04 0.24zm1.67-14.7c0.68-0.64 1.5-0.96 2.48-0.96c0.97 0 1.8 0.34 2.48 1.02c0.69 0.68 1.03 1.51 1.03 2.48c0 0.63-0.17 1.25-0.51 1.85c-0.96-0.96-2.12-1.44-3.48-1.44H19.7c-0.28-1.15-0.84-2.13-1.68-2.95z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,11 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:autoMirrored="true">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15.67,4L14,4L14,2h-4v2L8.33,4C7.6,4 7,4.6 7,5.33v15.33C7,21.4 7.6,22 8.33,22h7.33c0.74,0 1.34,-0.6 1.34,-1.33L17,5.33C17,4.6 16.4,4 15.67,4zM13,18h-2v-2h2v2zM14.3,12.69s-0.38,0.42 -0.67,0.71c-0.48,0.48 -0.83,1.15 -0.83,1.6h-1.6c0,-0.83 0.46,-1.52 0.93,-2l0.93,-0.94c0.27,-0.27 0.44,-0.65 0.44,-1.06 0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5L9,11c0,-1.66 1.34,-3 3,-3s3,1.34 3,3c0,0.66 -0.27,1.26 -0.7,1.69z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M4.65 16.96c0 1.32 0.47 2.46 1.4 3.41c0.93 0.96 2.06 1.46 3.38 1.5c0.12 0 0.18-0.06 0.18-0.17v-1.33c0-0.12-0.06-0.18-0.18-0.18c-0.84-0.04-1.57-0.38-2.17-1.02s-0.91-1.37-0.91-2.22c0-0.84 0.28-1.57 0.85-2.19c0.57-0.62 1.26-0.97 2.1-1.04l0.53-0.07c0.12 0 0.19-0.06 0.19-0.18l0.07-0.5c0.1-1.09 0.55-2.01 1.36-2.75s1.76-1.11 2.86-1.11c1.08 0 2.03 0.37 2.84 1.1c0.81 0.73 1.28 1.63 1.4 2.71l0.07 0.58c0 0.12 0.06 0.18 0.19 0.18h1.6c0.9 0 1.67 0.32 2.32 0.97c0.64 0.64 0.97 1.41 0.97 2.3c0 0.84-0.3 1.58-0.9 2.22c-0.6 0.63-1.33 0.97-2.18 1.02c-0.13 0-0.2 0.06-0.2 0.18v1.33c0 0.11 0.07 0.17 0.2 0.17c1.33-0.04 2.46-0.54 3.38-1.5s1.38-2.09 1.38-3.42c0-0.89-0.22-1.72-0.67-2.48c-0.44-0.76-1.05-1.36-1.81-1.8c-0.76-0.44-1.59-0.66-2.48-0.66h-0.31c-0.33-1.34-1.03-2.43-2.11-3.29c-1.07-0.85-2.3-1.28-3.68-1.28c-1.41 0-2.66 0.44-3.75 1.31s-1.79 1.99-2.1 3.35c-1.13 0.29-2.04 0.88-2.75 1.77s-1.07 1.93-1.07 3.09zm5.4 7.02c0 0.17 0.05 0.34 0.16 0.51c0.11 0.17 0.27 0.28 0.47 0.35c0.23 0.07 0.44 0.06 0.64-0.04c0.19-0.09 0.33-0.28 0.39-0.56l0.14-0.61c0.05-0.23 0.02-0.44-0.09-0.63s-0.28-0.33-0.52-0.4c-0.22-0.07-0.44-0.04-0.64 0.08s-0.34 0.3-0.4 0.53l-0.14 0.59c0 0.03-0.01 0.09-0.01 0.18zm0.76-2.9c0 0.21 0.08 0.4 0.25 0.57c0.16 0.17 0.34 0.25 0.56 0.25c0.24 0 0.44-0.08 0.6-0.24c0.16-0.16 0.24-0.35 0.24-0.59c0-0.23-0.08-0.43-0.24-0.59c-0.16-0.16-0.36-0.24-0.6-0.24c-0.23 0-0.42 0.08-0.58 0.23c-0.15 0.18-0.23 0.38-0.23 0.61zm0.61-2.27c-0.01 0.16 0.03 0.31 0.14 0.45c0.1 0.15 0.26 0.25 0.48 0.32c0.21 0.06 0.41 0.04 0.62-0.07S13 19.23 13.07 19l0.28-0.9c0.07-0.24 0.05-0.46-0.07-0.65c-0.12-0.19-0.3-0.32-0.54-0.39c-0.22-0.07-0.43-0.05-0.63 0.07c-0.2 0.11-0.34 0.28-0.41 0.5l-0.24 0.92c0 0.02-0.01 0.06-0.02 0.12c-0.01 0.05-0.02 0.1-0.02 0.14zm1.17 8.29c0 0.18 0.05 0.34 0.15 0.5c0.1 0.16 0.26 0.27 0.48 0.33c0.08 0.02 0.17 0.03 0.25 0.03c0.43 0 0.69-0.2 0.79-0.61l0.14-0.59c0.06-0.26 0.03-0.48-0.08-0.68c-0.12-0.2-0.29-0.32-0.52-0.37c-0.21-0.07-0.42-0.05-0.63 0.07c-0.21 0.12-0.34 0.29-0.41 0.51l-0.14 0.59c-0.02 0.09-0.03 0.16-0.03 0.22zm0.77-2.9c0 0.22 0.08 0.41 0.25 0.58c0.16 0.16 0.35 0.24 0.57 0.24c0.24 0 0.43-0.08 0.59-0.23c0.16-0.16 0.23-0.35 0.23-0.59c0-0.23-0.08-0.42-0.23-0.58c-0.16-0.16-0.35-0.23-0.59-0.23s-0.43 0.08-0.59 0.23s-0.23 0.35-0.23 0.58zm0.63-2.27c-0.01 0.15 0.03 0.31 0.13 0.47c0.1 0.16 0.25 0.26 0.45 0.3c0.23 0.06 0.44 0.04 0.64-0.06s0.33-0.29 0.41-0.56l0.27-0.9c0.07-0.22 0.05-0.43-0.07-0.63c-0.12-0.2-0.29-0.33-0.53-0.4c-0.22-0.07-0.43-0.04-0.64 0.08c-0.21 0.12-0.34 0.3-0.41 0.53l-0.23 0.9c-0.01 0.08-0.02 0.17-0.02 0.27zm2.76 2.15c0 0.16 0.05 0.32 0.15 0.48c0.1 0.16 0.26 0.27 0.46 0.33c0.03 0 0.08 0.01 0.14 0.02c0.06 0.01 0.1 0.02 0.14 0.02c0.41 0 0.66-0.22 0.76-0.66l0.14-0.6c0.07-0.21 0.05-0.42-0.07-0.63c-0.11-0.21-0.28-0.34-0.51-0.41c-0.25-0.06-0.48-0.04-0.68 0.08s-0.34 0.29-0.41 0.53l-0.09 0.59c0 0.02-0.01 0.07-0.02 0.12s-0.01 0.09-0.01 0.13zm0.74-2.96c0 0.22 0.08 0.42 0.25 0.57c0.15 0.16 0.34 0.24 0.57 0.24c0.24 0 0.43-0.08 0.59-0.23s0.23-0.35 0.23-0.58c0-0.24-0.08-0.43-0.23-0.59s-0.35-0.23-0.59-0.23s-0.43 0.08-0.59 0.23c-0.15 0.16-0.23 0.35-0.23 0.59zm0.61-2.31c0 0.17 0.05 0.33 0.16 0.48c0.11 0.15 0.27 0.26 0.49 0.32c0.02 0 0.06 0.01 0.12 0.02s0.11 0.02 0.14 0.02c0.1 0 0.22-0.03 0.36-0.09c0.21-0.11 0.35-0.29 0.41-0.52l0.24-0.9c0.06-0.23 0.04-0.44-0.08-0.63c-0.11-0.2-0.28-0.33-0.51-0.4c-0.23-0.07-0.44-0.05-0.64 0.06c-0.19 0.11-0.33 0.27-0.39 0.51l-0.28 0.91c0 0.02-0.01 0.06-0.02 0.12v0.1z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M4.64 16.91c0-1.15 0.36-2.17 1.08-3.07c0.72-0.9 1.63-1.47 2.73-1.73c0.31-1.36 1.02-2.48 2.11-3.36s2.34-1.31 3.75-1.31c1.38 0 2.6 0.43 3.68 1.28c1.08 0.85 1.78 1.95 2.1 3.29h0.32c0.89 0 1.72 0.22 2.48 0.65s1.37 1.03 1.81 1.78c0.44 0.75 0.67 1.58 0.67 2.47c0 0.88-0.21 1.69-0.63 2.44c-0.42 0.75-1 1.35-1.73 1.8c-0.73 0.45-1.53 0.69-2.4 0.71c-0.13 0-0.2-0.06-0.2-0.17v-1.33c0-0.12 0.07-0.18 0.2-0.18c0.85-0.04 1.58-0.38 2.18-1.02s0.9-1.39 0.9-2.26s-0.33-1.62-0.98-2.26s-1.42-0.96-2.31-0.96h-1.61c-0.12 0-0.18-0.06-0.18-0.17l-0.08-0.58c-0.11-1.08-0.58-1.99-1.39-2.71c-0.82-0.73-1.76-1.09-2.85-1.09s-2.05 0.36-2.85 1.09c-0.81 0.73-1.26 1.63-1.36 2.71l-0.07 0.53c0 0.12-0.07 0.19-0.2 0.19l-0.53 0.03c-0.83 0.1-1.53 0.46-2.1 1.07s-0.85 1.33-0.85 2.16c0 0.87 0.3 1.62 0.9 2.26s1.33 0.98 2.18 1.02c0.11 0 0.17 0.06 0.17 0.18v1.33c0 0.11-0.06 0.17-0.17 0.17c-1.34-0.06-2.47-0.57-3.4-1.53s-1.37-2.1-1.37-3.43zm5.35 6.69c0-0.04 0.01-0.11 0.04-0.2l1.63-5.77c0.06-0.19 0.17-0.34 0.32-0.44c0.15-0.1 0.31-0.15 0.46-0.15c0.07 0 0.15 0.01 0.24 0.03c0.24 0.04 0.42 0.17 0.54 0.37c0.12 0.2 0.15 0.42 0.08 0.67l-1.63 5.73c-0.12 0.43-0.4 0.64-0.82 0.64c-0.04 0-0.07-0.01-0.11-0.02c-0.06-0.02-0.09-0.03-0.1-0.03c-0.22-0.06-0.38-0.17-0.49-0.33c-0.11-0.17-0.16-0.33-0.16-0.5zm2.62 2.81l2.44-8.77c0.04-0.19 0.14-0.34 0.3-0.44c0.16-0.1 0.32-0.15 0.49-0.15c0.09 0 0.18 0.01 0.27 0.03c0.22 0.06 0.38 0.19 0.49 0.39c0.11 0.2 0.13 0.41 0.07 0.64l-2.43 8.78c-0.04 0.17-0.13 0.31-0.29 0.43c-0.16 0.12-0.32 0.18-0.51 0.18c-0.09 0-0.18-0.02-0.25-0.05c-0.2-0.05-0.37-0.18-0.52-0.39c-0.11-0.18-0.13-0.39-0.06-0.65zm4.13-2.79c0-0.04 0.01-0.11 0.04-0.23l1.63-5.77c0.06-0.19 0.16-0.34 0.3-0.44c0.15-0.1 0.3-0.15 0.46-0.15c0.08 0 0.17 0.01 0.26 0.03c0.21 0.06 0.36 0.16 0.46 0.31c0.1 0.15 0.15 0.31 0.15 0.47c0 0.03-0.01 0.08-0.02 0.14S20 18.08 20 18.1l-1.63 5.73c-0.04 0.19-0.13 0.35-0.28 0.46s-0.32 0.17-0.51 0.17l-0.24-0.05c-0.2-0.06-0.35-0.16-0.46-0.32c-0.09-0.15-0.14-0.31-0.14-0.47z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M14.95 7.879l-0.707-0.707a1 1 0 0 1 1.414-1.415l0.707 0.707l1.414-1.414l-2.828-2.828L2.222 14.95l2.828 2.828l1.414-1.414L5.05 14.95a1 1 0 0 1 1.414-1.414L7.88 14.95l1.414-1.414l-0.707-0.708A1 1 0 0 1 10 11.414l0.707 0.707l1.414-1.414l-1.414-1.414a1 1 0 0 1 1.414-1.414l1.415 1.414l1.414-1.414zM0.808 13.536L13.536 0.808a2 2 0 0 1 2.828 0l2.828 2.828a2 2 0 0 1 0 2.828L6.464 19.192a2 2 0 0 1-2.828 0l-2.828-2.828a2 2 0 0 1 0-2.828z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,11 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:autoMirrored="true">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M3.5,18.49l6,-6.01 4,4L22,6.92l-1.41,-1.41 -7.09,7.97 -4,-4L2,16.99l1.5,1.5z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M4.6 16.93c0-1.16 0.36-2.18 1.09-3.08c0.72-0.9 1.65-1.48 2.78-1.73c0.29-1.38 0.98-2.5 2.07-3.39S12.88 7.4 14.3 7.4c1.39 0 2.63 0.43 3.72 1.28c1.08 0.85 1.79 1.95 2.12 3.3h0.34c0.9 0 1.73 0.22 2.48 0.66c0.76 0.44 1.35 1.04 1.79 1.8c0.43 0.76 0.65 1.59 0.65 2.49c0 1.34-0.46 2.48-1.37 3.44c-0.92 0.96-2.04 1.46-3.37 1.5c-0.12 0-0.18-0.06-0.18-0.17v-1.34c0-0.11 0.06-0.17 0.18-0.17c0.84-0.07 1.57-0.42 2.17-1.05s0.9-1.37 0.9-2.22c0-0.89-0.32-1.66-0.96-2.31c-0.64-0.64-1.4-0.97-2.29-0.97h-1.63c-0.12 0-0.19-0.06-0.22-0.18l-0.07-0.57c-0.07-0.71-0.3-1.36-0.7-1.94s-0.91-1.03-1.53-1.36c-0.62-0.33-1.3-0.49-2.02-0.49c-1.1 0-2.05 0.36-2.86 1.09c-0.81 0.73-1.27 1.64-1.37 2.72l-0.07 0.54c0 0.09-0.05 0.14-0.16 0.14L9.31 13.7c-0.84 0.07-1.55 0.41-2.11 1.03c-0.57 0.62-0.85 1.35-0.85 2.2c0 0.87 0.3 1.62 0.89 2.25c0.59 0.63 1.31 0.97 2.17 1.02c0.12 0 0.18 0.06 0.18 0.17v1.34c0 0.11-0.06 0.17-0.18 0.17c-0.66-0.03-1.28-0.18-1.88-0.45S6.42 20.8 6 20.36c-0.43-0.44-0.77-0.95-1.02-1.55S4.6 17.59 4.6 16.93zm5.42 6.77c0-0.03 0.01-0.08 0.02-0.13s0.02-0.09 0.02-0.11l0.27-1.03c0.07-0.22 0.2-0.4 0.4-0.51c0.2-0.12 0.41-0.14 0.64-0.07c0.23 0.07 0.4 0.2 0.52 0.4s0.14 0.41 0.07 0.64l-0.24 1.01c-0.13 0.44-0.38 0.66-0.76 0.66h-0.09c-0.03 0-0.07-0.01-0.11-0.01c-0.04-0.01-0.07-0.01-0.1-0.01c-0.21-0.06-0.37-0.18-0.48-0.34s-0.16-0.34-0.16-0.5zm1.32-4.82c0-0.02 0-0.06 0.01-0.11s0.01-0.08 0.01-0.09l0.3-1.05c0.06-0.19 0.17-0.34 0.32-0.45c0.15-0.1 0.31-0.15 0.47-0.15h0.08c0.03 0 0.06 0.01 0.09 0.01c0.03 0.01 0.06 0.01 0.08 0.01c0.23 0.07 0.4 0.2 0.51 0.4c0.12 0.2 0.14 0.41 0.07 0.64l-0.24 1c-0.07 0.28-0.2 0.47-0.4 0.59s-0.42 0.12-0.65 0.02c-0.22-0.06-0.38-0.17-0.49-0.34s-0.16-0.32-0.16-0.48zm1.23 7.95c0-0.03 0.01-0.07 0.02-0.13s0.02-0.09 0.02-0.12l0.29-0.99c0.06-0.24 0.2-0.42 0.4-0.54c0.2-0.12 0.42-0.15 0.65-0.08c0.23 0.07 0.39 0.2 0.51 0.41s0.13 0.42 0.07 0.65l-0.25 1.04c-0.11 0.41-0.37 0.61-0.8 0.61c-0.05 0-0.13-0.01-0.24-0.04c-0.22-0.04-0.38-0.14-0.49-0.3c-0.12-0.16-0.18-0.33-0.18-0.51zm1.34-4.77c0-0.06 0.01-0.14 0.04-0.25l0.27-1.03c0.07-0.23 0.2-0.4 0.41-0.51c0.2-0.12 0.42-0.14 0.65-0.07c0.23 0.06 0.39 0.19 0.51 0.39c0.11 0.2 0.13 0.41 0.06 0.65l-0.24 0.99c-0.13 0.45-0.37 0.68-0.72 0.68c-0.04 0-0.15-0.02-0.31-0.06c-0.22-0.04-0.38-0.14-0.49-0.3c-0.12-0.15-0.18-0.32-0.18-0.49zm2.82 1.68c0-0.07 0.01-0.15 0.03-0.24l0.28-0.99c0.07-0.24 0.2-0.42 0.41-0.54s0.41-0.15 0.63-0.09c0.23 0.07 0.41 0.2 0.53 0.41c0.12 0.2 0.15 0.41 0.09 0.63l-0.29 1.06c-0.1 0.41-0.36 0.61-0.79 0.61c-0.09 0-0.18-0.01-0.26-0.03c-0.2-0.04-0.35-0.14-0.46-0.3c-0.1-0.18-0.16-0.35-0.17-0.52zm1.38-4.76c0-0.03 0.02-0.12 0.05-0.26l0.3-1.03c0.04-0.21 0.13-0.37 0.29-0.47c0.16-0.1 0.32-0.15 0.49-0.14c0.04-0.01 0.13 0 0.24 0.03c0.22 0.05 0.39 0.18 0.52 0.38c0.12 0.17 0.14 0.38 0.07 0.65l-0.24 1.03c-0.13 0.43-0.38 0.65-0.76 0.65c-0.06 0-0.17-0.02-0.34-0.06c-0.21-0.06-0.36-0.17-0.46-0.31c-0.11-0.16-0.16-0.31-0.16-0.47z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M17,1.01L7,1c-1.1,0 -2,0.9 -2,2v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3c0,-1.1 -0.9,-1.99 -2,-1.99zM17,19H7V5h10v14z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M4.64 16.95c0-1.16 0.35-2.18 1.06-3.08s1.62-1.48 2.74-1.76c0.31-1.36 1.01-2.48 2.1-3.36s2.34-1.31 3.75-1.31c1.38 0 2.6 0.43 3.68 1.28c1.08 0.85 1.78 1.95 2.1 3.29h0.32c0.89 0 1.72 0.22 2.48 0.66c0.76 0.44 1.37 1.04 1.81 1.8c0.44 0.76 0.67 1.59 0.67 2.48c0 1.32-0.46 2.47-1.39 3.42c-0.92 0.96-2.05 1.46-3.38 1.5c-0.13 0-0.2-0.06-0.2-0.17v-1.33c0-0.12 0.07-0.18 0.2-0.18c0.85-0.04 1.58-0.38 2.18-1.02s0.9-1.38 0.9-2.23c0-0.89-0.32-1.65-0.97-2.3s-1.42-0.97-2.32-0.97h-1.61c-0.12 0-0.18-0.06-0.18-0.17l-0.08-0.58c-0.11-1.08-0.58-1.99-1.39-2.72c-0.82-0.73-1.76-1.1-2.85-1.1c-1.1 0-2.05 0.37-2.86 1.11c-0.81 0.74-1.27 1.65-1.37 2.75l-0.06 0.5c0 0.12-0.07 0.19-0.2 0.19l-0.53 0.07c-0.83 0.07-1.53 0.41-2.1 1.04s-0.85 1.35-0.85 2.19c0 0.85 0.3 1.59 0.9 2.23s1.33 0.97 2.18 1.02c0.11 0 0.17 0.06 0.17 0.18v1.33c0 0.11-0.06 0.17-0.17 0.17c-1.34-0.04-2.47-0.54-3.4-1.5c-0.87-0.96-1.33-2.11-1.33-3.43zM11 21.02c0-0.22 0.08-0.42 0.24-0.58c0.16-0.16 0.35-0.24 0.59-0.24c0.23 0 0.43 0.08 0.59 0.24c0.16 0.16 0.24 0.36 0.24 0.58c0 0.24-0.08 0.44-0.24 0.6c-0.16 0.17-0.35 0.25-0.59 0.25c-0.23 0-0.43-0.08-0.59-0.25c-0.16-0.16-0.24-0.36-0.24-0.6zm0 3.63c0-0.24 0.08-0.44 0.24-0.6c0.16-0.15 0.35-0.23 0.58-0.23c0.23 0 0.43 0.08 0.59 0.23c0.16 0.16 0.24 0.35 0.24 0.59s-0.08 0.43-0.24 0.59c-0.16 0.16-0.35 0.23-0.59 0.23c-0.23 0-0.43-0.08-0.59-0.23c-0.15-0.15-0.23-0.35-0.23-0.58zm3.19-1.7c0-0.23 0.08-0.44 0.25-0.62c0.16-0.16 0.35-0.24 0.57-0.24c0.23 0 0.43 0.09 0.6 0.26c0.17 0.17 0.26 0.37 0.26 0.6c0 0.23-0.08 0.43-0.25 0.6c-0.17 0.17-0.37 0.25-0.61 0.25c-0.23 0-0.42-0.08-0.58-0.25s-0.24-0.37-0.24-0.6zm0-3.62c0-0.23 0.08-0.43 0.25-0.6c0.18-0.16 0.37-0.24 0.57-0.24c0.24 0 0.44 0.08 0.61 0.25c0.17 0.17 0.25 0.36 0.25 0.6c0 0.23-0.08 0.43-0.25 0.59c-0.17 0.16-0.37 0.24-0.61 0.24c-0.23 0-0.42-0.08-0.58-0.24c-0.16-0.17-0.24-0.37-0.24-0.6zm0 7.28c0-0.23 0.08-0.43 0.25-0.61c0.16-0.16 0.35-0.24 0.57-0.24c0.24 0 0.44 0.08 0.61 0.25c0.17 0.17 0.25 0.37 0.25 0.6s-0.08 0.43-0.25 0.59c-0.17 0.16-0.37 0.24-0.61 0.24c-0.23 0-0.42-0.08-0.58-0.24c-0.16-0.17-0.24-0.36-0.24-0.59zm3.22-5.59c0-0.22 0.08-0.41 0.25-0.58c0.17-0.17 0.37-0.25 0.6-0.25c0.23 0 0.43 0.08 0.59 0.24c0.16 0.16 0.24 0.36 0.24 0.58c0 0.24-0.08 0.44-0.24 0.6c-0.16 0.17-0.35 0.25-0.59 0.25s-0.44-0.08-0.6-0.25c-0.16-0.16-0.25-0.36-0.25-0.59zm0 3.63c0-0.22 0.08-0.42 0.25-0.6c0.16-0.15 0.36-0.23 0.6-0.23s0.43 0.08 0.59 0.23s0.23 0.35 0.23 0.59s-0.08 0.43-0.23 0.59c-0.16 0.16-0.35 0.23-0.59 0.23s-0.44-0.08-0.6-0.24c-0.16-0.15-0.25-0.34-0.25-0.57z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M7.46 14.41c0-0.19 0.07-0.36 0.2-0.5s0.29-0.21 0.48-0.21s0.36 0.07 0.49 0.21c0.13 0.14 0.2 0.3 0.2 0.5c0 0.19-0.07 0.35-0.2 0.48s-0.3 0.2-0.48 0.2s-0.35-0.07-0.48-0.2c-0.15-0.14-0.21-0.3-0.21-0.48zm1.98 0c0-0.19 0.07-0.36 0.2-0.5s0.29-0.21 0.48-0.21h3.23l-2.28-2.28c-0.14-0.12-0.21-0.28-0.21-0.47c0-0.19 0.07-0.35 0.21-0.49c0.14-0.14 0.3-0.21 0.49-0.21s0.35 0.07 0.49 0.21l2.27 2.27V9.52c0-0.19 0.07-0.36 0.21-0.5s0.3-0.21 0.5-0.21c0.19 0 0.35 0.07 0.48 0.21c0.13 0.14 0.2 0.3 0.2 0.5v3.23l2.29-2.3c0.14-0.14 0.3-0.21 0.48-0.21s0.35 0.07 0.49 0.21c0.12 0.14 0.18 0.3 0.18 0.49s-0.06 0.35-0.18 0.47l-2.28 2.28h3.23c0.18 0 0.34 0.07 0.47 0.21c0.13 0.14 0.2 0.3 0.2 0.5c0 0.18-0.07 0.34-0.2 0.47c-0.13 0.13-0.29 0.2-0.47 0.2h-3.23l2.29 2.29c0.12 0.12 0.18 0.28 0.18 0.47s-0.06 0.35-0.18 0.49c-0.14 0.14-0.31 0.21-0.49 0.21s-0.35-0.07-0.48-0.21l-2.29-2.3v3.24c0 0.19-0.07 0.36-0.2 0.49s-0.29 0.2-0.48 0.2s-0.36-0.07-0.5-0.2s-0.21-0.3-0.21-0.49v-3.22l-2.27 2.27c-0.14 0.14-0.3 0.21-0.49 0.21s-0.35-0.07-0.49-0.21s-0.21-0.3-0.21-0.49s0.07-0.34 0.21-0.47l2.3-2.29h-3.24c-0.19 0-0.35-0.07-0.48-0.2c-0.16-0.11-0.22-0.27-0.22-0.45zm0.01 4.84c0-0.18 0.07-0.35 0.21-0.48c0.12-0.14 0.28-0.21 0.47-0.21c0.19 0 0.35 0.07 0.49 0.21c0.14 0.14 0.21 0.3 0.21 0.48s-0.07 0.35-0.21 0.48c-0.14 0.14-0.3 0.21-0.49 0.21s-0.35-0.07-0.47-0.21c-0.14-0.13-0.21-0.29-0.21-0.48zm0-9.71c0-0.18 0.07-0.35 0.21-0.48c0.12-0.14 0.28-0.21 0.47-0.21c0.19 0 0.35 0.07 0.49 0.21c0.14 0.14 0.21 0.3 0.21 0.48s-0.07 0.35-0.21 0.49c-0.14 0.14-0.3 0.21-0.49 0.21s-0.35-0.07-0.47-0.21C9.52 9.89 9.45 9.72 9.45 9.54zm4.85 11.71c0-0.18 0.07-0.34 0.21-0.47c0.14-0.13 0.3-0.2 0.5-0.2c0.19 0 0.35 0.07 0.48 0.2s0.2 0.29 0.2 0.47c0 0.19-0.07 0.36-0.2 0.49s-0.29 0.2-0.48 0.2s-0.36-0.07-0.5-0.2s-0.21-0.29-0.21-0.49zm0-13.71c0-0.19 0.07-0.36 0.21-0.49s0.3-0.2 0.5-0.2c0.19 0 0.35 0.07 0.48 0.2s0.2 0.3 0.2 0.49c0 0.18-0.07 0.34-0.2 0.47c-0.13 0.13-0.29 0.2-0.48 0.2s-0.36-0.07-0.5-0.2s-0.21-0.29-0.21-0.47zm4.87 11.71c0-0.18 0.07-0.35 0.21-0.48c0.12-0.14 0.28-0.21 0.47-0.21c0.19 0 0.35 0.07 0.49 0.21c0.14 0.14 0.21 0.3 0.21 0.48s-0.07 0.35-0.21 0.48c-0.14 0.14-0.3 0.21-0.49 0.21s-0.35-0.07-0.47-0.21c-0.14-0.13-0.21-0.29-0.21-0.48zm0-9.71c0-0.18 0.07-0.35 0.21-0.48c0.12-0.14 0.28-0.21 0.47-0.21c0.19 0 0.35 0.07 0.49 0.21c0.14 0.14 0.21 0.3 0.21 0.48s-0.07 0.35-0.21 0.49c-0.14 0.14-0.3 0.21-0.49 0.21s-0.35-0.07-0.47-0.21c-0.14-0.14-0.21-0.31-0.21-0.49zm2 4.87c0-0.19 0.07-0.36 0.2-0.5s0.3-0.21 0.49-0.21c0.18 0 0.34 0.07 0.47 0.21c0.13 0.14 0.2 0.3 0.2 0.5c0 0.18-0.07 0.34-0.2 0.47c-0.13 0.13-0.29 0.2-0.47 0.2c-0.19 0-0.36-0.07-0.49-0.2s-0.2-0.29-0.2-0.47z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,13 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20.38,8.57l-1.23,1.85a8,8 0,0 1,-0.22 7.58H5.07A8,8 0,0 1,15.58 6.85l1.85,-1.23A10,10 0,0 0,3.35 19a2,2 0,0 0,1.72 1h13.85a2,2 0,0 0,1.74 -1,10 10,0 0,0 -0.27,-10.44z"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M10.59,15.41a2,2 0,0 0,2.83 0l5.66,-8.49 -8.49,5.66a2,2 0,0 0,0 2.83z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M4.64 16.91c0-1.15 0.36-2.17 1.08-3.07c0.72-0.9 1.63-1.47 2.73-1.73c0.31-1.36 1.01-2.48 2.1-3.35s2.35-1.31 3.76-1.31c1.38 0 2.6 0.43 3.68 1.27c1.07 0.85 1.78 1.94 2.11 3.28h0.31c0.89 0 1.72 0.22 2.48 0.65s1.37 1.03 1.81 1.78c0.44 0.75 0.67 1.58 0.67 2.47c0 1.34-0.46 2.49-1.38 3.45s-2.05 1.47-3.38 1.51c-0.13 0-0.2-0.06-0.2-0.17v-1.33c0-0.12 0.07-0.18 0.2-0.18c0.86-0.04 1.58-0.38 2.18-1.02s0.9-1.39 0.9-2.26s-0.32-1.62-0.98-2.26c-0.65-0.64-1.42-0.96-2.31-0.96h-1.6c-0.12 0-0.19-0.06-0.19-0.17l-0.07-0.58c-0.11-1.07-0.57-1.98-1.38-2.71c-0.82-0.73-1.77-1.1-2.85-1.1c-1.09 0-2.05 0.36-2.86 1.09c-0.81 0.73-1.27 1.63-1.38 2.71l-0.06 0.54c0 0.12-0.07 0.18-0.2 0.18l-0.53 0.03c-0.82 0.04-1.51 0.37-2.09 1s-0.86 1.37-0.86 2.22c0 0.87 0.3 1.62 0.9 2.26s1.33 0.98 2.18 1.02c0.11 0 0.17 0.06 0.17 0.18v1.33c0 0.11-0.06 0.17-0.17 0.17c-1.34-0.06-2.47-0.57-3.4-1.53s-1.37-2.08-1.37-3.41zm5.93 0.88c0-0.24 0.12-0.57 0.37-0.99c0.24-0.42 0.47-0.75 0.68-1.01c0.21-0.24 0.34-0.38 0.38-0.42l0.36 0.4c0.26 0.28 0.5 0.61 0.72 1.02c0.22 0.4 0.33 0.74 0.33 1c0 0.39-0.13 0.72-0.4 0.98s-0.6 0.39-1 0.39c-0.39 0-0.73-0.13-1.01-0.4c-0.29-0.26-0.43-0.59-0.43-0.97zm2.98 3.99c0-0.28 0.08-0.59 0.24-0.96s0.35-0.7 0.59-1.02c0.18-0.26 0.4-0.54 0.67-0.84c0.26-0.3 0.46-0.52 0.6-0.65c0.07-0.06 0.15-0.14 0.24-0.23l0.24 0.23c0.38 0.33 0.8 0.82 1.27 1.46c0.24 0.33 0.43 0.68 0.59 1.04s0.23 0.68 0.23 0.97c0 0.64-0.23 1.19-0.68 1.65s-1.01 0.68-1.66 0.68c-0.64 0-1.19-0.23-1.65-0.67c-0.46-0.46-0.68-1.01-0.68-1.66zm1.47-6.66c0-0.42 0.32-0.95 0.97-1.6l0.24 0.25c0.18 0.21 0.33 0.45 0.48 0.71c0.14 0.26 0.22 0.47 0.22 0.64c0 0.26-0.09 0.48-0.28 0.66c-0.18 0.18-0.4 0.28-0.66 0.28c-0.27 0-0.5-0.09-0.69-0.28c-0.19-0.18-0.28-0.4-0.28-0.66z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M4.63 16.91c0 1.11 0.33 2.1 0.99 2.97s1.51 1.47 2.56 1.79l-0.65 1.68c-0.03 0.14 0.02 0.22 0.14 0.22H9.8l-1.04 3.78h0.28l3.97-5.22c0.04-0.04 0.04-0.09 0.02-0.14s-0.07-0.07-0.14-0.07h-2.18l2.48-4.64c0.06-0.14 0.02-0.21-0.14-0.21h-2.94c-0.09 0-0.17 0.05-0.22 0.14L8.8 20.08c-0.71-0.18-1.3-0.57-1.77-1.16s-0.7-1.26-0.7-2.01c0-0.83 0.28-1.55 0.84-2.16s1.26-0.96 2.1-1.06l0.52-0.07c0.13 0 0.2-0.06 0.2-0.17l0.07-0.52c0.1-1.08 0.55-1.99 1.36-2.72c0.81-0.73 1.76-1.1 2.85-1.1s2.04 0.37 2.85 1.1c0.82 0.73 1.28 1.64 1.4 2.72l0.06 0.58c0 0.12 0.06 0.18 0.19 0.18h1.61c0.91 0 1.68 0.32 2.32 0.95c0.64 0.63 0.96 1.39 0.96 2.28c0 0.85-0.3 1.59-0.89 2.21c-0.59 0.62-1.32 0.96-2.19 1.03c-0.13 0-0.2 0.06-0.2 0.19v1.37c0 0.11 0.07 0.17 0.2 0.17c0.65-0.02 1.27-0.17 1.86-0.44c0.59-0.27 1.1-0.63 1.52-1.07c0.42-0.44 0.76-0.96 1.01-1.57c0.25-0.6 0.38-1.23 0.38-1.88c0-0.9-0.22-1.73-0.67-2.49c-0.45-0.76-1.05-1.36-1.81-1.8c-0.76-0.44-1.59-0.66-2.48-0.66h-0.32c-0.33-1.33-1.03-2.42-2.11-3.26c-1.08-0.84-2.3-1.27-3.68-1.27c-1.41 0-2.67 0.44-3.76 1.31s-1.79 1.99-2.1 3.36c-1.1 0.26-2.01 0.83-2.73 1.73s-1.06 1.91-1.06 3.06zm8.16 9.86c0 0.16 0.05 0.31 0.15 0.46c0.1 0.15 0.26 0.26 0.46 0.32c0.14 0.03 0.22 0.05 0.25 0.05c0.09 0 0.21-0.03 0.38-0.1c0.21-0.09 0.35-0.27 0.42-0.52l0.28-1.05c0.06-0.22 0.04-0.43-0.08-0.63s-0.29-0.33-0.53-0.4c-0.22-0.06-0.43-0.04-0.63 0.08s-0.34 0.29-0.41 0.53l-0.27 1c-0.01 0.17-0.02 0.26-0.02 0.26zM14.13 22c0 0.14 0.05 0.29 0.15 0.44c0.1 0.15 0.25 0.26 0.45 0.33c0.22 0.07 0.44 0.06 0.64-0.05s0.33-0.28 0.4-0.52l0.3-1.04c0.06-0.22 0.03-0.43-0.08-0.63c-0.12-0.2-0.3-0.34-0.53-0.41c-0.23-0.06-0.44-0.04-0.65 0.08s-0.34 0.29-0.41 0.52l-0.24 1.01c-0.02 0.17-0.03 0.26-0.03 0.27zm2.82 1.65c0 0.17 0.05 0.34 0.16 0.51c0.11 0.17 0.27 0.28 0.47 0.35c0.02 0 0.06 0.01 0.12 0.02c0.05 0.01 0.09 0.02 0.12 0.02c0.13 0 0.26-0.02 0.38-0.08c0.19-0.07 0.33-0.26 0.41-0.57l0.25-1.01c0.07-0.23 0.05-0.45-0.06-0.66c-0.11-0.21-0.28-0.35-0.5-0.42c-0.25-0.06-0.48-0.03-0.68 0.08c-0.2 0.12-0.33 0.3-0.37 0.53l-0.27 1.03c-0.02 0.06-0.03 0.13-0.03 0.2zm1.36-4.79c-0.01 0.16 0.04 0.31 0.15 0.47c0.11 0.16 0.27 0.28 0.49 0.38c0.08 0.04 0.16 0.06 0.26 0.06c0.11 0 0.22-0.03 0.34-0.08c0.21-0.1 0.35-0.29 0.44-0.57l0.29-1.03c0.02-0.13 0.03-0.2 0.03-0.22c0-0.17-0.05-0.33-0.16-0.49s-0.27-0.27-0.49-0.33c-0.02 0-0.06-0.01-0.11-0.02C19.49 17 19.45 17 19.42 17c-0.17 0-0.33 0.05-0.49 0.15c-0.16 0.1-0.27 0.26-0.33 0.48l-0.27 1.01c-0.01 0.08-0.02 0.15-0.02 0.22z"/>
|
||||
</vector>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user