In XML File
<RelativeLayout
android:id="@+id/tableLayoutratingReview"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_50"
android:background="@color/colorPrimary">
<Button
android:id="@+id/btn_backreviewRate"
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_15"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="15dp"
android:background="@drawable/arrow_white_selector" />
<TextView
android:id="@+id/tv_photoGallery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/btn_backreviewRate"
android:drawablePadding="@dimen/dp_50"
android:gravity="center_vertical"
android:padding="@dimen/dp_10"
android:text="@string/reviewratingtext"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/whitecolor"
/>
</RelativeLayout>
In Java Code File
backbutton = (Button) findViewById(R.id.btn_backreviewRate);
backbutton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
onBackPressed();//finish();
}
});
@Override
public void onBackPressed() {
super.onBackPressed();
// finish();
}
No comments:
Post a Comment