fixed gps, layout change

This commit is contained in:
nuclearfog 2019-11-17 14:32:18 +01:00
parent 08ba87c941
commit d3d08eb4bb
No known key found for this signature in database
GPG Key ID: ED35E22099354A64
2 changed files with 13 additions and 11 deletions

View File

@ -119,6 +119,8 @@ public class TweetPopup extends AppCompatActivity implements OnClickListener, Lo
protected void onDestroy() {
if (uploaderAsync != null && uploaderAsync.getStatus() == RUNNING)
uploaderAsync.cancel(true);
if (mLocation != null)
mLocation.removeUpdates(this);
super.onDestroy();
}
@ -210,7 +212,7 @@ public class TweetPopup extends AppCompatActivity implements OnClickListener, Lo
String tweetStr = tweet.getText().toString();
if (tweetStr.trim().isEmpty() && mediaPath.isEmpty()) {
Toast.makeText(this, R.string.empty_tweet, LENGTH_SHORT).show();
} else {
} else if (locationProg.getVisibility() == INVISIBLE) {
TweetHolder tweet = new TweetHolder(tweetStr, inReplyId);
if (!mediaPath.isEmpty())
tweet.addMedia(mediaPath.toArray(new String[0]));

View File

@ -111,16 +111,6 @@
android:textSize="@dimen/textsize_tweet"
android:visibility="gone" />
<TextView
android:id="@+id/tweet_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:visibility="gone"
android:textSize="@dimen/textsize_tweet_locale"
app:drawableLeftCompat="@drawable/userlocation"
app:drawableStartCompat="@drawable/userlocation" />
<ImageButton
android:id="@+id/image_attach"
android:layout_width="@dimen/button_media_width"
@ -143,6 +133,16 @@
android:visibility="gone"
app:srcCompat="@drawable/video" />
<TextView
android:id="@+id/tweet_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textSize="@dimen/textsize_tweet_locale"
android:visibility="gone"
app:drawableLeftCompat="@drawable/userlocation"
app:drawableStartCompat="@drawable/userlocation" />
<TextView
android:id="@+id/used_api"
android:layout_width="match_parent"