File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed
java/org/openstack/android/summit/modules/splash/user_interface Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -30,4 +30,6 @@ public interface ISplashView extends IBaseView {
30
30
void setSummitCurrentDayContainerVisibility (boolean visible );
31
31
32
32
void setSummitCurrentDay (String day );
33
+
34
+ void setDayLeftLabel (String label );
33
35
}
Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ public class SplashActivity extends BaseActivity implements ISplashView {
59
59
@ BindView (R .id .summit_days_left_container )
60
60
LinearLayout summitDaysLeftContainer ;
61
61
62
+ @ BindView (R .id .day_left_label )
63
+ TextView dayLeftLabel ;
64
+
62
65
@ BindView (R .id .day_until_1 )
63
66
TextView dayUntil1Text ;
64
67
@@ -222,4 +225,10 @@ public void setSummitDaysLeftContainerVisibility(boolean visible) {
222
225
if (summitDaysLeftContainer == null ) return ;
223
226
summitDaysLeftContainer .setVisibility (visible ? View .VISIBLE : View .INVISIBLE );
224
227
}
228
+
229
+ @ Override
230
+ public void setDayLeftLabel (String label ){
231
+ if (dayLeftLabel == null ) return ;
232
+ dayLeftLabel .setText (label );
233
+ }
225
234
}
Original file line number Diff line number Diff line change 12
12
13
13
import com .crashlytics .android .Crashlytics ;
14
14
15
+ import org .openstack .android .summit .OpenStackSummitApplication ;
16
+ import org .openstack .android .summit .R ;
15
17
import org .openstack .android .summit .SummitsListDataLoaderActivity ;
16
18
import org .openstack .android .summit .common .Constants ;
17
19
import org .openstack .android .summit .common .DTOs .SummitDTO ;
@@ -171,6 +173,7 @@ public void showSummitInfo() {
171
173
if (summit .isNotStarted ()) {
172
174
173
175
int daysLeft = summit .getDaysLeft ();
176
+
174
177
if (daysLeft > 0 ) {
175
178
view .setSummitDaysLeftContainerVisibility (true );
176
179
char [] days = String .valueOf (daysLeft ).toCharArray ();
@@ -188,6 +191,11 @@ public void showSummitInfo() {
188
191
}
189
192
++index ;
190
193
}
194
+ String label = daysLeft == 1 ?
195
+ OpenStackSummitApplication .context .getString (R .string .splash_day_left_label ):
196
+ OpenStackSummitApplication .context .getString (R .string .splash_days_left_label );
197
+
198
+ view .setDayLeftLabel (label );
191
199
}
192
200
return ;
193
201
}
Original file line number Diff line number Diff line change 107
107
<string name =" splash_login_button_txt" >SIGN IN USING OPENSTACK ID</string >
108
108
<string name =" splash_guest_button_txt" >continue as guest</string >
109
109
<string name =" splash_days_left_label" >days left</string >
110
+ <string name =" splash_day_left_label" >day left</string >
110
111
<string name =" splash_current_day" >day</string >
111
112
<string name =" now" >NOW</string >
112
113
<string name =" save_favorite" >Watch Later</string >
You can’t perform that action at this time.
0 commit comments