Commit 46a077d3 authored by Gilbert Ndresaj's avatar Gilbert Ndresaj 💬

Graphic Tweeks

Graphic Tweeks
parent 42fb382c
......@@ -55,8 +55,8 @@ public class AlbumsAdapter extends RecyclerView.Adapter<AlbumsAdapter.ViewHolder
.placeholder(R.drawable.ic_empty)
.into(holder.picture);
holder.name.setText(a.DisplayName);
holder.name.setText(Html.fromHtml("<i><font>" + a.DisplayName + "</font></i>"));
// color='"+R.color.toolbar+"'
SharedPreferences SP;
SP = PreferenceManager.getDefaultSharedPreferences(holder.picture.getContext());
String SColor = SP.getString("PrefColor", "#03A9F4");
......
......@@ -13,13 +13,18 @@ import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.*;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.PopupMenu;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.MaterialDialog;
import com.leafpic.app.Adapters.AlbumsAdapter;
......@@ -40,10 +45,6 @@ import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem;
public class AlbumsActivity extends AppCompatActivity {
HandlingAlbums albums = new HandlingAlbums(AlbumsActivity.this);
boolean editmode = false, hidden = false;
......@@ -61,8 +62,6 @@ public class AlbumsActivity extends AppCompatActivity {
initUiTweaks();
checkPermissions();
//APP INTRO STATS HEARE DIO CANE
Thread t = new Thread(new Runnable() {
@Override
......@@ -106,15 +105,14 @@ public class AlbumsActivity extends AppCompatActivity {
public void initUiTweaks(){
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getWindow().setStatusBarColor(getColor(R.color.toolbar));
getWindow().setStatusBarColor(getColor(R.color.status_bar));
SP = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
boolean NavBar = SP.getBoolean("nav_bar", false);
//boolean NightTheme = SP.getBoolean("set_theme", false);
if (NavBar)
getWindow().setNavigationBarColor(getColor(R.color.toolbar));
}
/**** ToolBar*/
/**** ToolBar */
toolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar);
setSupportActionBar(toolbar);
......@@ -389,8 +387,6 @@ public class AlbumsActivity extends AppCompatActivity {
return true;
}
@Override
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
switch (requestCode) {
......@@ -405,7 +401,6 @@ public class AlbumsActivity extends AppCompatActivity {
}
}
private void loadAlbums() {
if (hidden) {
......@@ -458,6 +453,5 @@ public class AlbumsActivity extends AppCompatActivity {
mRecyclerView.setAdapter(adapt);
mRecyclerView.setLayoutManager(new GridLayoutManager(this, 2));
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
}
}
......@@ -24,9 +24,15 @@ import android.support.v7.widget.Toolbar;
import android.text.Html;
import android.text.InputType;
import android.transition.Slide;
import android.view.*;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;
import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.MaterialDialog;
import com.bumptech.glide.Glide;
......@@ -79,7 +85,7 @@ public class PhotosActivity extends AppCompatActivity {
//Bitmap bitmap = ((BitmapDrawable) image.getDrawable()).getBitmap();
// Drawable b = new Drawable.createFromPath(photos.getPreviewAlbumImg());
//}.decode//.decodeFile(photos.getPreviewAlbumImg());
Palette.from(bitmap).generate(new Palette.PaletteAsyncListener() {
Palette.from(bitmap).generate(new Palette.PaletteAsyncListener() {
@Override
public void onGenerated(Palette palette) {
int primaryDark = getColor(R.color.toolbar);
......@@ -87,10 +93,8 @@ public class PhotosActivity extends AppCompatActivity {
collapsingToolbarLayout.setContentScrimColor(palette.getMutedColor(primary));
collapsingToolbarLayout.setStatusBarScrimColor(palette.getMutedColor(primary));
//collapsingToolbarLayout.setStatusBarScrimColor(palette.getDarkVibrantColor(primaryDark));
}
});
}
});
}
public void LoadPhotos() {
......@@ -373,11 +377,14 @@ public class PhotosActivity extends AppCompatActivity {
}
/**** Status Bar */
/*Window window = getWindow();
//getWindow().setStatusBarColor(getColor(R.color.status_bar));
Window window = getWindow();
//window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
setStatusBarTranslucent(true);
window.setStatusBarColor(getColor(R.color.toolbar));*/
window.setStatusBarColor(getColor(R.color.toolbar));
/**** ToolBar*/
......@@ -385,10 +392,6 @@ public class PhotosActivity extends AppCompatActivity {
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
headerImage = (ImageView) findViewById(R.id.image);
Glide.with(this)
.load(photos.getPreviewAlbumImg())
......@@ -400,7 +403,6 @@ public class PhotosActivity extends AppCompatActivity {
//OSCURA LIMMAGINE
headerImage.setColorFilter(0x77000000, PorterDuff.Mode.SRC_ATOP);
updateHeaderContent();
collapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
......@@ -408,19 +410,22 @@ public class PhotosActivity extends AppCompatActivity {
collapsingToolbarLayout.setExpandedTitleGravity(Gravity.CENTER_HORIZONTAL);
collapsingToolbarLayout.setExpandedTitleColor(getColor(android.R.color.transparent));
/*******
* DRAWER
* ******/
collapsingToolbarLayout.setContentScrimColor(getColor(R.color.toolbar));
collapsingToolbarLayout.setStatusBarScrimColor(getColor(R.color.toolbar));
//setPalette();
/* File image = new File(photos.getPreviewAlbumImg());
/* RALLENTA TROPPO IL CARICAMENTO DIO PORCO
File image = new File(photos.getPreviewAlbumImg());
BitmapFactory.Options bmOptions = new BitmapFactory.Options();
Bitmap bitmap = BitmapFactory.decodeFile(image.getAbsolutePath(),bmOptions);
setPalette(bitmap);*/
setPalette(bitmap);
*/
/*******
* DRAWER
* ******/
}
private void updateHeaderContent() {
......@@ -431,14 +436,12 @@ public class PhotosActivity extends AppCompatActivity {
.centerCrop()
.placeholder(R.drawable.ic_empty)
.into(headerImage);
headerImage.setColorFilter(0x77000000, PorterDuff.Mode.SRC_ATOP);
TextView textView = (TextView) findViewById(R.id.AlbumName);
textView.setText(photos.DisplayName);
textView = (TextView) findViewById(R.id.AlbumNPhotos);
SharedPreferences SP;
SP = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
String SColor = SP.getString("PrefColor", "#03A9F4");
......
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:orientation="vertical"
tools:context=".MainActivity"
android:background="@color/background_material_dark"
>
android:background="@color/background_material_dark">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
......@@ -24,5 +22,4 @@
android:numColumns="auto_fit"
/>
</LinearLayout>
</RelativeLayout>
......@@ -2,7 +2,7 @@
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="140dp"
android:layout_height="120dp"
>
<ImageView
android:id="@+id/selectedPicIcon"
......@@ -13,6 +13,7 @@
android:elevation="10dp"
android:src="@mipmap/ic_check_circle_white_18dp"
android:layout_gravity="top|end"
android:layout_margin="10dp"
/>
<ImageView
android:id="@+id/gifIcon"
......
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