This commit is contained in:
NudeDude 2018-01-06 18:43:58 +01:00
parent 22c93e1521
commit 75d05779b3
10 changed files with 58 additions and 42 deletions

View File

@ -113,6 +113,7 @@ public class MainActivity extends AppCompatActivity implements AdapterView.OnIte
bundle.putBoolean("home", true);
intent.putExtras(bundle);
startActivity(intent);
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
return true;
case R.id.action_tweet:
intent = new Intent(this, TweetPopup.class);
@ -120,6 +121,7 @@ public class MainActivity extends AppCompatActivity implements AdapterView.OnIte
b.putLong("TweetID", -1);
intent.putExtras(b);
startActivity(intent);
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
return true;
case R.id.action_settings:
intent = new Intent(this, AppSettings.class);

View File

@ -45,7 +45,6 @@ public class TweetDetail extends AppCompatActivity implements View.OnClickListen
@Override
protected void onDestroy() {
// TODO save tweet
super.onDestroy();
}

View File

@ -1,6 +1,5 @@
package org.nuclearfog.twidda.window;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
@ -40,6 +39,7 @@ public class TweetPopup extends AppCompatActivity implements View.OnClickListene
@Override
protected void onDestroy() {
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
super.onDestroy();
}
@ -56,6 +56,12 @@ public class TweetPopup extends AppCompatActivity implements View.OnClickListene
finish();
}
@Override
public void onBackPressed() {
super.onBackPressed();
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}
private void send() {
String tweet = tweetfield.getText().toString();
SendStatus sendTweet = new SendStatus(getApplicationContext());

View File

@ -75,6 +75,9 @@ public class TwitterSearch extends AppCompatActivity implements AdapterView.OnIt
switch(id) {
case R.id.search_tweet:
intent = new Intent(this, TweetPopup.class);
Bundle b = new Bundle();
b.putLong("TweetID", -1);
intent.putExtras(b);
startActivity(intent);
break;
}

View File

@ -71,6 +71,12 @@ public class UserProfile extends AppCompatActivity implements View.OnClickListen
getContent();
}
@Override
public void onBackPressed() {
super.onBackPressed();
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}
@Override
public boolean onCreateOptionsMenu(Menu m) {
getMenuInflater().inflate(R.menu.profile, m);

View File

@ -7,7 +7,7 @@
<android.support.v7.widget.Toolbar
android:id="@+id/profile_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" />
android:layout_height="@dimen/bar_wide" />
<TabHost
android:id="@+id/main_tabhost"
@ -22,7 +22,7 @@
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="@dimen/bar_wide" />
<FrameLayout
android:id="@android:id/tabcontent"

View File

@ -6,11 +6,10 @@
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/profile_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" />
<android.support.v7.widget.Toolbar
android:id="@+id/profile_toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/bar_wide" />
<LinearLayout
android:layout_width="match_parent"
@ -34,12 +33,11 @@
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_margin="5dp"
android:contentDescription="@string/profile_image"
app:srcCompat="@color/soylentgreen" />
android:contentDescription="@string/profile_image" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="vertical">
@ -47,13 +45,32 @@
android:id="@+id/profile_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp" />
android:layout_marginBottom="2dp" />
<TextView
android:id="@+id/profile_screenname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp" />
android:layout_marginBottom="5dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/following"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="@+id/follower"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
@ -98,25 +115,6 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/following"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="@+id/follower"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<TabHost
@ -132,7 +130,7 @@
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="@dimen/bar_wide" />
<FrameLayout
android:id="@android:id/tabcontent"

View File

@ -9,7 +9,7 @@
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar_setting"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" />
android:layout_height="@dimen/bar_wide" />
<LinearLayout
android:layout_width="match_parent"

View File

@ -22,21 +22,22 @@
android:layout_marginBottom="5dip"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:gravity="right"
android:orientation="horizontal">
<Button
android:id="@+id/sendTweet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginRight="50dp"
android:background="@drawable/tweet" />
<Button
android:id="@+id/close"
style="@style/Widget.AppCompat.Button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_margin="2dip"
android:layout_weight="1"
android:layout_width="36dp"
android:layout_height="36dp"
android:background="@drawable/ic_cross" />
</LinearLayout>

View File

@ -2,4 +2,5 @@
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="bar_wide">45dp</dimen>
</resources>