implement close button (just finish activity)
git-svn-id: https://osmand.googlecode.com/svn/trunk@803 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
parent
ceb29f4135
commit
aa05b527e7
7 changed files with 16 additions and 7 deletions
|
@ -18,7 +18,7 @@
|
|||
android:layout_marginTop="5dp"
|
||||
android:text="0.5.1 beta(b6)" android:textColor="#000000" android:typeface="serif" android:id="@+id/TextVersion"
|
||||
android:textSize="13sp"/>
|
||||
<ImageView android:src="@drawable/headline_close_button" android:layout_marginRight="10dp"
|
||||
<ImageView android:src="@drawable/headliner_close" android:layout_marginRight="10dp" android:id="@+id/CloseButton"
|
||||
android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginLeft="5dp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
android:layout_marginTop="8dp"
|
||||
android:text="0.5.1 beta(b6)" android:textColor="#000000" android:typeface="serif" android:id="@+id/TextVersion"
|
||||
android:textSize="18sp"/>
|
||||
<ImageView android:src="@drawable/headline_close_button" android:layout_marginRight="15dp"
|
||||
<ImageView android:src="@drawable/headliner_close" android:layout_marginRight="15dp" android:id="@+id/CloseButton"
|
||||
android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginLeft="8dp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
android:layout_marginTop="8dp"
|
||||
android:text="0.5.1 beta(b6)" android:textColor="#000000" android:typeface="serif" android:id="@+id/TextVersion"
|
||||
android:textSize="20sp"/>
|
||||
<ImageView android:src="@drawable/headline_close_button" android:layout_marginRight="10dp" android:clickable="true"
|
||||
<ImageView android:src="@drawable/headliner_close" android:layout_marginRight="10dp" android:clickable="true" android:id="@+id/CloseButton"
|
||||
android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginLeft="5dp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
android:layout_marginTop="5dp"
|
||||
android:text="0.5.1 beta(b6)" android:textColor="#000000" android:typeface="serif" android:id="@+id/TextVersion"
|
||||
android:textSize="13sp"/>
|
||||
<ImageView android:src="@drawable/headline_close_button" android:layout_marginRight="10dp"
|
||||
<ImageView android:src="@drawable/headliner_close" android:layout_marginRight="10dp" android:id="@+id/CloseButton"
|
||||
android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginLeft="5dp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
android:layout_marginTop="5dp"
|
||||
android:text="0.5.1 beta(b6)" android:textColor="#000000" android:typeface="serif" android:id="@+id/TextVersion"
|
||||
android:textSize="13sp"/>
|
||||
<ImageView android:src="@drawable/headline_close_button" android:layout_marginRight="10dp" android:clickable="true"
|
||||
<ImageView android:src="@drawable/headliner_close" android:layout_marginRight="10dp" android:clickable="true" android:id="@+id/CloseButton"
|
||||
android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginLeft="5dp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
android:layout_marginTop="5dp"
|
||||
android:text="0.5.1 beta(b6)" android:textColor="#000000" android:typeface="serif" android:id="@+id/TextVersion"
|
||||
android:textSize="13sp"/>
|
||||
<ImageView android:src="@drawable/headline_close_button" android:layout_marginRight="10dp" android:clickable="true"
|
||||
android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginLeft="5dp"/>
|
||||
<ImageView android:layout_marginRight="10dp" android:clickable="true" android:id="@+id/CloseButton"
|
||||
android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginLeft="5dp" android:src="@drawable/headliner_close"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ public class MainMenuActivity extends Activity {
|
|||
private View settingsButton;
|
||||
private View searchButton;
|
||||
private View favouritesButton;
|
||||
private View closeButton;
|
||||
|
||||
|
||||
|
||||
|
@ -144,6 +145,14 @@ public class MainMenuActivity extends Activity {
|
|||
}
|
||||
});
|
||||
|
||||
closeButton = findViewById(R.id.CloseButton);
|
||||
closeButton.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
searchButton = findViewById(R.id.SearchButton);
|
||||
searchButton.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue