Permalink
Browse files

Final Touches

  • Loading branch information...
dragosholban committed Mar 11, 2018
1 parent a640494 commit c5434bafc1aeeeeb6f8e5b166c416791d5920462
@@ -9,15 +9,18 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".TimeZoneActivity" />
<activity android:name=".SelectTimezonesActivity"></activity>
<activity android:name=".TimeZoneActivity"
android:screenOrientation="portrait"/>
<activity android:name=".SelectTimezonesActivity"
android:screenOrientation="portrait"></activity>
</application>
</manifest>
@@ -35,6 +35,7 @@
TextView convertedDateTv;
ListView listView;
ArrayAdapter<String> adapter;
SeekBar seekBar;
private static int CHOOSE_TIME_ZONE_REQUEST_CODE = 1;
private static int SELECT_TIME_ZONES_REQUEST_CODE = 2;
@@ -46,7 +47,7 @@ protected void onCreate(Bundle savedInstanceState) {
loadPreferences();
SeekBar seekBar = findViewById(R.id.seekBar);
seekBar = findViewById(R.id.seekBar);
final TextView userTime = findViewById(R.id.userTime);
convertedTimeTv = findViewById(R.id.convertedTime);
convertedDateTv = findViewById(R.id.convertedDate);
@@ -223,4 +224,10 @@ public int compare(String s, String t1) {
}
}
}
public void convertCurrentDate(View view) {
localDate = new Date();
convertDate(userTimeZone, selectedTimeZone);
seekBar.setProgress(localDate.getHours());
}
}
@@ -28,8 +28,10 @@
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:background="@android:color/transparent"
android:onClick="showDatePicker"
android:text="Date"
android:textColor="@color/colorAccent"
app:layout_constraintBottom_toTopOf="@+id/timeZoneButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
@@ -64,6 +66,7 @@
android:id="@+id/convertedTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="convertCurrentDate"
android:text="00:00"
android:textColor="@color/colorAccent"
android:textSize="36dp"

0 comments on commit c5434ba

Please sign in to comment.