Skip to content

Commit 4218a1d

Browse files
committed
Merge pull request #65 from domoticz/development-branch
Development branch (v0.1.127)
2 parents 01bf02d + dfd5281 commit 4218a1d

File tree

310 files changed

+8856
-3057
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+8856
-3057
lines changed

app/build.gradle

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
defaultConfig {
99
minSdkVersion 16
1010
targetSdkVersion 23
11-
versionCode 51
12-
versionName '0.1.206'
11+
versionCode 62
12+
versionName '0.1.217'
1313
multiDexEnabled true
1414
}
1515

@@ -18,6 +18,9 @@ android {
1818
release {
1919
minifyEnabled false
2020
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21+
lintOptions {
22+
disable 'MissingTranslation'
23+
}
2124
}
2225
}
2326

@@ -76,15 +79,17 @@ dependencies {
7679
}
7780
compile 'com.mcxiaoke.volley:library:1.0.15'
7881
compile 'com.android.support:design:23.1.1'
79-
compile 'de.hdodenhof:circleimageview:1.2.1'
80-
compile 'com.squareup.picasso:picasso:2.5.2'
8182
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
8283
compile 'com.marvinlabs:android-floatinglabel-widgets:1.6.1@aar'
8384
compile 'com.splunk.mint:mint:4.4.0'
8485
compile 'com.larswerkman:lobsterpicker:1.0.0'
8586
compile 'com.github.lecho:hellocharts-library:1.5.8@aar'
8687
compile 'com.github.dexafree:materiallist:3.1.2'
8788
compile 'com.github.hotchemi:android-rate:0.5.6'
89+
compile 'com.github.Triggertrap:SeekArc:+'
90+
compile 'com.squareup.picasso:picasso:2.5.2'
91+
compile 'com.github.fenjuly:SpinnerLoader:fd5b8ab578'
92+
compile 'com.nhaarman.listviewanimations:lib-core:3.1.0@aar'
8893

8994
paidWearApp project(path: ':wear', configuration: 'paidRelease')
9095
}

app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest
3-
xmlns:android="http://schemas.android.com/apk/res/android"
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
43
xmlns:tools="http://schemas.android.com/tools"
54
package="nl.hnogames.domoticz">
65

76
<supports-screens
8-
android:resizeable="true"
9-
android:smallScreens="true"
7+
android:anyDensity="true"
108
android:largeScreens="true"
11-
android:xlargeScreens="true"
129
android:normalScreens="true"
13-
android:anyDensity="true"/>
14-
10+
android:resizeable="true"
11+
android:smallScreens="true"
12+
android:xlargeScreens="true" />
1513

1614
<permission
17-
android:name="nl.hnogames.domoticz.permission.MAPS_RECEIVE"
15+
android:name="nl.hnogames.domoticz.premium.permission.MAPS_RECEIVE"
1816
android:protectionLevel="signature" />
1917

20-
<uses-permission android:name="nl.hnogames.domoticz.permission.MAPS_RECEIVE" />
18+
<uses-permission android:name="nl.hnogames.domoticz.premium.permission.MAPS_RECEIVE" />
2119

2220
<uses-permission android:name="android.permission.INTERNET" />
23-
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
21+
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
2422
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
23+
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
2524
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
2625
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
2726
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
@@ -92,7 +91,7 @@
9291
<activity
9392
android:name=".WidgetActionActivity"
9493
android:configChanges="orientation|screenSize"
95-
android:label="Domoticz Widget Action"/>
94+
android:label="Domoticz Widget Action" />
9695

9796
<service android:name=".Service.WidgetProviderLarge$UpdateWidgetService" />
9897

@@ -167,7 +166,7 @@
167166
<activity
168167
android:name=".Welcome.WelcomeViewActivity"
169168
android:configChanges="orientation|screenSize"
170-
android:label="@string/welcome_title_activity_welcome"/>
169+
android:label="@string/welcome_title_activity_welcome" />
171170

172171
<meta-data
173172
android:name="com.google.android.geo.API_KEY"

