本文整理汇总了Java中com.google.android.glass.app.Card.setFootnote方法的典型用法代码示例。如果您正苦于以下问题:Java Card.setFootnote方法的具体用法?Java Card.setFootnote怎么用?Java Card.setFootnote使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.android.glass.app.Card
的用法示例。
在下文中一共展示了Card.setFootnote方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCardView
import com.google.android.glass.app.Card; //导入方法依赖的package包/类
public View getCardView(Context context) {
Card card = new Card(context);
card.setText(mText);
card.setFootnote(mFooter);
for (Uri uri : mImages) {
if (uri != null) {
Log.w(TAG, "ImageUri: " + uri.toString());
try {
card.addImage(MediaStore.Images.Media.getBitmap(
context.getContentResolver(), uri));
} catch (IOException e) {
Log.e(TAG, "Failed to load: " + e);
}
} else {
Log.w(TAG, "We got a null imageUri!");
}
}
return card.getView();
}
示例2: onCreate
import com.google.android.glass.app.Card; //导入方法依赖的package包/类
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
//keeps the camera on
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
Card card1 = new Card(this);
card1.setText("Nice Picture!");
card1.setFootnote("Cool! ...");
View card1View = card1.getView();
//Calling the intent
setContentView(card1View);
takePicture();
// Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
// cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, false);
// startActivityForResult(cameraIntent, 1);
setContentView(card1View);
takePicture();
}
示例3: onCreate
import com.google.android.glass.app.Card; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle extras= getIntent().getExtras();
ArrayList<CraftARItem> results= extras.getParcelableArrayList("results");
//In this example we just consider the best match.
//Note that the API can return more than one match, and they are sorted by the confidence score.
CraftARItem bestMatch= results.get(0);
//Create a card with the content of the matched image.
Card card = new Card(this);
card.setText(bestMatch.getItemName());
card.setFootnote(bestMatch.getItemId());
View cardView = card.getView();
setContentView(cardView);
}
示例4: buildCards
import com.google.android.glass.app.Card; //导入方法依赖的package包/类
private void buildCards(String notes) {
String[] noteArray = notes.split("\\|");
mNotes = new ArrayList<String>(noteArray.length);
mCards = new ArrayList<Card>(mNotes.size());
for (String note : noteArray) {
Log.d(TAG, "Adding note \"" + note + "\"");
mNotes.add(note);
Card card = new Card(mContext);
card.setText(note);
card.setFootnote(mContext.getString(R.string.text_tap_for_options));
mCards.add(card);
}
}
示例5: DeviceCardScrollAdapter
import com.google.android.glass.app.Card; //导入方法依赖的package包/类
public DeviceCardScrollAdapter(Context context, ArrayList<BluetoothDevice> devices) {
super();
this.devices = devices;
cards = new ArrayList<Card>(devices.size());
for (BluetoothDevice device : devices) {
Card card = new Card(context);
card.setText(device.getName());
card.setFootnote(device.getAddress());
cards.add(card);
}
}
开发者ID:corneliudascalu,项目名称:google-glass-share-barcode-bluetooth,代码行数:12,代码来源:DeviceCardScrollAdapter.java
示例6: setDevices
import com.google.android.glass.app.Card; //导入方法依赖的package包/类
public void setDevices(Context context, List<Device> devices) {
this.devices = devices;
cards.clear();
for (Device device : devices) {
Card card = new Card(context);
card.setText(device.getName());
card.setFootnote(device.getToken());
cards.add(card);
}
notifyDataSetChanged();
}
示例7: RootCardScrollAdapter
import com.google.android.glass.app.Card; //导入方法依赖的package包/类
public RootCardScrollAdapter(Context context, List<StoryModel> storyModels) {
this.items = storyModels;
cards = new ArrayList<Card>();
for (StoryModel sm : storyModels) {
Card card = new Card(context);
card.setText(MessageFormat.format("{0} ({1}/{2})", sm.getTitle(), sm.getIndex()+1, storyModels.size()));
card.setFootnote(R.string.select_story);
card.setImageLayout(ImageLayout.FULL);
cards.add(card);
}
}
示例8: onCreate
import com.google.android.glass.app.Card; //导入方法依赖的package包/类
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
mGestureDetector = createGestureDetector(this);
Card card1 = new Card(this);
card1.setText("Visual Gestures!");
card1.setImageLayout(Card.ImageLayout.FULL);
card1.setFootnote("Gestures's in Glass");
View card1View = card1.getView();
setContentView(card1View);
card = card1;
}
示例9: onCreate
import com.google.android.glass.app.Card; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
mCard = new Card(this);
mCard.setFootnote(R.string.tap_to_set_angle);
mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
mGravity = mSensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY);
setContentView(mCard.getView());
}
示例10: onCreate
import com.google.android.glass.app.Card; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// We don't need a layout, in Google Glass we use cards
LocationManager manager = (LocationManager) getSystemService(LOCATION_SERVICE);
Criteria criteria = new Criteria();
String provider = manager.getBestProvider(criteria, true);
l = manager.getLastKnownLocation(provider);
Handler handler = new Handler(){
@Override
public void handleMessage(Message msg) {
int spots = msg.getData().getInt("spots");
String name = msg.getData().getString("name");
double lat = msg.getData().getDouble("lat");
double lon = msg.getData().getDouble("lon");
Card card = new Card(MainActivity.this);
card.setText(name);
card.setFootnote("plazas libres: "+spots);
setContentView(card.getView());
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("google.navigation:q="+lat+","+lon));
startActivity(intent);
}
};
HTTPThread t = new HTTPThread(handler);
t.start();
}
示例11: createCards
import com.google.android.glass.app.Card; //导入方法依赖的package包/类
private void createCards(ArrayList<String> topicNames) {
mCards = new ArrayList<Card>();
//TODO: Handle no topics gracefully.
for(String topic_name : topicNames) {
Card card = new Card(this);
card.setText(topic_name);
card.setFootnote("Topic Card");
//card.setInfo("Topic card");
mCards.add(card);
}
}
示例12: createCards
import com.google.android.glass.app.Card; //导入方法依赖的package包/类
private void createCards() {
properties = new ArrayList<Card>();
Card house1 = new Card(this);
house1.setText("First house");
house1.setFootnote("Footer");
properties.add(house1);
Card house2 = new Card(this);
house2.setText("House2");
house2.setImageLayout(Card.ImageLayout.LEFT);
//house2.addImage(uri)
properties.add(house2);
}
示例13: onCreate
import com.google.android.glass.app.Card; //导入方法依赖的package包/类
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
Card card1 = new Card(this);
card1.setText("Hello World!");
card1.setFootnote("Footer Note ...");
View card1View = card1.toView();
setContentView(card1View);
}
示例14: createDeviceCard
import com.google.android.glass.app.Card; //导入方法依赖的package包/类
private Card createDeviceCard(BluetoothDeviceModel bDevice) {
card = new Card(ctx);
card.setText(bDevice.getDeviceName());
card.setFootnote(bDevice.getDeviceMACAddress());
return card;
}