1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-03 17:02:13 +01:00

show hint at the bottom of the Main Activity, update README.md, bump to 0.1.4

This commit is contained in:
Andreas Shimokawa 2015-03-27 12:33:51 +01:00
parent 0dacc1f9c7
commit b3251a33f2
5 changed files with 27 additions and 4 deletions

View File

@ -4,6 +4,7 @@
* New AppManager shows installed Apps/Watchfaces (removal possible via context menu)
* Allow back navigation in ActionBar (Debug and AppMananger Activities)
* Make sure Intent broadcasts do not leave Gadgetbridge
* Show hint in the Main Activiy (tap to connect etc)
####Version 0.1.3
* Remove the connect button, list all suported devices and connect on tap instead

View File

@ -17,6 +17,7 @@ Features:
* Support for generic notificaions (above filtered out)
* Apollo playback info (artist, album, track)
* Music control: play/pause, next track, previous track
* List and remove installed apps/watchfaces
How to use:

View File

@ -8,8 +8,8 @@ android {
applicationId "nodomain.freeyourgadget.gadgetbridge"
minSdkVersion 19
targetSdkVersion 21
versionCode 4
versionName "0.1.3"
versionCode 5
versionName "0.1.4"
}
buildTypes {
release {

View File

@ -16,6 +16,7 @@ import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import java.util.ArrayList;
@ -33,6 +34,7 @@ public class ControlCenter extends Activity {
public static final String ACTION_REFRESH_DEVICELIST
= "nodomain.freeyourgadget.gadgetbride.controlcenter.action.set_version";
TextView hintTextView;
ListView deviceListView;
GBDeviceAdapter mGBDeviceAdapter;
final List<GBDevice> deviceList = new ArrayList<>();
@ -57,6 +59,12 @@ public class ControlCenter extends Activity {
device.setFirmwareVersion(firmwareVersion);
device.setState(state);
mGBDeviceAdapter.notifyDataSetChanged();
if (state == GBDevice.State.CONNECTED) {
hintTextView.setText("tap connected device for App Mananger");
}
else if (state == GBDevice.State.NOT_CONNECTED ) {
hintTextView.setText("tap a device to connect");
}
break;
}
}
@ -69,7 +77,7 @@ public class ControlCenter extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_controlcenter);
hintTextView = (TextView) findViewById(R.id.hintTextView);
deviceListView = (ListView) findViewById(R.id.deviceListView);
mGBDeviceAdapter = new GBDeviceAdapter(this, deviceList);
deviceListView.setAdapter(this.mGBDeviceAdapter);
@ -169,6 +177,9 @@ public class ControlCenter extends Activity {
deviceList.add(new GBDevice(device.getAddress(), device.getName()));
}
}
if (!deviceList.isEmpty()) {
hintTextView.setText("tap a device to connect");
}
}
}

View File

@ -11,6 +11,16 @@
android:layout_height="wrap_content"
android:id="@+id/deviceListView"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
android:layout_centerHorizontal="true"
android:layout_above="@+id/hintTextView" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="@+id/hintTextView"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:textStyle="italic" />
</RelativeLayout>