collage_item_one.xml
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android">
android:id="@+id/rel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<com.cgfx.photo.cgspecialfx.widget.photosortrview>
android:id="@+id/photoSortrViewOne"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:id="@+id/ivOne"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerInParent="true"
android:src="@drawable/addnewpic"/>
</com.cgfx.photo.cgspecialfx.widget.photosortrview>
</relativelayout>
one.xml
="1.0"="utf-8"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rlScreenShot"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="@+id/llBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:removed="@android:color/transparent"
android:orientation="vertical" >
<include
android:id="@+id/view1"
layout="@layout/college_item_one" />
</LinearLayout>
</RelativeLayout>
main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:whatever="http://schemas.android.com/apk/res-auto"
xmlns:widget="http://schemas.android.com/apk/res-auto"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:removed="@color/gray"
android:orientation="vertical" >
<com.pixr.photo.cgspecialfx.widget.SquareFrameLayout
android:id="@+id/squareFrameLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerInParent="true"
android:layout_below="@+id/adView"
android:removed="@android:color/white" >
<ViewStub
android:id="@+id/changeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
layout="@layout/college_item_one" />
<ImageView
android:id="@+id/ivFrame"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</ImageView>
<com.pixr.photo.cgspecialfx.widget.PhotoSortrView
android:id="@+id/photoSorterStickerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
</com.pixr.photo.cgspecialfx.widget.SquareFrameLayout>
</RelativeLayout>
activity.java
public class CollegeActivity extends Activity implements OnClickListener,
OnTouchListener, OnItemClickListener, SeekBar.OnSeekBarChangeListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = getIntent();
int id = intent.getIntExtra(Utils.GRID_ITEM_NO, 0);
setLayoutBasedFromChooser(id);
ParseInstallation.getCurrentInstallation().saveInBackground();
}
private void setLayoutBasedFromChooser(int id) {
System.out.println("Selected ID is : - " + id);
switch (id) {
case 0:
layout = R.layout.one;
break;
}
setContentView(R.layout.college_main);
initilizationView();
}
private void initilizationView() {
squareFrameLayout = (SquareFrameLayout) findViewById(R.id.squareFrameLayout);
stub = (ViewStub) findViewById(R.id.changeLayout);
stub.setLayoutResource(layout);
View inflated = stub.inflate();
includeView1 = (View) findViewById(R.id.view1);
if (includeView1 != null) {
pView1 = (PhotoSortrView) includeView1
.findViewById(R.id.photoSortrViewOne);
pView1.setBackgroundColor(Color.DKGRAY);
params1 = (RelativeLayout.LayoutParams) pView1.getLayoutParams();
ivSelectorImage[0] = (ImageView) includeView1
.findViewById(R.id.ivOne);
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.ivOne:
pSelected = pView1;
onGalleryClicked();
break;
}}
}
......
What I have tried:
above code will give a square shape grid i want make it as a round shape .what should i do..?