Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
davide-imbriaco committed Jan 17, 2017
1 parent 738aaf3 commit 7728763
Show file tree
Hide file tree
Showing 21 changed files with 1,965 additions and 756 deletions.
6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "it.anyplace.syncbrowser"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
versionCode 2
versionName "1.2"
jackOptions {
enabled true
}
Expand All @@ -24,7 +24,7 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.0.1'
compile ('it.anyplace.sync:a-sync-client:1.0') {
compile ('it.anyplace.sync:a-sync-client:1.1') {
exclude group: 'commons-logging', module:'commons-logging'
exclude group: 'commons-cli'
exclude group: 'commons-codec'
Expand All @@ -36,4 +36,5 @@ dependencies {
compile 'org.slf4j:slf4j-android:1.7.13'
compile 'com.google.zxing:android-integration:3.3.0'
compile 'com.nononsenseapps:filepicker:2.5.2'
compile 'com.github.neopixl:PixlUI:v1.1.0'
}
8 changes: 6 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
android:banner="@drawable/banner"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.Syncthing">
<activity android:name="it.anyplace.syncbrowser.MainActivity">
android:theme="@style/Theme.ASync">
<activity
android:name="it.anyplace.syncbrowser.MainActivity"
android:configChanges="orientation|screenSize"
android:windowSoftInputMode="adjustResize"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
File renamed without changes.
924 changes: 581 additions & 343 deletions app/src/main/java/it/anyplace/syncbrowser/MainActivity.java

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions app/src/main/java/it/anyplace/syncbrowser/utils/ViewUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright (C) 2016 Davide Imbriaco
*
* This Java file is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package it.anyplace.syncbrowser.utils;

import android.view.View;
import android.view.ViewGroup;

import com.google.common.base.Predicates;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;

import java.util.Collection;
import java.util.Collections;
import java.util.List;

import javax.annotation.Nullable;

import static com.google.common.base.Objects.equal;

public class ViewUtils {

public static Iterable<View> listViews(View rootView){
return listViews(rootView,null);
}

public static <E extends View> Iterable<E> listViews(View rootView,@Nullable Class<E> clazz){
if(clazz == null){
if(rootView==null){
return Collections.emptyList();
}else {
if(rootView instanceof ViewGroup){
List list=Lists.newArrayList();
ViewGroup viewGroup=(ViewGroup)rootView;
list.add(viewGroup);
for(int i=0;i<viewGroup.getChildCount();i++){
list.addAll((Collection)listViews(viewGroup.getChildAt(i),null));
}
return list;
}else{
return (Iterable)Collections.singletonList(rootView);
}
}
}else{
return Iterables.filter((Iterable)listViews(rootView,null), Predicates.<Object>instanceOf(clazz));
}
}
}
13 changes: 13 additions & 0 deletions app/src/main/res/drawable/footer_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/primary_dark" />
</shape>
</item>
<item android:top="2dp">
<shape android:shape="rectangle">
<solid android:color="#FFFFFF" />
</shape>
</item>
</layer-list>
Loading

0 comments on commit 7728763

Please sign in to comment.