HentaiKingSVK
Lurker
Hi I have some problems with my app in Android studio. https://drive.google.com/drive/folders/0B2XafUfLGeaMV3FxSXFnRV9DQTg
Here is my app.
And my problem is that here I got how many images my gallery should show
In MainActivity.java
public void startGalleryActivity() {
ArrayList<String> images = new ArrayList<String>();
images.add("image1");
images.add("image2");
images.add("image3");
Intent intent = new Intent(MainActivity.this, GalleryActivity.class);
intent.putStringArrayListExtra(GalleryActivity.EXTRA_NAME, images);
startActivity(intent);
But every one of this images is the same because of layout pager_gallery_item
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android
rientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/image1"/>
</LinearLayout>
So in every slide I just get this same image.
I need help how to make my drawable images show all in that slide not just that one.
And second when I start app it open my gallery but I want it to start in Activity_main.
I know that is too much but for any help I am really thankful.
Here is my app.
And my problem is that here I got how many images my gallery should show
In MainActivity.java
public void startGalleryActivity() {
ArrayList<String> images = new ArrayList<String>();
images.add("image1");
images.add("image2");
images.add("image3");
Intent intent = new Intent(MainActivity.this, GalleryActivity.class);
intent.putStringArrayListExtra(GalleryActivity.EXTRA_NAME, images);
startActivity(intent);
But every one of this images is the same because of layout pager_gallery_item
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android
rientation="vertical"android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/image1"/>
</LinearLayout>
So in every slide I just get this same image.
I need help how to make my drawable images show all in that slide not just that one.
And second when I start app it open my gallery but I want it to start in Activity_main.
I know that is too much but for any help I am really thankful.