This repository has been archived by the owner on Feb 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate code from https://github.com/cagkanciloglu/FlipViewProblemati…
- Loading branch information
Showing
10 changed files
with
526 additions
and
59 deletions.
There are no files selected for viewing
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/FrameLayout1" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent"> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" | ||
android:gravity="center" | ||
android:background="@color/darkgrey"> | ||
|
||
|
||
<ImageView | ||
android:id="@+id/gallery_flip_item_background_imageview" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:scaleType="centerCrop" | ||
android:visibility="gone"/> | ||
|
||
|
||
<ProgressBar | ||
android:id="@+id/gallery_flip_item_background_progressbar" | ||
style="?android:attr/progressBarStyleLarge" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:indeterminate="true" | ||
android:indeterminateBehavior="cycle"/> | ||
|
||
</LinearLayout> | ||
|
||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="bottom" | ||
android:background="@color/transparentBlack" | ||
android:orientation="horizontal" | ||
android:padding="5dp"> | ||
|
||
|
||
<ImageView | ||
android:id="@+id/imageView2" | ||
android:layout_width="40dp" | ||
android:layout_height="40dp" | ||
android:src="@drawable/feed_taggeduser_image"/> | ||
|
||
|
||
<TextView | ||
android:id="@+id/gallery_flip_item_place_name_ellipsizingtextview" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_vertical" | ||
android:layout_marginLeft="5dp" | ||
android:layout_marginRight="5dp" | ||
android:gravity="center_vertical" | ||
android:maxLines="2" | ||
android:text="Merve B (Gezgin): "Big Chefs'te Big Burger yedim ve gerçekten adını hak edecek kadar büyüktu :) Merve B (Gezgin): "Big Chefs'te Big Burger yedim ve gerçekten adını hak edecek kadar büyüktu :)" | ||
android:textColor="@color/white" | ||
android:textSize="12sp"/> | ||
|
||
</LinearLayout> | ||
|
||
|
||
<LinearLayout | ||
android:id="@+id/gallery_flip_item_place_linearlayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="top" | ||
android:background="@color/transparentBlack" | ||
android:orientation="horizontal" | ||
android:padding="5dp"> | ||
|
||
|
||
<ImageView | ||
android:id="@+id/gallery_flip_item_place_icon_imageview" | ||
android:layout_width="50dp" | ||
android:layout_height="50dp" | ||
android:layout_marginTop="3dp" | ||
android:scaleType="fitXY"/> | ||
|
||
|
||
<LinearLayout | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginLeft="5dp" | ||
android:orientation="vertical"> | ||
|
||
|
||
<TextView | ||
android:id="@+id/gallery_flip_item_place_name_textview" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:singleLine="true" | ||
android:text="Rumeli Hısarı İskele Restaurant" | ||
android:textColor="@color/white" | ||
android:textSize="19sp" | ||
android:textStyle="bold"/> | ||
|
||
<LinearLayout | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="3dp"> | ||
|
||
|
||
<ImageView | ||
android:id="@+id/imageView1" | ||
android:layout_width="12dp" | ||
android:layout_height="wrap_content" | ||
android:src="@drawable/icon_place_checkin"/> | ||
|
||
|
||
<LinearLayout | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginLeft="5dp" | ||
android:orientation="vertical"> | ||
|
||
|
||
<TextView | ||
android:id="@+id/gallery_flip_item_place_district_textview" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Mercan" | ||
android:textColor="@color/white" | ||
android:textSize="11sp"/> | ||
|
||
|
||
<TextView | ||
android:id="@+id/gallery_flip_item_place_city_textview" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="İstanbul" | ||
android:textColor="@color/white" | ||
android:textSize="11sp"/> | ||
|
||
</LinearLayout> | ||
</LinearLayout> | ||
</LinearLayout> | ||
</LinearLayout> | ||
|
||
</FrameLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- File created by the Android Action Bar Style Generator | ||
Copyright (C) 2012 readyState Software Ltd | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-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. | ||
--> | ||
|
||
<resources> | ||
|
||
<color name="transparentBlack">#6D000000</color> | ||
<color name="white">#FFFFFF</color> | ||
<color name="darkgrey">#949494</color> | ||
|
||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
FlipView/Demo/src/com/aphidmobile/flip/demo/issue5/GalleryFlipAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
package com.aphidmobile.flip.demo.issue5; | ||
|
||
import android.content.Context; | ||
import android.util.Log; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.BaseAdapter; | ||
import com.aphidmobile.flip.FlipViewController; | ||
|
||
import java.util.ArrayList; | ||
|
||
public class GalleryFlipAdapter extends BaseAdapter { | ||
private ArrayList<GalleryPage> galleryPageList; | ||
|
||
private Context mContext; | ||
|
||
private FlipViewController controller; | ||
|
||
public GalleryFlipAdapter(Context context, FlipViewController controller) { | ||
this.mContext = context; | ||
this.controller = controller; | ||
|
||
ArrayList<GalleryPage> list = new ArrayList<GalleryPage>(); | ||
list.add(new GalleryPage("Test 1", "http://www.hotel-chantecler.be/new-images/grand_place_building.jpg", | ||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis a rutrum arcu. Curabitur a ante at elit dictum imperdiet. Vestibulum et eros nec diam bibendum placerat. Praesent quis lectus metus. Fusce non pulvinar mi. Nulla eu urna nibh.", | ||
"http://upload.wikimedia.org/wikipedia/en/0/05/Windows_Photo_Viewer_Icon_on_Windows_7.png")); | ||
list.add(new GalleryPage("Test 2", "http://www.hotel-chantecler.be/new-images/brussels-jubelpark-cinquantenaire-triumphal%20arch-1.jpg", | ||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis a rutrum arcu. Curabitur a ante at elit dictum imperdiet. Vestibulum et eros nec diam bibendum placerat. Praesent quis lectus metus. Fusce non pulvinar mi. Nulla eu urna nibh.", | ||
"http://upload.wikimedia.org/wikipedia/en/0/05/Windows_Photo_Viewer_Icon_on_Windows_7.png")); | ||
list.add(new GalleryPage("Test 3", "http://www.hotel-chantecler.be/new-images/Belgium-Waterloo-Butte-du-Lion-hill.jpg", | ||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis a rutrum arcu. Curabitur a ante at elit dictum imperdiet. Vestibulum et eros nec diam bibendum placerat. Praesent quis lectus metus. Fusce non pulvinar mi. Nulla eu urna nibh.", | ||
"http://upload.wikimedia.org/wikipedia/en/0/05/Windows_Photo_Viewer_Icon_on_Windows_7.png")); | ||
list.add(new GalleryPage("Test 4", "http://www.hotel-chantecler.be/new-images/ATAPR048.jpg", | ||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis a rutrum arcu. Curabitur a ante at elit dictum imperdiet. Vestibulum et eros nec diam bibendum placerat. Praesent quis lectus metus. Fusce non pulvinar mi. Nulla eu urna nibh.", | ||
"http://upload.wikimedia.org/wikipedia/en/0/05/Windows_Photo_Viewer_Icon_on_Windows_7.png")); | ||
list.add(new GalleryPage("Test 5", "http://www.hotel-chantecler.be/new-images/la_bourse.jpg", | ||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis a rutrum arcu. Curabitur a ante at elit dictum imperdiet. Vestibulum et eros nec diam bibendum placerat. Praesent quis lectus metus. Fusce non pulvinar mi. Nulla eu urna nibh.", | ||
"http://upload.wikimedia.org/wikipedia/en/0/05/Windows_Photo_Viewer_Icon_on_Windows_7.png")); | ||
|
||
galleryPageList = list; | ||
} | ||
|
||
public int getCount() { | ||
return galleryPageList.size(); | ||
} | ||
|
||
public Object getItem(int position) { | ||
return galleryPageList.get(position); | ||
} | ||
|
||
public long getItemId(int position) { | ||
return position; | ||
} | ||
|
||
public View getView(int position, View convertView, ViewGroup parent) { | ||
if (convertView == null) { | ||
Log.i("GalleryFlipAdapter", "convertView == null"); | ||
convertView = new GalleryFlipItem(mContext, galleryPageList.get(position), controller, position); | ||
} else { | ||
Log.i("GalleryFlipAdapter", "convertView != null"); | ||
((GalleryFlipItem) convertView).refreshView(galleryPageList.get(position), controller, position); | ||
} | ||
return convertView; | ||
} | ||
|
||
public void clear() { | ||
galleryPageList.clear(); | ||
} | ||
} |
Oops, something went wrong.