app/src/main/java/nl/hnogames/domoticz/Adapters/CamerasAdapter.java

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,30 @@
2727
import android.view.LayoutInflater;
2828
import android.view.View;
2929
import android.view.ViewGroup;
30-
import android.widget.ImageView;
3130
import android.widget.TextView;
3231

33-
import com.squareup.picasso.MemoryPolicy;
34-
import com.squareup.picasso.NetworkPolicy;
35-
import com.squareup.picasso.Picasso;
32+
import com.android.volley.toolbox.ImageLoader;
3633

3734
import java.util.ArrayList;
3835

3936
import nl.hnogames.domoticz.Containers.CameraInfo;
37+
import nl.hnogames.domoticz.Domoticz.Domoticz;
4038
import nl.hnogames.domoticz.R;
39+
import nl.hnogames.domoticz.Utils.RequestUtil;
40+
import nl.hnogames.domoticz.Utils.SessionUtil;
41+
4142

4243
@SuppressWarnings("unused")
4344
public class CamerasAdapter extends RecyclerView.Adapter<CamerasAdapter.DataObjectHolder> {
4445
private static onClickListener onClickListener;
4546
private final Context mContext;
4647
private ArrayList<CameraInfo> mDataset;
48+
private Domoticz domoticz;
4749

48-
public CamerasAdapter(ArrayList<CameraInfo> data, Context mContext) {
50+
public CamerasAdapter(ArrayList<CameraInfo> data, Context mContext, Domoticz domoticz) {
4951
this.mDataset = data;
5052
this.mContext = mContext;
53+
this.domoticz=domoticz;
5154
}
5255

5356
public void setOnItemClickListener(onClickListener onClickListener) {
@@ -64,23 +67,19 @@ public DataObjectHolder onCreateViewHolder(ViewGroup parent, int viewType) {
6467

6568
@Override
6669
public void onBindViewHolder(DataObjectHolder holder, int position) {
67-
6870
if (mDataset != null && mDataset.size() > 0) {
6971
CameraInfo cameraInfo = mDataset.get(position);
7072
String name = cameraInfo.getName();
7173
String address = cameraInfo.getAddress();
72-
String imageUrl = cameraInfo.getImageURL();
74+
String imageUrl = cameraInfo.getSnapShotURL();
7375

74-
int numberOfDevices = mDataset.get(position).getDevices();
76+
int numberOfDevices = cameraInfo.getDevices();
7577
String text = mContext.getResources().getQuantityString(R.plurals.devices, numberOfDevices, numberOfDevices);
76-
7778
holder.name.setText(name);
7879

79-
Picasso.with(mContext)
80-
.load(cameraInfo.getFullURL())
81-
.memoryPolicy(MemoryPolicy.NO_CACHE, MemoryPolicy.NO_STORE)
82-
.networkPolicy(NetworkPolicy.NO_CACHE)
83-
.into(holder.camera);
80+
ImageLoader imageLoader = RequestUtil.getImageLoader(domoticz, new SessionUtil(mContext), mContext);
81+
holder.camera.setImageUrl(imageUrl, imageLoader);
82+
holder.camera.setDefaultImageResId(R.drawable.placeholder);
8483
}
8584
}
8685

@@ -89,20 +88,19 @@ public int getItemCount() {
8988
return mDataset.size();
9089
}
9190

92-
9391
public interface onClickListener {
9492
void onItemClick(int position, View v);
9593
}
9694

9795
public static class DataObjectHolder extends RecyclerView.ViewHolder
9896
implements View.OnClickListener {
9997
TextView name;
100-
ImageView camera;
98+
com.android.volley.toolbox.NetworkImageView camera;
10199

102100
public DataObjectHolder(View itemView) {
103101
super(itemView);
104102
name = (TextView) itemView.findViewById(R.id.name);
105-
camera = (ImageView) itemView.findViewById(R.id.image);
103+
camera = (com.android.volley.toolbox.NetworkImageView) itemView.findViewById(R.id.image);
106104
itemView.setOnClickListener(this);
107105
}
108106

0 commit comments

Comments
 (0)