mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Merge remote-tracking branch 'refs/remotes/commons-app/master'
This commit is contained in:
commit
75e7582399
20 changed files with 7 additions and 139 deletions
|
|
@ -230,7 +230,7 @@ public class Media implements Parcelable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Media(Parcel in) {
|
public Media(Parcel in) {
|
||||||
localUri = (Uri)in.readParcelable(Uri.class.getClassLoader());
|
localUri = in.readParcelable(Uri.class.getClassLoader());
|
||||||
imageUrl = in.readString();
|
imageUrl = in.readString();
|
||||||
filename = in.readString();
|
filename = in.readString();
|
||||||
description = in.readString();
|
description = in.readString();
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ public class Contribution extends Media {
|
||||||
|
|
||||||
public Contribution(Parcel in) {
|
public Contribution(Parcel in) {
|
||||||
super(in);
|
super(in);
|
||||||
contentUri = (Uri)in.readParcelable(Uri.class.getClassLoader());
|
contentUri = in.readParcelable(Uri.class.getClassLoader());
|
||||||
source = in.readString();
|
source = in.readString();
|
||||||
timestamp = (Date) in.readSerializable();
|
timestamp = (Date) in.readSerializable();
|
||||||
state = in.readInt();
|
state = in.readInt();
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ public class ContributionController {
|
||||||
|
|
||||||
public void loadState(Bundle savedInstanceState) {
|
public void loadState(Bundle savedInstanceState) {
|
||||||
if(savedInstanceState != null) {
|
if(savedInstanceState != null) {
|
||||||
lastGeneratedCaptureURI = (Uri) savedInstanceState.getParcelable("lastGeneratedCaptureURI");
|
lastGeneratedCaptureURI = savedInstanceState.getParcelable("lastGeneratedCaptureURI");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ class ContributionsListAdapter extends CursorAdapter {
|
||||||
|
|
||||||
if(views.url == null || !views.url.equals(actualUrl)) {
|
if(views.url == null || !views.url.equals(actualUrl)) {
|
||||||
if(actualUrl.startsWith("http")) {
|
if(actualUrl.startsWith("http")) {
|
||||||
MediaWikiImageView mwImageView = (MediaWikiImageView)views.imageView;
|
MediaWikiImageView mwImageView = views.imageView;
|
||||||
mwImageView.setMedia(contribution, ((CommonsApplication) activity.getApplicationContext()).getImageLoader());
|
mwImageView.setMedia(contribution, ((CommonsApplication) activity.getApplicationContext()).getImageLoader());
|
||||||
// FIXME: For transparent images
|
// FIXME: For transparent images
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -65,7 +65,7 @@ class ContributionsListAdapter extends CursorAdapter {
|
||||||
@Override
|
@Override
|
||||||
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
|
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
|
||||||
super.onLoadingFailed(imageUri, view, failReason);
|
super.onLoadingFailed(imageUri, view, failReason);
|
||||||
MediaWikiImageView mwImageView = (MediaWikiImageView)views.imageView;
|
MediaWikiImageView mwImageView = views.imageView;
|
||||||
mwImageView.setMedia(contribution, ((CommonsApplication) activity.getApplicationContext()).getImageLoader());
|
mwImageView.setMedia(contribution, ((CommonsApplication) activity.getApplicationContext()).getImageLoader());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ public class NearbyListFragment extends ListFragment implements TaskListener {
|
||||||
@Override
|
@Override
|
||||||
public View getView(int position, View convertView, ViewGroup parent) {
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
// Get the data item for this position
|
// Get the data item for this position
|
||||||
Place place = (Place) getItem(position);
|
Place place = getItem(position);
|
||||||
Log.d(TAG, "Place " + place.name);
|
Log.d(TAG, "Place " + place.name);
|
||||||
|
|
||||||
// Check if an existing view is being reused, otherwise inflate the view
|
// Check if an existing view is being reused, otherwise inflate the view
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ public class ShareActivity
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
|
|
||||||
if(intent.getAction().equals(Intent.ACTION_SEND)) {
|
if(intent.getAction().equals(Intent.ACTION_SEND)) {
|
||||||
mediaUri = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM);
|
mediaUri = intent.getParcelableExtra(Intent.EXTRA_STREAM);
|
||||||
if(intent.hasExtra(UploadService.EXTRA_SOURCE)) {
|
if(intent.hasExtra(UploadService.EXTRA_SOURCE)) {
|
||||||
source = intent.getStringExtra(UploadService.EXTRA_SOURCE);
|
source = intent.getStringExtra(UploadService.EXTRA_SOURCE);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB |
|
|
@ -1,4 +0,0 @@
|
||||||
<?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>
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
<?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,10 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<gradient
|
|
||||||
android:startColor="#00000000"
|
|
||||||
android:endColor="#ff000000"
|
|
||||||
android:angle="270"
|
|
||||||
>
|
|
||||||
</gradient>
|
|
||||||
</shape>
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<gradient
|
|
||||||
android:startColor="#ffffffff"
|
|
||||||
android:endColor="#f4f4f4ff"
|
|
||||||
android:type="linear"
|
|
||||||
/>
|
|
||||||
</shape>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:id="@+id/webview"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
/>
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
<?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"
|
|
||||||
>
|
|
||||||
|
|
||||||
<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="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_below="@+id/commonsLogo"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="20dp"
|
|
||||||
>
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/loginUsername"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/username"
|
|
||||||
>
|
|
||||||
|
|
||||||
<requestFocus />
|
|
||||||
</EditText>
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/loginPassword"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/password"
|
|
||||||
android:inputType="textPassword"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/loginButton"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="20dp"
|
|
||||||
android:text="@string/login"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</RelativeLayout>
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
<resources>
|
|
||||||
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
|
|
||||||
(such as screen margins) for screens with more than 820dp of available width. This
|
|
||||||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
|
|
||||||
<dimen name="activity_horizontal_margin">64dp</dimen>
|
|
||||||
</resources>
|
|
||||||
|
|
@ -2,7 +2,5 @@
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<color name="text_background">#90000000</color>
|
<color name="text_background">#90000000</color>
|
||||||
<color name="transparent_actionbar_background">#22000000</color>
|
|
||||||
<color name="lighter_gray">#ddd</color>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -1,7 +1,4 @@
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
|
||||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
|
||||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
|
||||||
<dimen name="icon_size">120dp</dimen>
|
<dimen name="icon_size">120dp</dimen>
|
||||||
<dimen name="tiny_margin">4dp</dimen>
|
<dimen name="tiny_margin">4dp</dimen>
|
||||||
<dimen name="small_margin">8dp</dimen>
|
<dimen name="small_margin">8dp</dimen>
|
||||||
|
|
|
||||||
|
|
@ -6,19 +6,6 @@
|
||||||
<item name="android:windowNoTitle">true</item>
|
<item name="android:windowNoTitle">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="LightNoTitle" parent="Theme.AppCompat.Light.NoActionBar"/>
|
|
||||||
|
|
||||||
<style name="NotificationText" parent="android:TextAppearance.DeviceDefault.Small">
|
|
||||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="NotificationTitle">
|
|
||||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
|
||||||
<item name="android:textStyle">bold</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="NotificationProgress" parent="AppTheme" />
|
|
||||||
|
|
||||||
<style name="ProgressBar" parent="Widget.AppCompat.ProgressBar.Horizontal" />
|
<style name="ProgressBar" parent="Widget.AppCompat.ProgressBar.Horizontal" />
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue