Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

165
Vistas
Passing a value to layout file

I'm trying to display certain tweets using TweetView with fabric but I'm having trouble figuring out how to send the value of the tweetID to the layout file

here's part of the xml:

<com.twitter.sdk.android.tweetui.TweetView
    android:id="@+id/title"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    twittersdk:tw__tweet_id="?????"/>

here is where I have the value of the tweetID

private void render(Marker marker, View view) {
        ScreenResolution screenRes = deviceDimensions();
        String title = marker.getTitle();
        long tweetID = Long.parseLong(marker.getSnippet());
        }
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You cannot pass a value to layout file, instead you can set its value in .java.

As per your need, you may use like:

final LinearLayout tweet_layout
            = (LinearLayout) findViewById(R.id.tweet_layout);

    final List<Long> tweetIds = Arrays.asList(your_tweet_id);
    TweetUtils.loadTweets(tweetIds, new Callback<Tweet>() {
        @Override
        public void success(Result<Tweet> result) {
            for (Tweet tweet : result.data) {
                tweet_layout.addView(new TweetView(TweetActivity.this, tweet));
            }
        }

        @Override
        public void failure(TwitterException exception) {
            // Do something here.
        }
    });
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda