mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Translucent Theme for Actionbar
Conflicts: src/org/wikimedia/commons/CommonsApplication.java
This commit is contained in:
parent
650095c64f
commit
297d7226d6
8 changed files with 98 additions and 10 deletions
|
|
@ -13,7 +13,7 @@
|
||||||
android:name=".CommonsApplication"
|
android:name=".CommonsApplication"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/AppTheme" >
|
android:theme="@style/Theme.Commons" >
|
||||||
<activity
|
<activity
|
||||||
android:name=".LoginActivity"
|
android:name=".LoginActivity"
|
||||||
android:label="@string/title_activity_login"
|
android:label="@string/title_activity_login"
|
||||||
|
|
|
||||||
|
|
@ -11,4 +11,4 @@
|
||||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||||
|
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-15
|
target=android-14
|
||||||
|
|
|
||||||
4
res/drawable/action_bar_translucent.xml
Normal file
4
res/drawable/action_bar_translucent.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<gradient android:angle="90" android:startColor="#60ffffff" android:endColor="#40ffffff"/>
|
||||||
|
</shape>
|
||||||
10
res/drawable/actionbar_top_shadow.xml
Normal file
10
res/drawable/actionbar_top_shadow.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<gradient
|
||||||
|
android:startColor="#70000000"
|
||||||
|
android:endColor="#00000000"
|
||||||
|
android:angle="270"
|
||||||
|
>
|
||||||
|
</gradient>
|
||||||
|
</shape>
|
||||||
|
|
@ -1,16 +1,28 @@
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_height="fill_parent" >
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/backgroundImage"
|
android:id="@+id/backgroundImage"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:scaleType="centerCrop" />
|
android:scaleType="centerCrop" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" >
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="12dp"
|
||||||
|
android:layout_marginTop="48dp"
|
||||||
|
android:background="@drawable/actionbar_top_shadow"
|
||||||
|
android:orientation="vertical" >
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
@ -27,6 +39,7 @@
|
||||||
android:background="@drawable/share_overlay_background_gradient" >
|
android:background="@drawable/share_overlay_background_gradient" >
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:textColor="#818181"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/upload_overlay_title"
|
android:text="@string/upload_overlay_title"
|
||||||
|
|
@ -34,6 +47,7 @@
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:textColor="#818181"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Title"
|
android:text="Title"
|
||||||
|
|
@ -46,9 +60,11 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:scrollHorizontally="false"
|
android:scrollHorizontally="false"
|
||||||
|
android:textColor="#363636"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:textColor="#818181"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Description"
|
android:text="Description"
|
||||||
|
|
@ -60,6 +76,7 @@
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textMultiLine"
|
android:inputType="textMultiLine"
|
||||||
|
android:textColor="#363636"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -70,5 +87,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</FrameLayout>
|
||||||
38
res/layout/login.xml
Normal file
38
res/layout/login.xml
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" >
|
||||||
|
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/listView1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" >
|
||||||
|
</ListView>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/commonsLogo"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:src="@drawable/commons_logo_large" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="150dp"
|
||||||
|
android:layout_below="@+id/commonsLogo"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:orientation="vertical" >
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
12
res/values/theme.xml
Normal file
12
res/values/theme.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<style name="Theme.Commons" parent="android:style/Theme.Holo">
|
||||||
|
<item name="android:actionBarStyle">@style/ActionBar</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="ActionBar" parent="android:style/Widget.Holo.ActionBar">
|
||||||
|
<item name="android:background">@drawable/action_bar_translucent</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
||||||
|
|
@ -95,7 +95,12 @@ public class ShareActivity extends Activity {
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
//Actionbar overlay on top of imageview (should be called before .setcontentview)
|
||||||
|
getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
|
||||||
|
getActionBar().setDisplayShowTitleEnabled(false);
|
||||||
|
|
||||||
setContentView(R.layout.activity_share);
|
setContentView(R.layout.activity_share);
|
||||||
|
|
||||||
app = (CommonsApplication)this.getApplicationContext();
|
app = (CommonsApplication)this.getApplicationContext();
|
||||||
|
|
||||||
backgroundImageView = (ImageView)findViewById(R.id.backgroundImage);
|
backgroundImageView = (ImageView)findViewById(R.id.backgroundImage);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue