Commit cfdac210 authored by DNLDsht's avatar DNLDsht

fuck jitpack ssl certicate!

+ clean
parent 5699e9fa
......@@ -3,17 +3,15 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
apply plugin: 'com.android.application'
repositories {
jcenter()
maven {
url "http://dl.bintray.com/dasar/maven"
}
mavenCentral()
maven { url "http://repo1.maven.org/maven2" }
maven { url "http://jitpack.io" }
}
android {
......@@ -46,12 +44,12 @@ dependencies {
compile 'com.android.support:appcompat-v7:+'
compile 'com.android.support:cardview-v7:+'
compile 'com.android.support:recyclerview-v7:+'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:+'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.4.1'
compile 'com.android.support:design:+'
compile 'com.android.support:palette-v7:+'
compile 'com.github.bumptech.glide:glide:+'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:support-v4:+'
compile 'com.koushikdutta.ion:ion:2.+'
compile 'com.koushikdutta.ion:ion:2.1.7'
compile('com.mikepenz:materialdrawer:4.6.4@aar') {
transitive = true
}
......@@ -60,13 +58,11 @@ dependencies {
compile 'com.mikepenz:google-material-typeface:2.1.0.1.original@aar'
compile 'com.mikepenz:fontawesome-typeface:4.5.0.1@aar'
compile('com.github.afollestad.material-dialogs:core:0.8.5.3@aar') {
/*compile('com.github.afollestad.material-dialogs:core:0.8.5.3@aar') {
transitive = true
}
compile('com.github.afollestad.material-dialogs:commons:0.8.5.3@aar') {
transitive = true
}
compile(group: 'uz.shift', name: 'colorpicker', version: '0.5', ext: 'aar')
compile 'com.github.paolorotolo:appintro:+'
compile 'com.github.LarsWerkman:Lobsterpicker:+'
}*/
compile 'com.github.paolorotolo:appintro:3.4.0'
}
......@@ -2,14 +2,17 @@ package com.leafpic.app.Adapters;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.preference.PreferenceManager;
import android.support.v7.widget.RecyclerView;
import android.text.Html;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.bumptech.glide.Glide;
......@@ -55,40 +58,31 @@ public class AlbumsAdapter extends RecyclerView.Adapter<AlbumsAdapter.ViewHolder
.centerCrop()
.placeholder(R.drawable.ic_empty)
.into(holder.picture);
SharedPreferences SP;
SP = PreferenceManager.getDefaultSharedPreferences(holder.picture.getContext());
String titcolor;
boolean darkTheme = SP.getBoolean("set_dark_theme", false);
if (darkTheme==true){
titcolor="#FAFAFA";
holder.card_layout.setBackgroundColor(holder.card_layout.getContext().getColor(R.color.background_material_dark));
}else {
titcolor="4#24242";
holder.card_layout.setBackgroundColor(holder.card_layout.getContext().getColor(R.color.background_material_light));
}
holder.name.setText(Html.fromHtml("<i><font color='" + titcolor + "'>" + a.DisplayName + "</font></i>"));
String SColor = SP.getString("PrefColor", "#03A9F4");
holder.nPhotos.setText(Html.fromHtml("<b><font color='" + SColor + "'>" + a.getImagesCount() + "</font></b>" + "<font " +
"color='#FFFFFF'> Photos</font>"));//FFFFFF
holder.name.setTag(a.Path);
SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(holder.picture.getContext());
if (a.isSelected()) {
holder.card_layout.setBackgroundColor(holder.card_layout.getContext().getColor(R.color.selected_album));
holder.picture.setColorFilter(0x77000000, PorterDuff.Mode.SRC_ATOP);
holder.selectHolder.setVisibility(View.VISIBLE);
} else {
holder.card_layout.setBackgroundColor(holder.card_layout.getContext().getColor(R.color.unselected_album));
holder.picture.clearColorFilter();
holder.selectHolder.setVisibility(View.INVISIBLE);
if (SP.getBoolean("set_dark_theme", false))
holder.card_layout.setBackgroundColor(holder.card_layout.getContext().getColor(R.color.background_material_dark));
else
holder.card_layout.setBackgroundColor(holder.card_layout.getContext().getColor(R.color.background_material_light));
}
String textColor;
if (SP.getBoolean("set_dark_theme", false)) textColor="#FAFAFA";
else textColor="#2b2b2b";
holder.name.setText(Html.fromHtml("<i><font color='" + textColor + "'>" + a.DisplayName + "</font></i>"));
holder.nPhotos.setText(Html.fromHtml("<b><font color='" + SP.getString("PrefColor", "#03A9F4") + "'>" + a.getImagesCount() + "</font></b>" + "<font " +
"color='" + textColor + "'> Photos</font>"));
}
......@@ -107,7 +101,7 @@ public class AlbumsAdapter extends RecyclerView.Adapter<AlbumsAdapter.ViewHolder
public static class ViewHolder extends RecyclerView.ViewHolder {
RelativeLayout card_layout;
LinearLayout card_layout;
ImageView picture;
ImageView selectHolder;
TextView name;
......@@ -117,7 +111,7 @@ public class AlbumsAdapter extends RecyclerView.Adapter<AlbumsAdapter.ViewHolder
super(itemView);
picture = (ImageView) itemView.findViewById(R.id.album_preview);
selectHolder = (ImageView) itemView.findViewById(R.id.selected_icon);
card_layout = (RelativeLayout) itemView.findViewById(R.id.album_card);
card_layout = (LinearLayout) itemView.findViewById(R.id.linear_card_text);
name = (TextView) itemView.findViewById(R.id.album_name);
nPhotos = (TextView) itemView.findViewById(R.id.album_photos_count);
}
......
package com.leafpic.app;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
......@@ -8,6 +9,7 @@ import android.os.Handler;
import android.provider.MediaStore;
import android.support.annotation.NonNull;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.text.InputType;
......@@ -16,8 +18,6 @@ import android.view.MenuItem;
import android.view.View;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.MaterialDialog;
import com.leafpic.app.Adapters.PhotosPagerAdapter;
import com.leafpic.app.Animations.DepthPageTransformer;
import com.leafpic.app.Base.HandlingPhotos;
......@@ -117,23 +117,22 @@ public class PhotoActivity extends AppCompatActivity {
return true;
case R.id.deletePhoto:
new MaterialDialog.Builder(this)
.content(R.string.delete_photo_message)
.positiveText("DELETE")
.negativeText("CANCEL")
.onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
int index = mViewPager.getCurrentItem();
mViewPager.removeView(mViewPager.getChildAt(index));
//TODO improve delete single photo
photos.deleteCurrentPhoto();
mCustomPagerAdapter.notifyDataSetChanged();
mViewPager.destroyDrawingCache();
mViewPager.setCurrentItem(index + 1);
}
})
.show();
AlertDialog.Builder builder1 = new AlertDialog.Builder(PhotoActivity.this);
builder1.setMessage(R.string.delete_album_message);
builder1.setPositiveButton("DELETE", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
int index = mViewPager.getCurrentItem();
mViewPager.removeView(mViewPager.getChildAt(index));
//TODO improve delete single photo
photos.deleteCurrentPhoto();
mCustomPagerAdapter.notifyDataSetChanged();
mViewPager.destroyDrawingCache();
mViewPager.setCurrentItem(index + 1);
}
})
.setNegativeButton("CANCEL", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {}});
builder1.show();
return true;
......@@ -156,7 +155,7 @@ public class PhotoActivity extends AppCompatActivity {
case R.id.renamePhoto:
new MaterialDialog.Builder(this)
/* new MaterialDialog.Builder(this)
.title("Rename Photo")
.inputType(InputType.TYPE_CLASS_TEXT)
.input(null, StringUtils.getPhotoNamebyPath(photos.getCurrentPhoto().Path), new MaterialDialog.InputCallback() {
......@@ -166,7 +165,7 @@ public class PhotoActivity extends AppCompatActivity {
photos.getCurrentPhoto().Path,
input + StringUtils.getPhotoExtensionbyPath(photos.getCurrentPhoto().Path));
}
}).show();
}).show();*/
break;
case R.id.Modify:
......@@ -198,7 +197,7 @@ public class PhotoActivity extends AppCompatActivity {
cursor.close();
/**DIALOG**/
new MaterialDialog.Builder(this)
/* new MaterialDialog.Builder(this)
.title("Photo Details")
.content("Path: \t" + photos.getCurrentPhoto().Path
+ "\nSize: \t" + size
......@@ -206,7 +205,7 @@ public class PhotoActivity extends AppCompatActivity {
+ "\nType: \t" + photos.getCurrentPhoto().MIME
+ "\nDate: \t" + date)
.positiveText("DONE")
.show();
.show();*/
break;
case R.id.setting:
......
......@@ -14,7 +14,6 @@ import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import com.afollestad.materialdialogs.MaterialDialog;
public class SettingsActivity extends AppCompatActivity {
......@@ -80,7 +79,7 @@ public class SettingsActivity extends AppCompatActivity {
@Override
public boolean onPreferenceClick(Preference preference) {
new MaterialDialog.Builder(getContext())
/* new MaterialDialog.Builder(getContext())
.title(R.string.setting_accent_color_title)
.items(R.array.preference_accent_Color)
.itemsCallbackSingleChoice(-1, new MaterialDialog.ListCallbackSingleChoice() {
......@@ -91,7 +90,7 @@ public class SettingsActivity extends AppCompatActivity {
}
})
.positiveText("OK")
.show();
.show();*/
return false;
}
......
......@@ -10,6 +10,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardBackgroundColor="@android:color/background_dark"
app:cardElevation="5dp"
android:layout_margin="1dp"
>
......@@ -18,7 +19,7 @@
android:id="@+id/album_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/toolbar">
>
<RelativeLayout
android:id="@+id/header_album_card"
......@@ -47,7 +48,6 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_below="@id/header_album_card"
android:background="@android:color/darker_gray"
/>
<LinearLayout
......
......@@ -15,7 +15,40 @@
android:orderInCategory="1"
android:icon="@mipmap/ic_sort_white_24dp"
app:showAsAction="ifRoom"
/>
>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<group android:enabled="true" android:checkableBehavior="single">
<item
android:id="@+id/name_sort_action"
android:checked="false"
android:title="by Name"
app:showAsAction="ifRoom"
/>
<item
android:id="@+id/date_taken_sort_action"
android:title="by Date Taken"
app:showAsAction="ifRoom"
/>
<item
android:id="@+id/size_sort_action"
android:title="by Size"
android:checked="false"
app:showAsAction="ifRoom"
/>
</group>
<group android:checkableBehavior="all">
<item
android:id="@+id/ascending_sort_action"
android:title="Ascending"
android:checked="false"
app:showAsAction="ifRoom"
/>
</group>
</menu>
</item>
<item
android:id="@+id/sharePhotos"
android:icon="@mipmap/ic_share_white_24dp"
......
<menu
xmlns:android="http://schemas.android.com/apk/res/android"
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<group android:enabled="true" android:checkableBehavior="single">
......
......@@ -31,6 +31,7 @@
<!--GREY-->
<color name="grey_1">#727272</color>
<color name="grey_2">#424242</color>
<color name="grey_3">#2b2b2b</color>
<color name="transparent_gray">#96100e11</color>
<!--GREEN-->
<color name="green_1">#727272</color>
......
......@@ -3,37 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:useStockLayout="true">
<PreferenceCategory
android:title="@string/general_setting"
>
<!-- YOUR NAME-->
<com.afollestad.materialdialogs.prefs.MaterialEditTextPreference
android:defaultValue="Android"
android:dialogMessage="Write your name"
android:dialogTitle="Name"
android:inputType="textPersonName"
android:key="username"
android:persistent="true"
android:summary="Pleas Provide Your Name"
android:title="Your Name" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/security_setting">
<!--SECURITY - PSWORD FOR HIDDEN FOLDER-->
<com.afollestad.materialdialogs.prefs.MaterialEditTextPreference
android:defaultValue="Android"
android:dialogMessage="Set A password for access to Hidden Folder"
android:dialogTitle="Hidden Folder Password"
android:inputType="textPersonName"
android:key="password"
android:persistent="true"
android:summary="Pleas Provide a Password for access to hidden folders."
android:title="User Password" />
</PreferenceCategory>
>
<PreferenceCategory
android:title="@string/theme_setting"
>
......@@ -85,5 +55,36 @@
/>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/general_setting"
>
<!-- YOUR NAME-->
<EditTextPreference
android:defaultValue="Android"
android:dialogMessage="Write your name"
android:dialogTitle="Name"
android:inputType="textPersonName"
android:key="username"
android:persistent="true"
android:summary="Pleas Provide Your Name"
android:title="Your Name" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/security_setting">
<!--SECURITY - PSWORD FOR HIDDEN FOLDER-->
<EditTextPreference
android:defaultValue="Android"
android:dialogMessage="Set A password for access to Hidden Folder"
android:dialogTitle="Hidden Folder Password"
android:inputType="textPersonName"
android:key="password"
android:persistent="true"
android:summary="Pleas Provide a Password for access to hidden folders."
android:title="User Password" />
</PreferenceCategory>
</PreferenceScreen>
\ No newline at end of file
......@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.android.tools.build:gradle:1.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
......
Stack trace:
Frame Function Args
0081FF94 777038F4 (00373000, D36E1C23, 00000000, 00000000)
0081FFDC 778356C3 (FFFFFFFF, 7785B6F0, 00000000, 00000000)
0081FFEC 7783568E (00401000, 00373000, 00000000, 00000000)
End of stack trace
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment