Commit 070908c6 authored by Donald's avatar Donald

renamed all ids

parent b7f7a90f
......@@ -101,11 +101,11 @@ public class AlbumsAdapter extends RecyclerView.Adapter<AlbumsAdapter.ViewHolder
public ViewHolder(View itemView) {
super(itemView);
picture = (ImageView) itemView.findViewById(R.id.picture);
selectHolder = (ImageView) itemView.findViewById(R.id.selectedPicIcon);
card_layout = (RelativeLayout) itemView.findViewById(R.id.layout_card_id);
name = (TextView) itemView.findViewById(R.id.picturetext);
nPhotos = (TextView) itemView.findViewById(R.id.image_number_text);
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);
name = (TextView) itemView.findViewById(R.id.album_name);
nPhotos = (TextView) itemView.findViewById(R.id.album_photos_count);
}
}
......
......@@ -103,10 +103,10 @@ public class PhotosAdapter extends RecyclerView.Adapter<PhotosAdapter.ViewHolder
public ViewHolder(View itemView) {
super(itemView);
imageView = (ImageView) itemView.findViewById(R.id.pic);
selectHolder = (ImageView) itemView.findViewById(R.id.selectedPicIcon);
gifIcon = (ImageView) itemView.findViewById(R.id.gifIcon);
path = (TextView) itemView.findViewById(R.id.path);
imageView = (ImageView) itemView.findViewById(R.id.photo_preview);
selectHolder = (ImageView) itemView.findViewById(R.id.selected_icon);
gifIcon = (ImageView) itemView.findViewById(R.id.type_icon);
path = (TextView) itemView.findViewById(R.id.photo_path);
}
}
}
......
......@@ -57,14 +57,14 @@ public class PhotosPagerAdapter extends android.support.v4.view.PagerAdapter {
if (f.MIME.equals("image/gif")) {
itemView = mLayoutInflater.inflate(R.layout.gif_pager_layout, container, false);
ImageView picture = (ImageView) itemView.findViewById(R.id.imageView);
ImageView picture = (ImageView) itemView.findViewById(R.id.media_view);
picture.setOnClickListener(onClickListener);
Ion.with(container.getContext())
.load(f.Path)
.intoImageView(picture);
} else {
itemView = mLayoutInflater.inflate(R.layout.image_pager_item, container, false);
final SubsamplingScaleImageView picture = (SubsamplingScaleImageView) itemView.findViewById(R.id.imageView);
final SubsamplingScaleImageView picture = (SubsamplingScaleImageView) itemView.findViewById(R.id.media_view);
Glide.with(container.getContext())
.load(mResources.get(position).Path)
......
......@@ -75,9 +75,9 @@ public class SelectAlbumAdapter extends RecyclerView.Adapter<SelectAlbumAdapter.
public ViewHolder(View itemView) {
super(itemView);
picture = (ImageView) itemView.findViewById(R.id.item_image_img);
picture = (ImageView) itemView.findViewById(R.id.album_preview);
name = (TextView) itemView.findViewById(R.id.album_name);
nPhotos = (TextView) itemView.findViewById(R.id.photoCount);
nPhotos = (TextView) itemView.findViewById(R.id.album_photos_count);
}
}
}
......
......@@ -111,7 +111,7 @@ public class AlbumsActivity extends AppCompatActivity implements FolderChooserDi
getWindow().setNavigationBarColor(getColor(R.color.toolbar));
}
/**** ToolBar *****/
toolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar);
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
/**** Status Bar */
//getWindow().setStatusBarColor(getColor(R.color.status_bar));
......@@ -185,7 +185,7 @@ public class AlbumsActivity extends AppCompatActivity implements FolderChooserDi
}
public void addHiddenFolder_FABEvent() {
FloatingActionButton btnAddFolder = (FloatingActionButton) findViewById(R.id.fabAddFolder);
FloatingActionButton btnAddFolder = (FloatingActionButton) findViewById(R.id.fab_add_folder);
if (hidden) {
btnAddFolder.setVisibility(View.VISIBLE);
......@@ -460,12 +460,12 @@ public class AlbumsActivity extends AppCompatActivity implements FolderChooserDi
albums.loadPreviewAlbums();
mRecyclerView = (RecyclerView) findViewById(R.id.gridAlbums);
mRecyclerView = (RecyclerView) findViewById(R.id.grid_albums);
adapt = new AlbumsAdapter(albums.dispAlbums, R.layout.album_card);
adapt.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
TextView a = (TextView) v.findViewById(R.id.picturetext);
TextView a = (TextView) v.findViewById(R.id.album_name);
adapt.notifyItemChanged(albums.selectAlbum(a.getTag().toString(), true));
editmode = true;
invalidateOptionsMenu();
......@@ -476,7 +476,7 @@ public class AlbumsActivity extends AppCompatActivity implements FolderChooserDi
adapt.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
TextView a = (TextView) v.findViewById(R.id.picturetext);
TextView a = (TextView) v.findViewById(R.id.album_name);
if (editmode) {
adapt.notifyItemChanged(albums.toggleSelectAlbum(a.getTag().toString()));
invalidateOptionsMenu();
......
......@@ -16,7 +16,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;
......@@ -56,7 +55,7 @@ public class PhotoActivity extends AppCompatActivity {
toggleSystemUI();
}
});
mViewPager = (ViewPager) findViewById(R.id.pager);
mViewPager = (ViewPager) findViewById(R.id.photos_pager);
mViewPager.setAdapter(mCustomPagerAdapter);
mViewPager.setCurrentItem(photos.getCurrentPhotoIndex());
......@@ -211,7 +210,7 @@ public class PhotoActivity extends AppCompatActivity {
public void initUiTweaks() {
/**** ToolBar ********/
toolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar);
toolbar = (Toolbar) findViewById(R.id.toolbar);
toolbar.setBackgroundColor(getColor(R.color.transparent_gray));
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
......
......@@ -94,13 +94,13 @@ public class PhotosActivity extends AppCompatActivity {
final Album album = data.getParcelable("album");
photos = new HandlingPhotos(PhotosActivity.this, album);
mRecyclerView = (RecyclerView) findViewById(R.id.gridPhotos);
mRecyclerView = (RecyclerView) findViewById(R.id.grid_photos);
adapter = new PhotosAdapter(photos.photos, R.layout.photo_card);
adapter.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
TextView is = (TextView) v.findViewById(R.id.path);
TextView is = (TextView) v.findViewById(R.id.photo_path);
if (editmode) {
adapter.notifyItemChanged(photos.toggleSelectPhoto(is.getTag().toString()));
invalidateOptionsMenu();
......@@ -117,7 +117,7 @@ public class PhotosActivity extends AppCompatActivity {
adapter.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
TextView is = (TextView) v.findViewById(R.id.path);
TextView is = (TextView) v.findViewById(R.id.photo_path);
adapter.notifyItemChanged(photos.selectPhoto(is.getTag().toString(), true));
editmode = true;
invalidateOptionsMenu();
......@@ -475,7 +475,7 @@ public class PhotosActivity extends AppCompatActivity {
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
headerImage = (ImageView) findViewById(R.id.image);
headerImage = (ImageView) findViewById(R.id.header_image);
Glide.with(this)
.load(photos.getPreviewAlbumImg())
.asBitmap()
......@@ -493,7 +493,7 @@ public class PhotosActivity extends AppCompatActivity {
collapsingToolbarLayout.setContentScrimColor(getColor(R.color.toolbar));
collapsingToolbarLayout.setStatusBarScrimColor(getColor(R.color.toolbar));
FloatingActionButton fabCamera = (FloatingActionButton) findViewById(R.id.fabCamera);
FloatingActionButton fabCamera = (FloatingActionButton) findViewById(R.id.fab_camera);
fabCamera.setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(SP.getString("PrefColor", "#03A9F4"))));
fabCamera.setOnClickListener(new View.OnClickListener() {
......@@ -507,7 +507,7 @@ public class PhotosActivity extends AppCompatActivity {
}
private void updateHeaderContent() {
headerImage = (ImageView) findViewById(R.id.image);
headerImage = (ImageView) findViewById(R.id.header_image);
Glide.with(this)
.load(photos.getPreviewAlbumImg())
.asBitmap()
......@@ -516,9 +516,9 @@ public class PhotosActivity extends AppCompatActivity {
.into(headerImage);
headerImage.setColorFilter(0x77000000, PorterDuff.Mode.SRC_ATOP);
TextView textView = (TextView) findViewById(R.id.AlbumName);
TextView textView = (TextView) findViewById(R.id.album_name);
textView.setText(photos.DisplayName);
textView = (TextView) findViewById(R.id.AlbumNPhotos);
textView = (TextView) findViewById(R.id.album_photos_count);
SP = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
String SColor = SP.getString("PrefColor", "#03A9F4");
......
......@@ -61,7 +61,7 @@ public class SelectAlbumActivity extends AppCompatActivity {
albums.loadPreviewAlbums();
mRecyclerView = (RecyclerView) findViewById(R.id.gridAlbums);
mRecyclerView = (RecyclerView) findViewById(R.id.grid_albums);
adapt = new SelectAlbumAdapter(albums.dispAlbums, R.layout.select_album_card);
......
......@@ -8,28 +8,27 @@
android:orientation="vertical"
tools:context=".MainActivity"
android:background="@color/background_material_dark">
<!--
android:background="@color/background_material_dark">
-->
<LinearLayout
android:layout_width="fill_parent"
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:elevation="5dp">
<include layout="@layout/toolbar"
android:id="@+id/toolbar"/>
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:elevation="5dp">
<include layout="@layout/toolbar"
android:id="@+id/my_awesome_toolbar"/>
android:id="@+id/grid_albums"
android:layout_gravity="center_horizontal"
android:numColumns="auto_fit"
/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/gridAlbums"
android:layout_gravity="center_horizontal"
android:numColumns="auto_fit"
/>
</LinearLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabAddFolder"
android:onClick="addFolder"
android:id="@+id/fab_add_folder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:borderWidth="0dp"
......
......@@ -10,14 +10,14 @@
>
<include layout="@layout/toolbar"
android:id="@+id/my_awesome_toolbar"
android:id="@+id/toolbar"
android:background="@color/trasparent_toolbar"
android:windowActionBarOverlay="true"
/>
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:id="@+id/photos_pager"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v4.view.ViewPager>
</RelativeLayout>
\ No newline at end of file
......@@ -32,7 +32,7 @@
app:layout_collapseMode="parallax">
<ImageView
android:id="@+id/image"
android:id="@+id/header_image"
android:layout_width="match_parent"
android:layout_height="250dp"
android:scaleType="centerCrop"/>
......@@ -43,7 +43,7 @@
android:layout_height="wrap_content">
<TextView
android:id="@+id/AlbumName"
android:id="@+id/album_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
......@@ -53,14 +53,14 @@
android:textColor="@android:color/white"
android:textSize="30sp"/>
<View
android:id="@+id/divider"
android:id="@+id/album_card_divider"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@android:color/white"
android:layout_marginStart="60dp"
android:layout_marginEnd="60dp"/>
<TextView
android:id="@+id/AlbumNPhotos"
android:id="@+id/album_photos_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
......@@ -93,14 +93,14 @@
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/gridPhotos"
android:id="@+id/grid_photos"
android:clipToPadding="false"
android:background="@color/md_dark_background"
/>
</android.support.v7.widget.CardView>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabCamera"
android:id="@+id/fab_camera"
style="@style/fab"
android:theme="@style/ThemeOverlay.AppCompat.Light"
app:borderWidth="0dp"
......
......@@ -15,16 +15,16 @@
>
<RelativeLayout
android:id="@+id/layout_card_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/toolbar">
android:id="@+id/album_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/toolbar">
<RelativeLayout
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:id="@+id/header_album_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/selectedPicIcon"
android:id="@+id/selected_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
......@@ -35,32 +35,32 @@
android:layout_centerVertical="true"
/>
<ImageView
android:id="@+id/picture"
android:layout_width="match_parent"
android:layout_height="140dp"
android:scaleType="centerCrop"
android:id="@+id/album_preview"
android:layout_width="match_parent"
android:layout_height="140dp"
android:scaleType="centerCrop"
/>
</RelativeLayout>
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_below="@id/img"
android:background="@android:color/darker_gray"
android:id="@+id/album_card_divider"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_below="@id/header_album_card"
android:background="@android:color/darker_gray"
/>
<LinearLayout
android:id="@+id/linear_card_text"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_below="@id/divider"
android:id="@+id/linear_card_text"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_below="@id/album_card_divider"
>
<TextView
android:id="@+id/picturetext"
android:id="@+id/album_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="10dp"
......@@ -71,7 +71,7 @@
android:textSize="16sp"
/>
<TextView
android:id="@+id/image_number_text"
android:id="@+id/album_photos_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="10dp"
......
......@@ -6,7 +6,7 @@
<ImageView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/imageView"
android:id="@+id/media_view"
android:layout_width="match_parent"
android:layout_gravity="center_vertical"
android:layout_height="match_parent"/>
......
......@@ -12,7 +12,7 @@
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/AlbumName"
android:id="@+id/album_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
......@@ -24,7 +24,7 @@
android:text="Slide"
/>
<View
android:id="@+id/divider"
android:id="@+id/album_card_divider"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@android:color/white"
......@@ -32,7 +32,7 @@
android:layout_marginEnd="30dp"
/>
<TextView
android:id="@+id/AlbumNPhotos"
android:id="@+id/album_photos_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
......
......@@ -6,7 +6,7 @@
<com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/imageView"
android:id="@+id/media_view"
android:layout_width="match_parent"
android:layout_gravity="center_vertical"
android:layout_height="match_parent"/>
......
......@@ -6,7 +6,7 @@
android:layout_margin="2dp"
>
<ImageView
android:id="@+id/selectedPicIcon"
android:id="@+id/selected_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
......@@ -16,7 +16,7 @@
android:layout_margin="10dp"
/>
<ImageView
android:id="@+id/gifIcon"
android:id="@+id/type_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
......@@ -29,11 +29,11 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/path"
android:id="@+id/photo_path"
android:visibility="invisible"
/>
<ImageView
android:id="@+id/pic"
android:id="@+id/photo_preview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
......
......@@ -9,7 +9,7 @@
android:id="@+id/card_photo"
>
<ImageView
android:id="@+id/selectedPicIcon"
android:id="@+id/selected_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
......@@ -19,7 +19,7 @@
android:layout_margin="10dp"
/>
<ImageView
android:id="@+id/gifIcon"
android:id="@+id/type_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
......@@ -32,11 +32,11 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/path"
android:id="@+id/photo_path"
android:visibility="invisible"
/>
<ImageView
android:id="@+id/pic"
android:id="@+id/photo_preview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="120dp"
......
......@@ -16,7 +16,7 @@
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:id="@+id/gridAlbums"
android:id="@+id/grid_albums"
/>
</LinearLayout>
\ No newline at end of file
......@@ -5,29 +5,24 @@
android:layout_height="wrap_content"
>
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_margin="4dp"
android:orientation="vertical"
tools:ignore="MissingPrefix"
android:orientation="vertical"
tools:ignore="MissingPrefix"
>
<ImageView
android:id="@+id/item_image_img"
android:id="@+id/album_preview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="false"
android:scaleType="centerCrop"/>
<FrameLayout
android:id="@+id/item_image_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:foreground="?selectableItemBackgroundBorderless"
......@@ -35,7 +30,6 @@
<LinearLayout
android:id="@+id/item_text_container"
android:layout_width="match_parent"
android:layout_height="72dp"
android:layout_gravity="bottom"
......@@ -59,7 +53,7 @@
android:textSize="16sp"/>
<TextView
android:id="@+id/photoCount"
android:id="@+id/album_photos_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
......
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